Papers

aiXcoder 发布 aiXapply:4B 专用模型处理代码合并任务

AiXapply: Fast and Reliable Full-File Code Integration with Specialized Small Models for IDE Workflows

Why we picked it

aiXcoder 训了个 4B 小模型专门干代码合并这件事,准确率超过 Deepseek-V3.2,延迟从 50 秒砍到 1.89 秒,已经在他们 IDE 插件里跑起来了。

aiXcoder 将代码合并(Apply)任务形式化:给定原文件和更新片段,输出完整的合并文件。团队用真实 commit 构建多语言数据集,经 SFT 和 GRPO 强化学习训练出 4B 模型 aiXapply,监督版本在语言感知对比下达到 94.4% 准确率,超过 Deepseek-V3.2 基线的 91.6%。通过投机解码,aiXapply-RL 在单张 A100 上达到约 2700 tokens/s,延迟比 API 调用 Deepseek-V3.2 低约 75 倍。该模型已作为独立 Apply 服务部署在 aiXcoder IDE 插件中,把平均 Apply 延迟从 50 秒降到 1.89 秒,并可节省 20% 的上游机器成本。

Original · arXiv: DeepSeek

AiXapply: Fast and Reliable Full-File Code Integration with Specialized Small Models for IDE Workflows

Large language models increasingly assist developers by proposing small code edits, yet reliably integrating a partial update snippet into an existing file while preserving unrelated content remains poorly supported by current code-generation workflows. We formalize the Code Integration (Apply) task as follows: given an original file and an update snippet, the system must produce the complete merged file while preserving all content outside the requested edit. We construct a high-quality multi-language dataset from real commits via a structured pipeline that converts code changes into update snippets paired with full-file ground truth and enforces consistency through verification and filtering. We then train a specialized 4B model, aiXapply, using supervised fine-tuning and reinforcement learning (GRPO). The supervised variant achieves 94.4% accuracy under our language-aware comparison, surpassing a strong large-model (Deepseek-V3.2) baseline (91.6%). Speculative decoding enables aiXapply-RL to reach $\sim$2700 tokens/s on a single A100 in a decoding subset; on the full benchmark, it achieves roughly 75$\times$ lower latency than the API-served Deepseek-V3.2 baseline. We further conduct an industrial deployment of aiXapply-RL in the aiXcoder IDE plugin as a dedicated Apply service, reducing mean Apply latency from 50 seconds to 1.89 seconds by offloading full-file generation from the upstream large model. Under time-based capacity planning, replacing one of five upstream serving instances would save 20% of upstream machine cost before the additional shared A100 service cost. Overall, our results demonstrate that treating code integration as a standalone task enables small models to achieve high accuracy, practical efficiency, and concrete industrial benefits in real-world IDE workflows where latency, cost and privacy are critical.