评估基于代码训练的大型语言模型

Evaluating Large Language Models Trained on Code

杰里·特沃雷克 Jerry Tworek · OpenAI · 2021-07-07 · arXiv:2107.03374 ↗ · 被引 10351

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

摘要 · Abstract

我们介绍了 Codex,一个在 GitHub 公开代码上微调的 GPT 语言模型,并研究了其 Python 代码编写能力。Codex 的一个特定生产版本为 GitHub Copilot 提供支持。在 HumanEval(我们发布的一个新评估集,用于衡量从文档字符串合成程序的函数正确性)上,我们的模型解决了 28.8%的问题,而 GPT-3 解决了 0%,GPT-J 解决了 11.4%。此外,我们发现从模型中重复采样是一种出奇有效的策略,可以为困难的提示生成可行的解决方案。使用这种方法,我们在每个问题采样 100 次的情况下解决了 70.2%的问题。对模型的仔细研究揭示了其局限性,包括难以处理描述长操作链的文档字符串以及将操作绑定到变量。最后,我们讨论了部署强大代码生成技术的潜在更广泛影响,涵盖安全性、安全性和经济学。

We introduce Codex, a GPT language model fine-tuned on publicly available code from GitHub, and study its Python code-writing capabilities. A distinct production version of Codex powers GitHub Copilot. On HumanEval, a new evaluation set we release to measure functional correctness for synthesizing programs from docstrings, our model solves 28.8% of the problems, while GPT-3 solves 0% and GPT-J solves 11.4%. Furthermore, we find that repeated sampling from the model is a surprisingly effective strategy for producing working solutions to difficult prompts. Using this method, we solve 70.2% of our problems with 100 samples per problem. Careful investigation of our model reveals its limitations, including difficulty with docstrings describing long chains of operations and with binding operations to variables. Finally, we discuss the potential broader impacts of deploying powerful code generation technologies, covering safety, security, and economics.

核心贡献 · Key contributions

局限 · Limitations

论文章节 · Sections(共 32)

阅读逐段中英对照全文 →