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