Papers74°

微软论文:单一模型统一 Copilot 代码补全与编辑,输出 token 减少 58.93%

Why we picked it

Copilot 把 3 个模型砍成 1 个,建议全用 diff patch 表示,token 少了 58.93% 还更快。做编程工具或 agent 输出设计的开发者能直接抄这套架构。

微软在一篇新论文中介绍,将 GitHub Copilot 原本按固定顺序调用 3 个独立模型的架构(代码补全、邻近行编辑、远距离编辑),合并为一个统一模型。该模型将每个建议输出为一组 diff patch,每个 patch 标明编辑位置和内容,多条编辑可合并在一次响应中,后续编辑从缓存读取。

Body

在线上 A/B 测试中,第一个合并版模型将首屏展示时间缩短 6.77%,输出 token 减少 58.93%,且质量无可测损失。最终 3-in-1 模型单独上线时被用户拒绝的建议率上升 12.24%,但配合客户端改动后转为下降 10.06%。

对做 AI 编程工具的团队来说,这篇论文给出了一个具体可复用的工程模式:用 diff patch 作为统一输出格式替代多模型流水线,同时借助缓存降低多次编辑的推理成本。

Original · rohanpaul_ai

New Microsoft paper shows that a single model can handle code completion, nearby edits, and far-away edits in Copilot by writing every suggestion as a diff patch. And cuts output tokens by 58.93% with no measurable quality loss.

Copilot used to call separate models for completing code, editing nearby lines, and editing far away, in a fixed order. That cost several model calls per suggestion.

They trained 1 model that outputs a list of diff patches, each saying where to edit and what to change. Several edits fit in 1 response, so later ones come from a cache.

In live A/B tests against the 3-model setup, the 1st merged model cut time to display by 6.77% and output tokens by 58.93%. The final 3-in-1 model alone raised dismissed suggestions by 12.24%, but client changes turned that into a 10.06% drop.

Industry Coordinates & Source Verification

This report is categorized under AITOP's "Papers" desk, focusing on US frontier AI labs and Silicon Valley technology leaders. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows and US-China foundation model benchmarks and commercialization comparison. Key entities and technical topics under continuous tracking include GitHub Copilot, Microsoft, diff patch, coding assistants.

Source attribution: curated from rohanpaul_ai (@rohanpaul_ai).