arXiv:2509.17489cs.CLcs.AI2025-09Conference of the …被引 1

将多智能体编程能力压缩到70亿参数小模型,准确率翻倍且速度快4倍。

MapCoder-Lite: Distilling Multi-Agent Coding into a Single Small LLM

  • 通过分步轨迹蒸馏修复格式错误,提升调试成功率。
  • 在xCodeEval上准确率从13.2%提升至28.3%,格式失败归零。
  • 适合资源有限但需高质量代码生成的开发者使用。

大语言模型已能完成单函数任务到编程竞赛题的代码生成,但现有多智能体方案要么依赖超大规模(>300亿)模型,要么在小型开源模型上失效。本文提出MapCoder-Lite框架,将复杂多智能体推理能力蒸馏至单一70亿参数模型。其创新性三支柱方法包括:(i) 强大LLM的基于轮次的轨迹蒸馏,缓解检索中的格式脆弱性并减少调试失败;(ii) 带全局反馈的监督纠正机制,强化规划与编码智能体;(iii) 智能体专属LoRA微调,实现高效记忆特化。在xCodeEval、APPS和CodeContests上的全面评估表明,MapCoder-Lite将xCodeEval准确率提升超过一倍(13.2%→28.3%),消除所有格式错误,同时相比32B模型降低4倍显存占用与生成时间,并在简单基准上实现超10%提升,证明其不仅适用于竞赛编程,更具备广泛适用性。结果表明,精心设计的智能体级微调可释放小模型的高质量多智能体编程潜力。代码已公开于https://github.com/aiha-lab/MapCoder-Lite。

原文摘要 · Abstract (English)

Large language models (LLMs) have advanced code generation from single-function tasks to competitive-programming problems, but existing multi-agent solutions either rely on costly large-scale (>30B) models or collapse when downsized to small open-source models. We present MapCoder-Lite, a framework for distilling the complex reasoning of large, multi-agent coding systems into a single 7B model. Our contribution is a novel, three-pillar methodology that synergistically generates, refines, and encodes multi-agent knowledge: (i) pass-based trajectory distillation from strong LLMs fixes format fragility in retrieval and reduces failures in debugging, (ii) supervisor-guided correction with global feedback strengthens planning and coding agents, and (iii) agent-wise LoRA fine-tuning delivers memory-efficient specialisation. Comprehensive evaluation on xCodeEval, APPS, and CodeContests shows that MapCoder-Lite more than doubles xCodeEval accuracy (from 13.2% to 28.3%), eliminates all format failures, while reducing GPU memory and token-generation time by 4x compared to a 32B model. It also achieves over 10% gains on simpler coding benchmarks, demonstrating broad improvements beyond competitive programming. These results demonstrate that careful agent-wise fine-tuning unleashes high-quality multi-agent coding on a small language model. Our code is publicly available at https://github.com/aiha-lab/MapCoder-Lite.

代码生成模型蒸馏多智能体小模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。