OpenAI Codex 把 GPT-3 适配到代码

自然语言开始直接驱动代码生成

OpenAI 发布 Codex API 私有测试版。Codex 由 GPT-3 继续在公开代码上训练,早期 12B 版本在 HumanEval 单次采样中解出 28.8% 的题目,并为 GitHub Copilot 提供模型能力。

时间2021 年 8 月 10 日 级别A · 行业级 组织OpenAIGitHub 状态已核验 · 2 个来源
《Evaluating Large Language Models Trained on Code》论文首页
Codex 论文首页,摘要介绍了从公开 GitHub 代码微调 GPT 并以 HumanEval 衡量函数生成能力的方法。 Mark Chen 等 / arXiv

GPT-3 已经能根据提示吐出短代码,但对语言、库调用与函数意图的稳定性有限。开发者需要更专门的代码数据与产品接口。2021 年 8 月 10 日,OpenAI 发布 Codex API 私有测试版:在公开代码上继续训练的模型,支持十多种编程语言,把自然语言说明转成函数、补全代码、调用已有 API。早期 12B 版本在 HumanEval 单次采样中解出 28.8% 的题目——这个数字应被读作上限提醒,而不是“已经会写软件”。

Codex 同时为早期 GitHub Copilot 提供模型能力。产品路径比论文路径更快进入程序员视线:补全出现在编辑器光标处,而不是只存在于 API 示例。OpenAI 还展示通过代码控制游戏与应用的实验,暗示代码不仅是文本,也是可执行的行动媒介。自然语言第一次大规模地被当成编程界面的一翼。

私有测试版意味着访问受控,评测与安全讨论仍在进行。训练数据来自公开代码,也带来许可与归属的长期争议——能力发布与数据治理很少同步结算。对 2021 年的现场,更直接的变化是:AI Coding 从研究演示进入可调用接口与编辑器插件上游。

后来的同名云端 Agent 会借用 Codex 这个词,产品哲学已换代。读 2021 年的 Codex,应把它记成:自然语言到代码的专用模型,以及把“生成代码”变成日常交互的一次上游供给——分数仍低,方向已经清楚。名字会复用,日期必须核对。

HumanEval 的 28.8% 与编辑器里的“看起来能跑”并置,构成 2021 年现场的诚实张力。API 私有测试把能力交给有限开发者;Copilot 则把补全推到更广的日常。代码生成从此有了上游模型供给,也有了公开可引用的早期分数。后来所有编程 Agent 的野心,都要先经过这道并不算高的门槛。

把代码当作行动媒介,意味着生成结果可能被执行,而不只是被阅读。安全与沙箱问题因此与代码模型绑定得更早。2021 年的 Codex 还来不及长成完整 Agent,却已经把这根线牵出来。

私有测试版也意味着评测协议尚未完全公共化。28.8% 绑定当时 HumanEval 设置与单次采样;多采样与后来基准会改写观感。把 2021 年的分数直接拿来比较 2025 年的 Agent,会混淆产品世代。

GPT-3 could already emit short code from prompts, with limited stability on languages, library calls, and function intent. Developers needed more specialized code data and product interfaces. On 10 August 2021, OpenAI released the Codex API in private beta: a model further trained on public code, supporting more than a dozen languages, turning natural-language specifications into functions, completions, and calls to existing APIs. An early 12B version solved 28.8% of HumanEval with one sample—a number to read as a ceiling reminder, not “already writes software.”

Codex also supplied the model behind early GitHub Copilot. The product path reached programmers faster than papers: completions appeared at the editor cursor, not only in API samples. OpenAI further showed experiments controlling games and apps through code, hinting that code was not only text but an executable medium of action. Natural language became, at scale, one wing of the programming interface.

Private beta meant controlled access; evaluation and safety discussion continued. Training on public code also brought long-running debates over license and attribution—capability releases and data governance rarely settle on the same day. For 2021, the nearer change was simpler: AI coding moved from research demos into callable interfaces and editor-plugin supply chains.

Later cloud agents would reuse the Codex name under a different product philosophy. Read 2021 Codex as a specialized natural-language-to-code model and an upstream supply that made “generate code” a daily interaction—scores still low, direction already clear. Names get reused; dates must be checked.

HumanEval’s 28.8% set beside “looks runnable” in the editor forms the honest tension of 2021. Private-beta API access handed capability to limited developers; Copilot pushed completion into broader daily work. Code generation gained an upstream model supply and an early, citable public score. Later ambitions of coding agents all pass first through this not-very-high gate.

Treating code as a medium of action means outputs may be executed, not only read. Safety and sandbox questions therefore bind to code models earlier. 2021 Codex was not yet a full agent, but it already pulled that thread into view.

Private beta also meant evaluation protocols were not fully public. 28.8% binds to then-HumanEval settings and single-sample decoding; multi-sample and later benchmarks change the feel. Comparing 2021 scores directly to 2025 agents confuses product generations.

展开完整事件档案人物、主题、模型与产品
人物
模型
openai-codex
产品
github-copilot
来源

原始资料

  1. 01OpenAI CodexOpenAI · official
  2. 02Evaluating Large Language Models Trained on CodeOpenAI · paper

试试搜索