StarCoder 2 and The Stack v2: The Next Generation
Authors: name: Anton Lozhkov, name: Raymond Li, name: Loubna Ben Allal, name: Federico Cassano, name: Joel Lamy-Poirier, name: Nouamane Tazi, name: Ao Tang, name: Dmytro Pykhtar, name: Jiawei Liu, name: Yuxiang Wei, name: Tianyang Liu, name: Max Tian, name: Denis Kocetkov, name: Arthur Zucker, name: Younes Belkada, name: Zijian Wang, name: Qian Liu, name: Dmitry Abulkhanov, name: Indraneil Paul, name: Zhuang Li, name: Wen-Ding Li, name: Megan Risdal, name: Jia Li, name: Jian Zhu, name: Terry Yue Zhuo, name: Evgenii Zheltonozhskii, name: Nii Osae Osae Dade, name: Wenhao Yu, name: Lucas Krauß, name: Naman Jain, name: Yixuan Su, name: Xuanli He, name: Manan Dey, name: Edoardo Abati, name: Yekun Chai, name: Niklas Muennighoff, name: Xiangru Tang, name: Muhtasham Oblokulov, name: Christopher Akiki, name: Marc Marone, name: Chenghao Mou, name: Mayank Mishra, name: Alex Gu, name: Binyuan Hui, name: Tri Dao, name: Armel Zebaze, name: Olivier Dehaene, name: Nicolas Patry, name: Canwen Xu, name: Julian McAuley, name: Han Hu, name: Torsten Scholak, name: Sebastien Paquet, name: Jennifer Robinson, name: Carolyn Jane Anderson, name: Nicolas Chapados, name: Mostofa Patwary, name: Nima Tajbakhsh, name: Yacine Jernite, name: Carlos Muñoz Ferrandis, name: Lingming Zhang, name: Sean Hughes, name: Thomas Wolf, name: Arjun Guha, name: Leandro von Werra, name: Harm de Vries

The BigCode project, an open-scientific collaboration focused on the
responsible development of Large Language Models for Code (Code LLMs),
introduces StarCoder2. In partnership with Software Heritage (SWH), we build
The Stack v2 on top of the digital commons of their source code archive.
Alongside the SWH repositories spanning 619 programming languages, we carefully
select other high-quality data sources, such as GitHub pull requests, Kaggle
notebooks, and code documentation. This results in a training set that is 4x
larger than the first StarCoder dataset. We train StarCoder2 models with 3B,
7B, and 15B parameters on 3.3 to 4.3 trillion tokens and thoroughly evaluate
them on a comprehensive set of Code LLM benchmarks. We find that our small
model, StarCoder2-3B, outperforms other Code LLMs of similar size on most
benchmarks, and also outperforms StarCoderBase-15B. Our large model,
StarCoder2- 15B, significantly outperforms other models of comparable size. In
addition, it matches or outperforms CodeLlama-34B, a model more than twice its
size. Although DeepSeekCoder- 33B is the best-performing model at code
completion for high-resource languages, we find that StarCoder2-15B outperforms
it on math and code reasoning benchmarks, as well as several low-resource
languages. We make the model weights available under an OpenRAIL license and
ensure full transparency regarding the training data by releasing the SoftWare
Heritage persistent IDentifiers (SWHIDs) of the source code data.