arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2601.15094cs.SE
收藏

代码相关任务中的参数高效多任务微调

Parameter-Efficient Multi-Task Fine-Tuning in Code-Related Tasks

William & Mary(威廉与玛丽学院)

Md Zahidul Haque, Saima Afrin, Antonio Mastropaolo

AI总结:

研究多任务QLoRA微调在代码生成、翻译和总结中的效果,发现其在1.5B、3B和7B规模上达到或优于单任务QLoRA和全微调,大模型平衡正确性与质量更佳。

摘要:

大型语言模型(LLMs)在自动化软件工程任务中表现出色,通过桥接自然语言和代码语义,在代码生成和总结方面取得了显著成果。然而,它们的规模带来了巨大的计算成本,使得完全微调不切实际。参数高效微调(PEFT)方法如QLoRA能够以更低的资源需求实现高效专业化。最近的研究表明,经过QLoRA优化的大型代码模型(LCMs)在各种任务中表现强劲,但尚不清楚当单个模型针对多个代码相关任务进行QLoRA微调时,这种有效性是否持续。多任务微调与QLoRA优化之间的相互作用,以及迁移学习如何影响生成工件的正确性和质量,在很大程度上仍未探索。我们研究了跨三个代表性任务(代码生成、翻译和总结)的多任务QLoRA微调。我们通过基于执行和基于相似性的指标评估功能正确性,并辅以全面的代码质量分析——这是先前工作中很大程度上被忽视的一个方面。我们的发现表明,多任务QLoRA有效地利用了迁移学习,在1.5B、3B和7B配置下相对于单任务QLoRA和多任务完全微调实现了竞争性或更优的性能。较大的模型在正确性和质量之间表现出更一致的平衡,而较小的模型保留了功能但出现了更多与质量相关的问题。

英文摘要:

Large Language Models (LLMs) have proven highly effective in automating software engineering tasks, bridging natural language and code semantics to achieve notable results in code generation and summarization. However, their scale incurs substantial computational costs, making full fine-tuning impractical. Parameter-Efficient Fine-Tuning (PEFT) methods like QLoRA enable efficient specialization with lower resource demands. Recent studies show QLoRA-optimized Large Code Models (LCMs) perform strongly across diverse tasks, yet it remains unclear whether this effectiveness persists when a single model is QLoRA fine-tuned for multiple code-related tasks. The interaction between Multi-task fine-tuning and QLoRA optimization, and how transfer learning affects correctness and quality of generated artifacts, remains largely unexplored. We investigate Multi-task QLoRA fine-tuning --- a representative parameter-efficient method from the LoRA family --- across three representative tasks: code generation, translation, and summarization. We evaluate functional correctness through execution-based and similarity-based metrics, complemented by comprehensive code quality analysis--an aspect largely overlooked in prior work. Our findings show that Multi-task QLoRA effectively leverages transfer learning, achieving competitive or superior performance at the 1.5B, 3B, and 7B configurations relative to both Single-task QLoRA and Multi-task full fine-tuning. Larger models demonstrate more consistent balance between correctness and quality, whereas smaller models preserve functionality but exhibit a higher incidence of quality-related issues.

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

↑