CRPE提升大模型代码生成的推理能力,让代码生成更准确。
CRPE: Expanding The Reasoning Capability of Large Language Model for Code Generation
- 分三阶段构建数据与训练框架,增强模型代码推理能力
- 7B和32B模型在LiveCodeBench上分别达到21.88%和35.08%通过率
- 开源全流程方法,适合追求代码生成性能的研究者使用
我们提出CRPE(Code Reasoning Process Enhancer),一种创新的三阶段数据合成与模型训练框架,旨在提升大语言模型(LLMs)在代码生成任务中的分析与逻辑推理能力。基于现有System-1模型,CRPE解决了增强模型代码推理能力的根本挑战。该框架提供了一种方法严谨且可实施的路径,用于培养语言模型的高级代码推理能力。通过应用CRPE,我们成功构建了改进版COT-Coder,在代码生成任务中表现显著提升。在LiveCodeBench(20240701-20240901)上的评估显示,基于Qwen2.5-Coder-7B-Base的COT-Coder-7B-StepDPO模型,其pass@1准确率为21.88%,优于同类或更大规模的模型。此外,基于Qwen2.5-Coder-32B-Base的COT-Coder-32B-StepDPO模型,其pass@1准确率达35.08%,超越GPT4O。整体而言,CRPE是一个完整的、开源的方法,涵盖从指令数据获取、专家级代码推理数据合成到自主推理增强机制的全流程。
原文摘要 · Abstract (English)
We introduce CRPE (Code Reasoning Process Enhancer), an innovative three-stage framework for data synthesis and model training that advances the development of sophisticated code reasoning capabilities in large language models (LLMs). Building upon existing system-1 models, CRPE addresses the fundamental challenge of enhancing LLMs' analytical and logical processing in code generation tasks. Our framework presents a methodologically rigorous yet implementable approach to cultivating advanced code reasoning abilities in language models. Through the implementation of CRPE, we successfully develop an enhanced COT-Coder that demonstrates marked improvements in code generation tasks. Evaluation results on LiveCodeBench (20240701-20240901) demonstrate that our COT-Coder-7B-StepDPO, derived from Qwen2.5-Coder-7B-Base, with a pass@1 accuracy of 21.88, exceeds all models with similar or even larger sizes. Furthermore, our COT-Coder-32B-StepDPO, based on Qwen2.5-Coder-32B-Base, exhibits superior performance with a pass@1 accuracy of 35.08, outperforming GPT4O on the benchmark. Overall, CRPE represents a comprehensive, open-source method that encompasses the complete pipeline from instruction data acquisition through expert code reasoning data synthesis, culminating in an autonomous reasoning enhancement mechanism.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。