构建真实编程场景的评估基准,发现开源模型在人类偏好对齐上仍落后于闭源模型。
Evaluating and Aligning CodeLLMs on Human Preference
- 构建涵盖40类、44语言的397个真实用户查询的CodeArena评估集
- 合成200亿词的SynCode-Instruct数据集,使Qwen2.5-SynCoder达开源顶尖水平
- 实证显示开源与闭源代码模型在人类偏好对齐上存在显著差距
代码大语言模型(codeLLMs)在代码生成方面已取得显著进展。现有大多数代码相关基准测试仅包含编程练习及对应测试用例,主要用于衡量模型生成正确代码的能力,却忽视了与人类偏好的对齐——即问题应源自实际应用场景,生成结果需符合人类偏好。为弥合模型输出与人类偏好之间的差距,我们构建了一个严谨的人工标注基准CodeArena,其包含397个高质量样本,覆盖40个类别和44种编程语言,均来自真实用户查询。同时,我们通过扩展网站指令构建了规模近200亿词的多样化合成指令语料库SynCode-Instruct,用于验证大规模合成指令微调的有效性;仅使用合成指令数据训练的Qwen2.5-SynCoder已达到开源代码模型的顶尖性能。实验表明,基于执行结果的基准与CodeArena之间存在性能差异。在40多个LLM上的系统性实验揭示了当前开源顶级代码模型(如Qwen2.5-Coder)与专有模型(如OpenAI o1)之间在人类偏好对齐上的显著差距,凸显了该方向的重要性。
原文摘要 · Abstract (English)
Code large language models (codeLLMs) have made significant strides in code generation. Most previous code-related benchmarks, which consist of various programming exercises along with the corresponding test cases, are used as a common measure to evaluate the performance and capabilities of code LLMs. However, the current code LLMs focus on synthesizing the correct code snippet, ignoring the alignment with human preferences, where the query should be sampled from the practical application scenarios and the model-generated responses should satisfy the human preference. To bridge the gap between the model-generated response and human preference, we present a rigorous human-curated benchmark CodeArena to emulate the complexity and diversity of real-world coding tasks, where 397 high-quality samples spanning 40 categories and 44 programming languages, carefully curated from user queries. Further, we propose a diverse synthetic instruction corpus SynCode-Instruct (nearly 20B tokens) by scaling instructions from the website to verify the effectiveness of the large-scale synthetic instruction fine-tuning, where Qwen2.5-SynCoder totally trained on synthetic instruction data can achieve top-tier performance of open-source code LLMs. The results find performance differences between execution-based benchmarks and CodeArena. Our systematic experiments of CodeArena on 40+ LLMs reveal a notable performance gap between open SOTA code LLMs (e.g. Qwen2.5-Coder) and proprietary LLMs (e.g., OpenAI o1), underscoring the importance of the human preference alignment.\footnote{\url{https://codearenaeval.github.io/ }}
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。