# modelscope/ms-swift

Use PEFT or Full-parameter to CPT/SFT/DPO/GRPO 600+ LLMs (Qwen3.6, DeepSeek-V4, GLM-5.1, InternLM3, Llama4, ...) and 300+ MLLMs (Qwen3-VL, Qwen3-Omni, InternVL3.5, Ovis2.5, GLM4.5v, Gemma4, Llava, Phi4, ...) (AAAI 2025).

Repository: https://github.com/modelscope/ms-swift
Canonical: https://ross.abutalabs.com/products/ms-swift
Homepage: https://swift.readthedocs.io/zh-cn/latest/
Language: Python
License: Apache-2.0
License Family: permissive
Topics: llm, lora, llama, sft, multimodal, peft, internvl, liger, deepseek-r1, embedding, grpo, open-r1, megatron, llama4, qwen3, reranker, moe, qwen3-vl, qwen3-omni, qwen3-6
Last push: 2026-08-26T14:32:36+00:00

## Health v2 (maintenance only)
Score: 91/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 99, release rhythm 86, longevity 80
- inputs: {"age_days": 1128, "days_push": 7, "days_rel": 17, "gap_med": 7.0, "n_releases_24m": 81}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 15371, forks 1634 (observed 2026-08-28T04:11:09.735667+00:00)

## What it is
ms-swift is a ModelScope community framework for fine-tuning, inference, evaluation, quantization, and deployment of 600+ text LLMs and 400+ multimodal LLMs. It supports PEFT (LoRA) and full-parameter training, Megatron parallelism, and RLHF algorithms like GRPO, DPO, and PPO.

## Use cases
- fine-tune qwen or llama with lora
- run sft training on a large language model
- train a multimodal vision-language model
- do grpo reinforcement learning for llm
- merge and quantize a fine-tuned model
- deploy a fine-tuned llm for inference
- train embedding or reranker models
- dpo alignment training for chat models

## When to choose
- you need a single framework covering CPT, SFT, DPO/GRPO, inference, evaluation, quantization, and deployment
- you want LoRA/PEFT or Megatron-based full-parameter training for many model families
- you work with multimodal LLMs like Qwen-VL or InternVL
- you need multi-hardware support including Ascend NPU and AMD GPUs

## When to avoid
- you only need simple model inference without training
- you want a minimal single-model training script rather than a full framework
- you are not working with transformer-based LLMs or MLLMs

## Facets
- artifact type: framework
- maturity: active
- function: llm-training, llm-inference, rag, machine-learning, cli, sdk
- domain: large-language-models, machine-learning, deep-learning, developer-tools
- platform: python, cli
- tags: peft, lora, sft, grpo, rlhf, megatron, multimodal-llm, modelscope, quantization, dpo, fine-tuning, qwen, deepseek, natural-language-processing, linux, gpu, docker

## Member repositories
- modelscope/ms-swift (main) score 91

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:09.735667+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:06:20.793888+00:00, confidence not recorded.
  - readme: https://github.com/modelscope/ms-swift (fetched 2026-08-28T04:11:09.735667+00:00, sha 2761e8baba32)
  - homepage: https://swift.readthedocs.io/zh-cn/latest/ (fetched 2026-08-29T08:04:09.086177+00:00, sha 271ad74fa3a9)
  - registry_pypi: https://pypi.org/pypi/ms-swift/json (fetched 2026-08-29T08:04:09.095309+00:00, sha 0178acdb116b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
