[Paper Review] SantaCoder: don't reach for the stars!
SantaCoder is a 1.1B-parameter decoder-only code model trained on The Stack's PII-redacted Java, JavaScript, and Python data, achieving competitive text-to-code and infilling performance on MultiPL-E despite being smaller than prior open-source models.
The BigCode project is an open-scientific collaboration working on the responsible development of large language models for code. This tech report describes the progress of the collaboration until December 2022, outlining the current state of the Personally Identifiable Information (PII) redaction pipeline, the experiments conducted to de-risk the model architecture, and the experiments investigating better preprocessing methods for the training data. We train 1.1B parameter models on the Java, JavaScript, and Python subsets of The Stack and evaluate them on the MultiPL-E text-to-code benchmark. We find that more aggressive filtering of near-duplicates can further boost performance and, surprisingly, that selecting files from repositories with 5+ GitHub stars deteriorates performance significantly. Our best model outperforms previous open-source multilingual code generation models (InCoder-6.7B and CodeGen-Multi-2.7B) in both left-to-right generation and infilling on the Java, JavaScript, and Python portions of MultiPL-E, despite being a substantially smaller model. All models are released under an OpenRAIL license at https://hf.co/bigcode.
Motivation & Objective
- Develop a responsible code LLM by redacting PII from training data and evaluating data preprocessing impacts.
- De-risk model architecture through ablations on FIM (Fill-in-the-Middle) and Multi Query Attention (MQA).
- Assess the impact of data filtering strategies (stars filter, comments-to-code ratio, near-deduplication, tokenizer fertility).
- Train and release a final 1.1B model and compare to existing open-source multilingual code models.
- Provide open access to datasets and preprocessing tools within the BigCode effort.
Proposed method
- Train a 1.1B decoder-only transformer with FIM and MQA on The Stack subsets (Java, JavaScript, Python).
- Use a 49k token Byte-Pair Encoding tokenizer trained on pre-tokenized data.
- Conduct PII redaction through a benchmark and a pipeline detecting emails, IPs, and secret keys with filters and gibberish/hashing checks.
- Perform architecture ablations (FIM vs No-FIM; MQA vs MHA) and data-filtering ablations (stars, comments-to-code, near-deduplication, fertility).
- Evaluate on MultiPL-E text-to-code benchmarks and fill-in-the-middle tasks across Java, JavaScript, Python.
- Compare SantaCoder to InCoder, CodeGen, and Codex baselines and release under OpenRAIL.

Experimental results
Research questions
- RQ1How does PII redaction affect data quality and model safety in training code LLMs?
- RQ2What is the impact of architectural choices like FIM and MQA on code generation and infilling performance?
- RQ3How do data filtering strategies influence downstream performance on text-to-code benchmarks?
- RQ4Can a smaller 1.1B model outperform larger open-source multilingual code models on code generation and infilling tasks?
- RQ5What are the trade-offs between data quantity and quality when using near-deduplication and stars-based filtering?
Key findings
- PII redaction achieves high precision/recall for emails and IPs, and moderate precision for keys in the benchmark.
- FIM yields a small degradation in left-to-right text-to-code performance but enables efficient infilling; MQA gives modest speed-ups with slight performance changes.
- GitHub stars filtering consistently decreases performance across benchmarks and languages.
- Near-deduplication and comments-to-code filters yield small to moderate performance gains on text-to-code benchmarks, while tokenizer fertility helps fill-in-the-middle results.
- SantaCoder (1.1B) outperforms InCoder-6.7B and CodeGen-Multi-2.7B on left-to-right generation and infilling for Java, JavaScript, and Python on MultiPL-E; doubling training iterations further improves text-to-code performance.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.