多智能体协作提升代码大模型跨语言指令微调效果
Multi-Agent Collaboration for Multilingual Code Instruction Tuning
- 构建多语言智能体协同框架,通过生成记忆实现跨语言知识迁移
- 在多语言编程基准上,Qwen2.5-xCoder展现更强的通用知识共享能力
- 适合研究多语言代码生成与跨语言知识迁移的开发者和研究人员
近年来,代码大模型在高质量指令数据上微调后展现出强大的代码理解与生成能力。然而,以往方法多将各编程语言孤立处理,忽视语言间知识迁移。为弥合不同语言间的差距,我们提出一种新型多智能体协作框架,用于增强代码大模型的多语言指令微调。该框架中,多个具备生成记忆的语言专用智能体协同工作,高效传递知识。首先从代码片段生成语言特定指令数据,作为各智能体的种子数据;随后,智能体通过讨论协作生成新指令及其对应解法(可为新或已有编程语言)。为促进跨语言迁移,每个智能体存储生成历史作为记忆,并总结自身优劣。最终,高质量的多语言指令数据被用于训练 Qwen2.5-xCoder。在多语言编程基准上的实验表明,该模型在共享通用知识方面表现优异,显著缩小了跨语言差距。
原文摘要 · Abstract (English)
Recent advancement in code understanding and generation demonstrates that code LLMs fine-tuned on a high-quality instruction dataset can gain powerful capabilities to address wide-ranging code-related tasks. However, most previous existing methods mainly view each programming language in isolation and ignore the knowledge transfer among different programming languages. To bridge the gap among different programming languages, we introduce a novel multi-agent collaboration framework to enhance multilingual instruction tuning for code LLMs, where multiple language-specific intelligent agent components with generation memory work together to transfer knowledge from one language to another efficiently and effectively. Specifically, we first generate the language-specific instruction data from the code snippets and then provide the generated data as the seed data for language-specific agents. Multiple language-specific agents discuss and collaborate to formulate a new instruction and its corresponding solution (A new programming language or existing programming language), To further encourage the cross-lingual transfer, each agent stores its generation history as memory and then summarizes its merits and faults. Finally, the high-quality multilingual instruction data is used to encourage knowledge transfer among different programming languages to train Qwen2.5-xCoder. Experimental results on multilingual programming benchmarks demonstrate the superior performance of Qwen2.5-xCoder in sharing common knowledge, highlighting its potential to reduce the cross-lingual gap.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。