---
{
  "availableLangs": [
    "zh"
  ],
  "categories": [
    "category-science-technology"
  ],
  "createdAt": "2026-11-10T15:05:22+08:00",
  "fallback": true,
  "id": "work_code_llama",
  "lang": "nl",
  "revision": 1,
  "slug": "code-llama",
  "sourceLang": "zh",
  "sources": [
    {
      "id": "s1",
      "title": "Introducing Code Llama, a state-of-the-art large language model for coding — Meta AI",
      "url": "https://ai.meta.com/blog/code-llama-large-language-model-coding/"
    },
    {
      "id": "s2",
      "title": "Introducing Code Llama, an AI Tool for Coding — Meta",
      "url": "https://about.fb.com/news/2023/08/code-llama-ai-for-coding/"
    },
    {
      "id": "s3",
      "title": "Code Llama: Open Foundation Models for Code — arXiv:2308.12950",
      "url": "https://arxiv.org/pdf/2308.12950"
    },
    {
      "id": "s4",
      "title": "Code Llama — Hugging Face",
      "url": "https://huggingface.co/codellama"
    }
  ],
  "status": "published",
  "summary": "Code Llama 是 Meta 于 2023 年 8 月 24 日发布的代码特化大模型，是 Llama 2 的代码衍生系列。",
  "tags": [],
  "title": "Code Llama",
  "type": "work",
  "updatedAt": "2026-11-10T15:05:22+08:00",
  "updatedBy": "user:admin",
  "workKind": "ai_model"
}
---

# Code Llama

Code Llama 是 Meta 于 2023 年 8 月 24 日发布的代码特化大模型，是 Llama 2 的代码衍生系列。

Code Llama 是 Meta 于 2023 年 8 月 24 日发布的代码特化大模型，是 Llama 2 的代码衍生系列。[^s1]

## 发布背景
发布时上下文窗口为100K tokens。[^s1]
Meta 官方定性为 Llama 2 的代码特化版本，由 Llama 2 在代码数据集上继续训练而成，但有独立博客、论文、模型卡与 GitHub 仓库[^s1]

## 定价与获取
开源权重，沿用 Llama 2 社区许可，可免费用于研究与商业用途；训练序列为 16K tokens，官方称在最长 100K tokens 输入上仍有改进，7B/13B 基础版与 Instruct 版支持代码填空。[^s1]

## 性能表现
以下为Meta公布的自家评测结果，尚未经独立复现。[^s1]
- HumanEval：53.7% pass@1（Code Llama 34B）（高于 Llama 2，与 GPT-3.5（48.1%）相当）[^s1]
- MBPP：56.2% pass@1（Code Llama 34B）（为当时公开模型中最高之一）[^s1]
- HumanEval：67.8% pass@1（Code Llama 70B-Instruct）（略高于 GPT-4 的 67.0%）[^s1]
- MBPP：65.6% pass@1（Code Llama 70B-Python）（为该系列最高 MBPP 分数）[^s1]

## 主要特点
- 版本线为 7B/13B/34B（2023-08-24）及 70B（2024-01-29），每尺寸分基础版、Code Llama - Python 与 Code Llama - Instruct 三种变体[^s1]

## 定位与后续
Llama 2 的代码特化衍生系列，定位为开源代码生成与补全模型，后继为 Llama 3 及后续世代内置的更强代码能力，无独立的 Code Llama 3 续作。 其基础模型为[Llama 2](/nl/works/llama-2.html)。[^s1]

更新时间：2026-11-10

## 标签


## 关系


第 1 / 1 页，共 1 条。

## 来源

- Introducing Code Llama, a state-of-the-art large language model for coding — Meta AI：https://ai.meta.com/blog/code-llama-large-language-model-coding/ 
- Introducing Code Llama, an AI Tool for Coding — Meta：https://about.fb.com/news/2023/08/code-llama-ai-for-coding/ 
- Code Llama: Open Foundation Models for Code — arXiv:2308.12950：https://arxiv.org/pdf/2308.12950 
- Code Llama — Hugging Face：https://huggingface.co/codellama 
