MFTCoder  by codefuse-ai

MFT framework for code LLM multitask fine-tuning (KDD 2024 paper)

Created 2 years ago
704 stars

Top 48.5% on SourcePulse

GitHubView on GitHub
Project Summary

MFTCoder is a framework for high-accuracy, efficient multi-task fine-tuning of Large Language Models (LLMs), particularly for code-related tasks. It targets researchers and developers working with code LLMs, offering a robust solution for improving model performance across diverse coding challenges through its multi-task fine-tuning approach.

How It Works

MFTCoder employs a multi-task fine-tuning (MFT) strategy to train LLMs on multiple datasets simultaneously, aiming for improved generalization and performance on unseen tasks. It supports various efficient fine-tuning techniques like LoRA, QLoRA, and full-parameter training, enabling the fine-tuning of large models with reduced computational resources. The framework also incorporates methods like Self-paced Loss and the newer Convergence Balancer (CoBa) to manage convergence across different tasks, ensuring balanced training outcomes.

Quick Start & Requirements

  • Install dependencies using bash sh init_env.sh.
  • Requires CUDA (>= 11.4, preferably 12.1) and PyTorch (>= 2.1.0).
  • Flash Attention (>= 2.3.0) is highly recommended.
  • Official quick-start details are available within the respective framework READMEs (MFTCoder-accelerate, MFTCoder-atorch).

Highlighted Details

  • Achieves state-of-the-art performance on HumanEval, with models like CodeFuse-DeepSeek-33B reaching 78.7% pass@1.
  • Supports a wide range of base models including CodeLlama, StarCoder, Qwen, Mixtral, and DeepSeek-coder.
  • Offers two training frameworks: MFTCoder-accelerate (with DeepSpeed/FSDP) and MFTCoder-atorch.
  • Released two high-quality code instruction datasets: Evol-instruction-66k and CodeExercise-Python-27k.

Maintenance & Community

The project is actively developed by the AI Native team at Ant Group, with recent updates in October 2024 introducing preference alignment methods (DPO/RPO/ORPO) and new convergence balancing techniques. The team has a strong publication record at top AI conferences.

Licensing & Compatibility

The project appears to be open-source, with models available on HuggingFace and ModelScope. Specific licensing details for the framework and models are not explicitly stated in the README, but compatibility for commercial use would require verification.

Limitations & Caveats

While the framework supports various models and fine-tuning methods, specific details on the limitations of each supported model or the exact resource requirements for full-parameter training are not elaborated. The project is actively evolving, with new features and improvements being released regularly.

Health Check
Last Commit

8 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
3 stars in the last 30 days

Explore Similar Projects

Starred by Théophile Gervet Théophile Gervet(Cofounder of Genesis AI), Jason Knight Jason Knight(Director AI Compilers at NVIDIA; Cofounder of OctoML), and
6 more.

lingua by facebookresearch

0.1%
5k
LLM research codebase for training and inference
Created 11 months ago
Updated 2 months ago
Starred by Casper Hansen Casper Hansen(Author of AutoAWQ), Yineng Zhang Yineng Zhang(Inference Lead at SGLang; Research Scientist at Together AI), and
5 more.

xtuner by InternLM

0.5%
5k
LLM fine-tuning toolkit for research
Created 2 years ago
Updated 1 day ago
Feedback? Help us improve.