SWIFT from the ModelScope community supports training, inference, evaluation, quantization, and deployment for hundreds of text and multimodal models. It covers pre-training, supervised fine-tuning, alignment, and reinforcement workflows.
Overview
ms-swift is a framework for fine-tuning and operating large language and multimodal models. It supports continued pre-training, supervised fine-tuning, preference optimization, reward modeling, embedding and reranker tasks, and a broad set of GRPO-family reinforcement algorithms on many open model families.
Training options include full-parameter updates and lightweight methods such as LoRA, QLoRA, and related tuners, with distributed setups from DDP and DeepSpeed through Megatron parallelism for large MoE models. Hardware coverage spans NVIDIA and AMD GPUs, Huawei Ascend NPUs, domestic accelerators, Apple MPS, and CPU, with built-in datasets and hooks for custom data.
The same stack wires inference and deployment through engines such as vLLM, SGLang, and LMDeploy, optional GPTQ, AWQ, BNB, and FP8 quantization, and evaluation via EvalScope. A Gradio-based Web UI offers a GUI path alongside the recommended command-line workflow for training, inference, evaluation, and quantization.
Users typically install via pip, point commands at a model and dataset identifier or local path, and run training or inference on their own machines or clusters. ModelScope is the default artifact source, with an option to pull from Hugging Face instead.
Key features
- SFT, DPO, and GRPO training
- LoRA and full-parameter tuning
- Multimodal model support
- Megatron distributed training
- vLLM and SGLang inference
- Built-in evaluation via EvalScope
- Model quantization export
- Gradio training Web UI
Use cases
- Instruction tuning open LLMs
- Multimodal vision-language training
- RLHF and GRPO alignment runs
- Embedding and reranker fine-tuning
- Local model deployment pipelines