arXiv:2510.18779cs.CL2025-10被引 6

KAT-Coder通过多阶段训练,让代码模型在真实开发环境中更可靠地自主编程。

KAT-Coder Technical Report

  • 分四阶段训练:中期增强推理,监督微调构建万级数据集,强化微调用多真值奖励,部署适配真实IDE。
  • 在20种语言、10类上下文和10种任务中表现稳定,支持长文本推理与工具调用。
  • 适合需要高可靠性智能编程助手的开发者和研究者,模型已开源可用。

大语言模型的进步推动了自主编程代理的发展,使模型能在交互式开发流程中自主推理、规划与执行。然而,如何弥合静态文本训练与动态真实执行之间的差距仍是核心挑战。本文介绍KAT-Coder,一个通过多阶段课程训练的大规模自主编程模型,包含中期训练、监督微调(SFT)、强化微调(RFT)和强化到部署适配四个阶段。中期阶段利用真实软件工程数据与合成代理交互增强推理、规划与反思能力;SFT阶段构建了一个包含百万样本的数据集,涵盖20种编程语言、10种开发场景和10种任务类型;RFT阶段引入新颖的多真值奖励机制,实现稳定且高效的策略优化;最后的强化到部署阶段通过错误掩码微调与树状轨迹训练,将模型适配至生产级IDE环境。整体设计使KAT-Coder具备强健的工具使用可靠性、指令对齐性与长上下文推理能力,构成可落地的智能编程代理基础。我们开源了32B参数的KAT系列模型KAT-Dev,可在https://huggingface.co/Kwaipilot/KAT-Dev获取。

原文摘要 · Abstract (English)

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.

代码生成智能代理大模型训练开源模型

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