Code Llama

Meta releases Code Llama, a family of code-specialized LLMs built on top of Llama 2.
Ask this paper
Three-tier release: Foundation base models, Python-specialist variants, and instruction-following Code Llama - Instruct models, all in 7B/13B/34B sizes.
Long context: Supports input contexts up to 100K tokens, enabling whole-repository or long-file code completion and analysis - unusual for open code LLMs at the time.
Fill-in-the-middle: Includes fill-in-the-middle support, a key capability for editor-integrated use cases like code completion and gap filling.
Strong HumanEval results: Code Llama - Python 34B reaches ~53% on HumanEval, establishing a strong open baseline for code models that persisted into 2024.
Abstract
We release Code Llama, a family of large language models for code based on Llama 2 providing state-of-the-art performance among open models, infilling capabilities, support for large input contexts, and zero-shot instruction following ability for programming tasks. We provide multiple flavors to cover a wide range of applications: foundation models (Code Llama), Python specializations (Code Llama - Python), and instruction-following models (Code Llama - Instruct) with 7B, 13B and 34B parameters each. All models are trained on sequences of 16k tokens and show improvements on inputs with up to 100k tokens. 7B and 13B Code Llama and Code Llama - Instruct variants support infilling based on surrounding content. Code Llama reaches state-of-the-art performance among open models on several code benchmarks, with scores of up to 53% and 55% on HumanEval and MBPP, respectively. Notably, Code Llama - Python 7B outperforms Llama 2 70B on HumanEval and MBPP, and all our models outperform every other publicly available model on MultiPL-E. We release Code Llama under a permissive license that allows for both research and commercial use. Download the Paper AUTHORS Written by Baptiste Rozière Jonas Gehring Fabian Gloeckle Sten Sootla Itai Gat Ellen Tan Yossef (Yossi) Adi Jingyu Liu Tal Remez Jérémy Rapin Artyom Kozhevnikov Ivan Evtimov Joanna Bitton Manish Bhatt Cristian Canton Ferrer Aaron Grattafiori Wenhan Xiong Alexandre Defossez Jade Copet Faisal Azhar Hugo Touvron Gabriel Synnaeve Louis Martin Nicolas Usunier Thomas Scialom Publisher Meta AI Research Topics Natural Language Processing (NLP) Core Machine Learning Related Publications July 17, 2026 CONVERSATIONAL AI REINFORCEMENT LEARNING Learning to Reason by Analogy via Retrieval-Augmented Reinforcement Fine-Tuning Zilin Xiao , Qi Ma , Jason Chen , Xintao Chen , Avinash Atreya , Hanjie Chen , Vicente Ordonez July 17, 2026 Read the Paper June 05, 2026 CONVERSATIONAL AI RANKING AND RECOMMENDATIONS Superintelligent Retrieval Agent: The Next Frontier of Agentic Retrieval Zeyu Yang , Qi Ma , Jason Chen , Anshumali Shrivastava June 05, 2026 Read the Paper May 20, 2026 HUMAN & MACHINE INTELLIGENCE RESEARCH EgoBabyVLM: Benchmarking Cross-Modal Learning from Naturalistic Egocentric Video Data Dongyan Lin , Phillip Rust , Angel Villar Corrales , Alvin W. M. Tan , Mahi Luthra , Charles-Eric Saint-James , Rashel Moritz , Sheila Krogh-Jespersen , Vanessa Stark , Surya Parimi , Jiayi Shen , Youssef Benchekroun , Yosuke Higuchi , Martin Gleize , Tom Fizycki , Nicolas Hamilakis , Manel Khentout , Sho Tsuji , Balázs Kégl , Juan Pino , Michael C. Frank , Emmanuel Dupoux May 20, 2026 Read the Paper May 18, 2026 CONVERSATIONAL AI RESEARCH GIM: Evaluating models via tasks that integrate multiple cognitive domains Rohit Patel , Alexandre Rezende , Steven McClain May 18, 2026 Read the Paper See All Papers Help Us Pioneer The Future of AI We share our open source frameworks, tools, libraries, and models for everything from research exploration to large-scale production deployment. Join our Team Our approach About AI at Meta People Careers Research Infrastructure Resources Demos Meta AI Assistant Media Generation Vibes AI Studio Latest news Blog Newsletter Foundational models Llama Our approach Our approach About AI at Meta People Careers Research Research Infrastructure Resources Demos Meta AI Meta AI Assistant Media Generation Vibes AI Studio Latest news Latest news Blog Newsletter Foundational models Llama Privacy Policy Terms Cookies Meta © 2026