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.
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
- Confirm the target model is supported and run the official minimal example to validate the environment.
- Run LoRA training and inference on a small sample, recording the data format and chat template.
- 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.