arXiv:2410.00558cs.CLcs.AI2024-10EMNLP被引 1

通过模块化进化提升代码生成大模型的知识蒸馏效果

AMR-Evol: Adaptive Modular Response Evolution Elicits Better Knowledge Distillation for Large Language Models in Code Generation

  • 将复杂响应拆解为模块,再自适应演化优化
  • HumanEval-Plus提升3.0+,MBPP-Plus提升1.0+
  • 适合追求高质量代码生成的开源模型开发者

GPT4等专有大语言模型在代码生成上表现卓越,促使开源模型通过知识蒸馏(如Code Evol-Instruct)复现其能力。然而,现有方法过度依赖教师模型直接蒸馏响应,忽视响应质量,尤其在复杂指令下会降低合成数据质量,影响蒸馏效果。为此,本文提出自适应模块化响应进化(AMR-Evol)框架,采用两阶段策略:第一阶段模块分解,将原始响应拆分为可管理子模块;第二阶段自适应响应演化,基于相关功能模块自动优化响应。在HumanEval、MBPP和EvalPlus三个主流代码基准上的实验表明,该框架优于基线蒸馏方法。与训练数据规模相近的开源Code LLM相比,HumanEval-Plus性能提升超过3.0点,MBPP-Plus提升1.0点,验证了框架的有效性。代码已开源:https://github.com/ChiYeungLaw/AMR-Evol。

原文摘要 · Abstract (English)

The impressive performance of proprietary LLMs like GPT4 in code generation has led to a trend to replicate these capabilities in open-source models through knowledge distillation (e.g. Code Evol-Instruct). However, these efforts often neglect the crucial aspect of response quality, relying heavily on teacher models for direct response distillation. This paradigm, especially for complex instructions, can degrade the quality of synthesized data, compromising the knowledge distillation process. To this end, our study introduces the Adaptive Modular Response Evolution (AMR-Evol) framework, which employs a two-stage process to refine response distillation. The first stage, modular decomposition, breaks down the direct response into more manageable sub-modules. The second stage, adaptive response evolution, automatically evolves the response with the related function modules. Our experiments with three popular code benchmarks (HumanEval, MBPP, and EvalPlus) attest to the superiority of the AMR-Evol framework over baseline response distillation methods. By comparing with the open-source Code LLMs trained on a similar scale of data, we observed performance enhancements: more than +3.0 points on HumanEval-Plus and +1.0 points on MBPP-Plus, which underscores the effectiveness of our framework. Our codes are available at https://github.com/ChiYeungLaw/AMR-Evol.

代码生成知识蒸馏大模型

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