arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.21115cs.CLcs.AI
收藏

多任务代码LLM:数据混合还是模型合并?

Multi-task Code LLMs: Data Mix or Model Merge?

Rensselaer Polytechnic Institute(拉特格斯理工学院);IBM Research(IBM研究院)

Mingzhi Zhu, Boris Sobolev, Rahul Krishna, Raju Pavuluri, Stacy Patterson, Michele Merler

AI总结:

本研究比较了数据混合与模型合并在多任务代码LLM中的效果,发现模型合并在大模型规模下表现更优,而数据混合在小规模更有效,为资源受限场景提供了高效解决方案。

摘要:

近期研究倡导在智能体框架中部署较小的、专门化的代码LLM与前沿模型相结合,引发了对在性能、约束和成本之间取得平衡的高效多任务学习策略的兴趣。我们比较了创建小型多任务代码LLM的两种方法:数据混合与模型合并。我们对两个模型家族(Qwen Coder和DeepSeek Coder)在两个规模(2B和7B参数)上进行了广泛实验,对它们进行微调以进行代码生成和代码摘要任务。我们在HumanEval、MBPP和CodeXGlue基准测试中评估发现,模型合并在较大规模上在模型家族中表现最佳,保留了96%的专门模型在代码生成任务中的性能,同时保持了摘要能力。值得注意的是,合并模型甚至可以超越单独微调的模型,我们的最佳配置Qwen Coder 2.5 7B模型在HumanEval上达到92.7%的Pass@1,相比其任务特定微调等效模型的90.9%。在较小的规模上,我们发现数据混合是更受欢迎的策略。我们进一步引入了一种权重分析技术来理解不同任务如何影响模型参数及其对合并策略的影响。结果表明,精心设计的合并和混合策略可以有效地结合任务特定的能力,而不会显著降低性能,使其成为资源受限部署场景的理想选择。

英文摘要:

Recent research advocates deploying smaller, specialized code LLMs in agentic frameworks alongside frontier models, sparking interest in efficient strategies for multi-task learning that balance performance, constraints, and costs. We compare two approaches for creating small, multi-task code LLMs: data mixing versus model merging. We conduct extensive experiments across two model families (Qwen Coder and DeepSeek Coder) at two scales (2B and 7B parameters), fine-tuning them for code generation and code summarization tasks. Our evaluation on HumanEval, MBPP, and CodeXGlue benchmarks reveals that model merging achieves the best overall performance at larger scale across model families, retaining 96% of specialized model performance on code generation tasks while maintaining summarization capabilities. Notably, merged models can even surpass individually fine-tuned models, with our best configuration of Qwen Coder 2.5 7B model achieving 92.7% Pass@1 on HumanEval compared to 90.9% for its task-specific fine-tuned equivalent. At a smaller scale we find instead data mixing to be a preferred strategy. We further introduce a weight analysis technique to understand how different tasks affect model parameters and their implications for merging strategies. The results suggest that careful merging and mixing strategies can effectively combine task-specific capabilities without significant performance degradation, making them ideal for resource-constrained deployment scenarios.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑