Fine-tune, align, evaluate, quantize and deploy 600+ LLMs and 400+ multimodal models
open sourceApache-2.0free
ms-swift (SWIFT) is the ModelScope community's framework for training and deploying large language models and multimodal models. It covers pre-training, full-parameter and LoRA fine-tuning, preference alignment (DPO, KTO, ORPO, SimPO and others), GRPO-family reinforcement learning, and embedding, reranker and classification training, for 600+ text models and 400+ multimodal models such as Qwen, DeepSeek, GLM, InternLM and Llama. It trains across GPUs with DeepSpeed ZeRO, FSDP and Megatron parallelism (Megatron-SWIFT, strongest for mixture-of-experts models), quantizes with GPTQ, AWQ, BNB and FP8, and runs inference, evaluation and deployment through vLLM, SGLang and LMDeploy. It has a CLI (swift sft, swift rlhf, swift infer), a Python API and a Gradio web UI.
Problems it solves
- fine-tune Qwen or DeepSeek on my own dataset with LoRA
- train a model with GRPO reinforcement learning across several GPUs
- quantize and serve a fine-tuned model behind an API
Features
- full-parameter and LoRA fine-tuning of 600+ LLMs and 400+ multimodal models
- DPO, KTO, ORPO, SimPO and reward model training
- GRPO, DAPO, GSPO and other RL algorithms
- Megatron parallelism for MoE models
- DeepSpeed ZeRO and FSDP distributed training
- GPTQ, AWQ, BNB and FP8 quantization
- inference and deployment through vLLM, SGLang and LMDeploy
- Gradio web UI for training and inference
Alternatives
The same job
These do what ms-swift does.
- LlamaFactory An open source framework for fine-tuning 100+ language and vision-language models from a CLI or a web UI
- Axolotl A free and open source framework for fine-tuning and post-training large language models
- TRL A comprehensive library to post-train foundation models
- Unsloth Run and train AI models on your own local hardware via an open-source UI
- Oumi Fine-tune, evaluate and deploy open LLMs and agents
- Fireworks AI Run, ensemble and train open models on one platform
