Mellum:面向多文件项目理解的 JetBrains IDE 生产级上下文代码补全
Mellum: Production-Grade in-IDE Contextual Code Completion with Multi-File Project Understanding
AI总结:
本文提出 Mellum 系列 40 亿参数代码补全模型,通过数据整理、分阶段训练和项目上下文感知,在 JetBrains IDE 中实现生产级多文件代码补全,并开源发布。
摘要:
我们提出了 Mellum 模型系列,这是一组为在 JetBrains IDE 中交互式使用而设计的开放权重代码补全模型。Mellum 模型拥有 40 亿参数,采用 Llama 风格架构,并在约 4 万亿个令牌的宽松许可、多语言代码数据上进行了预训练。我们的研究表明:(i)精心的数据整理和分阶段训练显著提高了模型质量;(ii)诸如上下文打包等编辑器关键能力对于高质量建议是必需的;(iii)一个紧凑、任务聚焦的模型能够满足交互式补全的成本和延迟约束。在本文中,我们描述了一个用于生成上下文化的编辑器内补全的端到端工业流水线:包括规范的数据治理、包含填充中间部分和通过监督微调引入项目上下文的多阶段训练,以及利用真实世界场景反馈通过直接偏好优化进行的对齐。我们的质量评估包括大规模离线基准测试和来自 JetBrains IDE 生产部署的在线遥测。Mellum 模型在 HuggingFace 上以 Apache-2.0 许可证发布,并附带一个公开的模型卡,为从业者提供可复现的参考。我们的经验为将聚焦的开放模型从研究原型扩展到面向数十万用户的大规模生产提供了一个务实的蓝图。
英文摘要:
We present the Mellum models family, open-weight code completion models designed for interactive use in JetBrains IDEs. Mellums have 4B parameters, adopt a Llama-style architecture, and are pre-trained on ~4T tokens of permissively licensed, multi-language code. Our studies show that (i) careful data curation and staged training significantly improve the model's quality, (ii) editor-critical capabilities such as context packing are necessary for high-quality suggestions, and (iii) a compact, task-focused model can meet the cost and latency constraints of interactive completion. In the paper, we describe an end-to-end industrial pipeline for producing contextualized in-editor completion: disciplined data governance, multi-stage training that includes fill-in-the-middle and project context via supervised fine-tuning, and alignment via direct preference optimization using feedback from real-world scenarios. Our quality evaluations include both large-scale offline benchmarks and online telemetry from production deployments in JetBrains IDEs. Mellums are released under the Apache-2.0 license on HuggingFace, with a public model card providing a reproducible reference for practitioners. Our experience offers a pragmatic blueprint for taking a focused, open model from a research prototype to at scale production for hundreds of thousands of users.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。