KAT-Coder 技术报告
KAT-Coder Technical Report
AI总结:
本文提出大规模智能体代码模型 KAT-Coder,通过涵盖中期训练、SFT、RFT 及强化到部署适应的多阶段课程,解决了静态训练与动态执行间的差距,实现了稳健的工具使用、指令对齐与长上下文推理,为真实世界智能编码智能体奠定可部署基础。
摘要:
大型语言模型(LLMs)的近期进展推动了智能体编码领域的进步,在这些工作流中,模型能够自主地在交互式软件开发流程中进行推理、规划和行动。然而,弥合基于静态文本的训练与动态真实世界智能体执行之间的差距仍然是一项核心挑战。在本技术报告中,我们提出了 KAT-Coder,这是一个通过多阶段课程训练的大规模智能体代码模型,课程涵盖中期训练、监督微调(SFT)、强化微调(RFT)以及强化到部署的适应。中期阶段通过真实软件工程数据语料库和合成智能体交互来增强推理、规划和反思能力。SFT 阶段构建了一个平衡二十种编程语言、十种开发上下文和十种任务原型的百万样本数据集。RFT 阶段引入了一种新颖的多真值奖励公式,用于实现稳定且样本高效的策略优化。最后,强化到部署阶段使用错误掩码 SFT 和树结构轨迹训练,使模型适应生产级 IDE 环境。总之,这些阶段使 KAT-Coder 能够实现稳健的工具使用可靠性、指令对齐和长上下文推理,为真实世界的智能编码智能体奠定了可部署的基础。我们的 KAT 系列 32B 模型 KAT-Dev 已在 https://huggingface.co/Kwaipilot/KAT-Dev 开源。
英文摘要:
Recent advances in large language models (LLMs) have enabled progress in agentic coding, where models autonomously reason, plan, and act within interactive software development workflows. However, bridging the gap between static text-based training and dynamic real-world agentic execution remains a core challenge. In this technical report, we present KAT-Coder, a large-scale agentic code model trained through a multi-stage curriculum encompassing Mid-Term Training, Supervised Fine-Tuning (SFT), Reinforcement Fine-Tuning (RFT), and Reinforcement-to-Deployment Adaptation. The Mid-Term stage enhances reasoning, planning, and reflection capabilities through a corpus of real software engineering data and synthetic agentic interactions. The SFT stage constructs a million-sample dataset balancing twenty programming languages, ten development contexts, and ten task archetypes. The RFT stage introduces a novel multi-ground-truth reward formulation for stable and sample-efficient policy optimization. Finally, the Reinforcement-to-Deployment phase adapts the model to production-grade IDE environments using Error-Masked SFT and Tree-Structured Trajectory Training. In summary, these stages enable KAT-Coder to achieve robust tool-use reliability, instruction alignment, and long-context reasoning, forming a deployable foundation for real-world intelligent coding agents. Our KAT series 32B model, KAT-Dev, has been open-sourced on https://huggingface.co/Kwaipilot/KAT-Dev.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。