Code Llama:用于代码的开放基础模型

Code Llama: Open Foundation Models for Code

Aaron Grattafiori Aaron Grattafiori · Meta AI · 2023-08-24 · arXiv:2308.12950 ↗ · 被引 3301

打开互动全文版(逐段中英对照 + 图/公式 + 论文问答)→

摘要 · Abstract

我们发布了 Code Llama,这是一个基于 Llama 2 的代码大语言模型家族,在开放模型中提供了最先进的性能,具备填充能力、支持大输入上下文以及零样本指令跟随能力,适用于编程任务。我们提供了多种版本以覆盖广泛的应用场景:基础模型(Code Llama)、Python 专用版(Code Llama - Python)和指令跟随模型(Code Llama - Instruct),每个版本分别有 7B、13B、34B 和 70B 参数。所有模型均在 16k token 的序列上训练,并在高达 100k token 的输入上表现出改进。7B、13B 和 70B 的 Code Llama 和 Code Llama - Instruct 变体支持基于周围内容的填充。Code Llama 在多个代码基准测试中达到了开放模型中的最先进性能,在 HumanEval 和 MBPP 上分别取得了高达 67% 和 65% 的分数。值得注意的是,Code Llama - Python 7B 在 HumanEval 和 MBPP 上超越了 Llama 2 70B,并且我们所有的模型在 MultiPL-E 上均优于其他所有公开可用的模型。我们以允许研究和商业使用的宽松许可证发布 Code Llama。

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, 34B and 70B parameters each. All models are trained on sequences of 16k tokens and show improvements on inputs with up to 100k tokens. 7B, 13B and 70B 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 67% and 65% 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.

核心贡献 · Key contributions

局限 · Limitations

论文章节 · Sections(共 16)

阅读逐段中英对照全文 →