---
title: 'Code Llama: Open Foundation Models for Code'
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
license_note: 'paper is CC BY 4.0 (verified on arXiv abs page 2026-11-12; icon by-4.0.png, http://creativecommons.org/licenses/by/4.0/); note is our own summary'
source: https://iinventedlight.com/library/notes/2308-12950-code-llama.md
source_license: 'CC BY 4.0'
attribution: 'Summary by iinventedlight (AI-assisted). Source: Baptiste Rozière, Jonas Gehring, Fabian Gloeckle, and 23 coauthors (listed on the arXiv abs page), Code Llama: Open Foundation Models for Code (CC BY 4.0).'
author: 'iinventedlight (AI-assisted)'
date: 2026-11-12
status: published
approved_by: "Cole Withington, 2026-11-12 14:44 PT, Librarian chat widget t51s316: \"Yes, publish all 100 second-list arXiv notes\""
checked_on: 2026-11-12
as_of: 2026-11-12
confidence: medium
untested: 'Not reproduced. Abs page and HTML key sections read 2026-11-12. Named code URLs checked for HTTP 200; code not run.'
category: arxiv
topic_area: 'ai-research: foundations'
tags: arxiv, foundations, code-models, open-models
arxiv_id: 2308.12950
alias: 2308.12950-code-llama
sources:
  - id: S1
    title: 'Code Llama: Open Foundation Models for Code'
    publisher: arXiv
    authors: 'Baptiste Rozière, Jonas Gehring, Fabian Gloeckle, and 23 coauthors (listed on the arXiv abs page)'
    url: https://arxiv.org/abs/2308.12950
    version_read: 'v3 (31 Jan 2024)'
    accessed: 2026-11-12
    license: 'CC BY 4.0'
---
# Code Llama: Open Foundation Models for Code

## Summary
Code Llama is a family of large language models for code based on Llama 2, with foundation, Python, and Instruct variants at 7B, 13B, 34B, and 70B parameters each. All models are trained on sequences of 16k tokens and show improvements on inputs with up to 100k tokens. The authors report scores of up to 67% and 65% on HumanEval and MBPP, respectively. They release Code Llama under a permissive license that allows research and commercial use. [S1]

## Claims
- id: C1
  claim: 'Code Llama is a family of code models based on Llama 2, with 7B, 13B, 34B, and 70B variants.'
  source: S1
  evidence: "with 7B, 13B, 34B and 70B parameters each"
- id: C2
  claim: 'The authors report scores of up to 67% on HumanEval and 65% on MBPP.'
  source: S1
  evidence: "scores of up to 67% and 65% on HumanEval and MBPP, respectively"
- id: C3
  claim: 'They release Code Llama under a permissive license for research and commercial use.'
  source: S1
  evidence: "under a permissive license that allows for both research and commercial use"

## Verification
- Code available: Paper: https://github.com/facebookresearch/codellama, which returned HTTP 200 and redirected to https://github.com/meta-llama/codellama on 2026-11-12. Not run.
- Reproduced: not reproduced (2026-11-12). Code not run.
- Related work: Live notes [2307-09288-llama-2](https://iinventedlight.com/library/notes/2307-09288-llama-2/) and [2302-13971-llama](https://iinventedlight.com/library/notes/2302-13971-llama/).
- Limits: HumanEval and MBPP figures are the authors' best reported scores among the family (v3, 31 Jan 2024). The permissive license named here is the model license, not the CC BY 4.0 paper license.
- License: CC BY 4.0 on the abs page (2026-11-12; icon by-4.0.png; http://creativecommons.org/licenses/by/4.0/). Submitted 24 Aug 2023 (v1); last revised 31 Jan 2024 (v3). Sources: [S1] https://arxiv.org/abs/2308.12950, v3 (31 Jan 2024). checked_on: 2026-11-12.

## When to apply
Use when comparing open code models built on Llama 2, including infilling and long-input claims.

## Facts
- id: F1
  claim: 'Code Llama is based on Llama 2 and includes foundation, Python, and Instruct variants at 7B, 13B, 34B, and 70B.'
  confidence: medium
  date: 2026-11-12
  sources: [S1]
  license: CC BY 4.0
- id: F2
  claim: 'The authors report scores of up to 67% on HumanEval and 65% on MBPP.'
  confidence: medium
  date: 2026-11-12
  sources: [S1]
  license: CC BY 4.0
- id: F3
  claim: 'They release the models under a permissive license that allows research and commercial use.'
  confidence: medium
  date: 2026-11-12
  sources: [S1]
  license: CC BY 4.0

## Sources
- [S1] arXiv 2308.12950, https://arxiv.org/abs/2308.12950. License: CC BY 4.0. v3 (31 Jan 2024). Accessed 2026-11-12.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Paper is CC BY 4.0.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
