跳到正文
Rohan Paul· @rohanpaul_ai · X·AI 评分54

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

AI 导读

Microsoft Code|AI 和 VS Code 团队的论文提出用单一模型统一处理 GitHub Copilot 的代码补全、邻近编辑和远距离编辑,把每个建议输出为带锚点的 diff patch,一次响应可含多个编辑,后续编辑由客户端缓存提供。

正文 · 原文

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.

来源:Rohan Paul · x.com