TL;DR
The BigCode community introduces StarCoder and StarCoderBase, powerful 15.5B parameter code LLMs trained on a massive dataset of permissively licensed code. These models offer advanced features like 8K context length and infilling capabilities, outperforming existing open-source models and rivaling closed-source alternatives, while prioritizing responsible AI development with improved PII redaction and attribution tools.
What Problem Does This Paper Address?
The development and deployment of Large Language Models (LLMs), particularly those trained on code (Code LLMs), raise significant concerns regarding copyright, privacy, and openness. Existing models often operate as "black boxes," making it difficult to audit their training data, understand their biases, or ensure compliance with legal and ethical standards. This lack of transparency hinders responsible AI development and limits the ability of the research community to contribute to model improvements and safety. The paper addresses this by introducing open-access code LLMs with a strong emphasis on responsible development practices, including data governance, PII redaction, and attribution tools.
Methods
The core of this work involves training two large language models: StarCoderBase and StarCoder. StarCoderBase is trained on 1 trillion tokens from "The Stack," a large dataset of permissively licensed code. StarCoder is then fine-tuned on 35 billion Python tokens. Both models incorporate architectural advancements such as an 8K token context length, Fill-in-the-Middle (FIM) capabilities for code infilling, and Multi-Query Attention (MQA) for efficient large-batch inference. The project also emphasizes responsible AI by developing an improved PII redaction pipeline and a novel attribution tracing tool.
Datasets
The primary dataset used for training is The Stack, a collection of 6.4 TB of permissively licensed source code from 384 programming languages, including GitHub issues and repository metadata. StarCoderBase was trained on 1 trillion tokens from this dataset. StarCoder was then fine-tuned on an additional 35 billion Python tokens. The paper also details the use of various benchmarks for evaluation, including HumanEval, MBPP, DS-1000, ODEX, and others for assessing multi-language capabilities, security, and reasoning.
Key Insights and Ideas
- Openness with Responsibility: The paper demonstrates that it's possible to build highly capable code LLMs while prioritizing ethical considerations like data governance, PII redaction, and attribution. This challenges the notion that powerful models must be closed-access.
- The Power of Context: The 8K context window significantly benefits code generation, allowing models to understand and generate longer, more complex code structures.
- Beyond Python: While fine-tuned on Python, StarCoder retains strong performance across multiple programming languages, highlighting the generalizability of its pre-training.
- Attribution as a Safety Net: The development of attribution tools is a crucial step towards responsible AI, enabling users to trace generated code back to its potential sources and fostering transparency.
Key Results
StarCoder and StarCoderBase achieve state-of-the-art performance among open-access code LLMs.
- Outperforms Open Models: StarCoder outperforms all other open LLMs supporting multiple programming languages and is competitive with or surpasses OpenAI's code-cushman-001 model.
- Python Prowess: StarCoder significantly outperforms other Python-fine-tuned LLMs.
- Broad Language Support: StarCoderBase shows strong performance across 19 programming languages, and StarCoder, despite its Python focus, remains highly capable.
- Security: StarCoderBase demonstrates a high rate of valid code generation with a low rate of insecure completions on the "Asleep at the Keyboard" benchmark.
- Responsible AI: The models incorporate improved PII redaction and attribution tools, and are released under a commercially viable Open Responsible AI Model license.
Limitations and Future Work
The authors acknowledge several limitations:
- PII Redaction Imperfection: While improved, the PII redaction pipeline may still produce false positives and negatives, and its performance can vary across different data types and languages.
- License Detector Accuracy: The license detector used for filtering The Stack might have misclassified some repositories.
- Attribution Tool Limitations: The attribution tools are limited to the subset of The Stack used for training and may not find matches for code not included or removed. They also cannot distinguish between generic code and protected content.
- English-Centric Evaluation: Current evaluations are primarily on English-based benchmarks, and future work should investigate performance on other natural languages.
- Potential for Misuse: Despite responsible development efforts, the open-access nature of the models means they could potentially be misused, necessitating ongoing research into safety guardrails and red-teaming.
Future work could focus on expanding evaluations to other languages, further improving PII detection and attribution, and exploring more robust safety mechanisms.
Summary updated