Skip to main content
Training & Fine-tuningProduction

ms-swift

modelscope / ms-swift

ModelScope’s fine-tuning and deployment stack: LoRA and full-parameter training for LLMs and multimodal models, DPO/GRPO, inference and evaluation.

16.1k stars 1815 forks Python Language Apache-2.0 License Last push 2026-11-20

Why choose it

  • Training, inference, evaluation and deployment share one command surface, reducing glue code.
  • Broad coverage of multimodal models and Chinese data recipes.
  • Supports LoRA, full-parameter training, DPO and GRPO, useful from experiment through serving.

Not for

If you work only inside the Hugging Face ecosystem and do not need ModelScope models, the dependency footprint is heavier than necessary.
Highly custom distributed training still belongs in DeepSpeed or Megatron layers.

Minimum setup

  1. Confirm the target model is supported and run the official minimal example to validate the environment.
  2. Run LoRA training and inference on a small sample, recording the data format and chat template.
  3. For alignment, start with SFT, then add DPO/GRPO, keeping the same evaluation set.

Dependencies and cost

Python + PyTorch/CUDA; multimodal training needs more VRAM; some models and datasets require ModelScope access.

License and usage boundaries

Code is Apache-2.0; models, datasets and distribution terms on ModelScope are separate.

Open source is not automatically commercial-use friendly: GPL / AGPL are copyleft; code, model and output licenses are separate. Read the LICENSE and model card before launch, and involve legal when needed.

Alternatives and neighbors

  • LLaMA-Factory — Start here,One setup for fine-tuning: LoRA, QLoRA, full-parameter and DPO, with a WebUI and model export.
  • Axolotl — Production,One YAML config for fine-tuning: LoRA, QLoRA, full-parameter, DPO, GRPO and multi-node training.

Next steps

  • Open GitHub and read the README, LICENSE, latest release and issues first.
  • Make an onboarding checklist for deployment dependencies, VRAM, data, network and permissions.
  • Run a small sample first, then decide on production; never start with production data.

GitHub repository ↗ Docs ↗ Add to compare

Snapshot: stars / forks / language / license / pushed_at come from the GitHub API snapshot on 2026-11-20; later changes are not written back. Tags and “fit / not fit” are editorial judgments, not GitHub metadata.
No endorsement: this site only indexes and flags risks; it does not audit code, guarantee security or make license decisions for you. Review repository scripts and model weights yourself.