ChatPaper.aiChatPaper

MFTCoder: マルチタスクファインチューニングによるコードLLMの強化

MFTCoder: Boosting Code LLMs with Multitask Fine-Tuning

November 4, 2023
著者: Bingchang Liu, Chaoyu Chen, Cong Liao, Zi Gong, Huan Wang, Zhichao Lei, Ming Liang, Dajun Chen, Min Shen, Hailian Zhou, Hang Yu, Jianguo Li
cs.AI

要旨

コードLLMは、事前学習済みモデルのファインチューニングを通じてモデルのコーディング能力を向上させることに特化した研究分野として台頭してきました。従来のファインチューニング手法は、特定の下流タスクやシナリオに合わせて個別に調整されることが一般的であり、各タスクごとに別々のファインチューニングが必要で、膨大なトレーニングリソースを要し、デプロイメントやメンテナンスの面で課題を抱えていました。さらに、これらの手法は、異なるコード関連タスク間の内在的な相互関連性を活用することに失敗していました。これらの制限を克服するため、我々は複数のタスクを同時並行でファインチューニング可能なマルチタスクファインチューニングフレームワーク、MFTcoderを提案します。様々な損失関数を組み込むことで、データの不均衡、難易度のばらつき、収束速度の不一致といったマルチタスク学習における共通の課題を効果的に解決します。大規模な実験により、我々のマルチタスクファインチューニング手法が、単一タスクでの個別ファインチューニングや、タスクの混合アンサンブルでのファインチューニングを上回ることが確かめられました。さらに、MFTcoderは、効率的なデータトークン化モードやPEFTファインチューニングを含む効率的なトレーニング機能を提供し、従来のファインチューニング手法と比較して大幅な速度向上を実現しています。MFTcoderは、CodeLLamaやQwenなど、いくつかの主流のオープンソースLLMとシームレスに統合されます。CodeLLama基盤を活用した我々のMFTcoderファインチューニングモデル、CodeFuse-CodeLLama-34Bは、HumaneEvalベンチマークで74.4%のpass@1スコアを達成し、GPT-4の性能(67%、ゼロショット)を上回りました。MFTCoderはhttps://github.com/codefuse-ai/MFTCOderでオープンソース化されています。
English
Code LLMs have emerged as a specialized research field, with remarkable studies dedicated to enhancing model's coding capabilities through fine-tuning on pre-trained models. Previous fine-tuning approaches were typically tailored to specific downstream tasks or scenarios, which meant separate fine-tuning for each task, requiring extensive training resources and posing challenges in terms of deployment and maintenance. Furthermore, these approaches failed to leverage the inherent interconnectedness among different code-related tasks. To overcome these limitations, we present a multi-task fine-tuning framework, MFTcoder, that enables simultaneous and parallel fine-tuning on multiple tasks. By incorporating various loss functions, we effectively address common challenges in multi-task learning, such as data imbalance, varying difficulty levels, and inconsistent convergence speeds. Extensive experiments have conclusively demonstrated that our multi-task fine-tuning approach outperforms both individual fine-tuning on single tasks and fine-tuning on a mixed ensemble of tasks. Moreover, MFTcoder offers efficient training capabilities, including efficient data tokenization modes and PEFT fine-tuning, resulting in significantly improved speed compared to traditional fine-tuning methods. MFTcoder seamlessly integrates with several mainstream open-source LLMs, such as CodeLLama and Qwen. Leveraging the CodeLLama foundation, our MFTcoder fine-tuned model, CodeFuse-CodeLLama-34B, achieves an impressive pass@1 score of 74.4\% on the HumaneEval benchmark, surpassing GPT-4 performance (67\%, zero-shot). MFTCoder is open-sourced at https://github.com/codefuse-ai/MFTCOder
PDF111December 15, 2024