ms-swift
A large model and multimodal model fine-tuning and deployment framework from the ModelScope community, supporting training, inference, evaluation, quantization and deployment for more than 600 text and 400 multimodal models.
ms-swift (Scalable lightWeight Infrastructure for Fine-Tuning) is a fine-tuning and deployment framework for large language and multimodal models from the ModelScope community. It supports the full pipeline of pretraining, fine-tuning, human alignment, inference, evaluation, quantization and deployment for more than 600 text-only models, including Qwen3, InternLM3, GLM4.5, Mistral, DeepSeek-R1 and Llama4, and more than 400 multimodal models, including Qwen3-VL, Qwen3-Omni, Kimi-K3, Llava and InternVL3.5.
It integrates Megatron parallelism techniques such as tensor, pipeline, context and expert parallelism to accelerate training, and a wide range of reinforcement learning algorithms in the GRPO family alongside preference-learning methods such as DPO, KTO and ORPO, as well as embedding, reranker and sequence classification training. Inference, evaluation and deployment are accelerated through vLLM, SGLang and LMDeploy, with quantization support for GPTQ, AWQ, BNB and FP8.
It includes more than 150 built-in datasets, supports lightweight fine-tuning methods such as LoRA, QLoRA and DoRA, and runs on a wide range of hardware, including NVIDIA, AMD and Ascend NPU accelerators, CPU and Apple's MPS. It is written in Python under the Apache 2.0 license.