AI工具 是 AI Skill Hub 本期精选AI工具之一。在 GitHub 上收获超过 14.4k 颗 Star,综合评分 8.5 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。
AI工具 是一款基于 Python 开发的开源工具,专注于 PEFT、Full-parameter、CPT 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
AI工具 是一款基于 Python 开发的开源工具,专注于 PEFT、Full-parameter、CPT 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 方式一:pip 安装(推荐)
pip install ms-swift
# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install ms-swift
# 方式三:从源码安装(获取最新功能)
git clone https://github.com/modelscope/ms-swift
cd ms-swift
pip install -e .
# 验证安装
python -c "import ms_swift; print('安装成功')"
# 命令行使用
ms-swift --help
# 基本用法
ms-swift input_file -o output_file
# Python 代码中调用
import ms_swift
# 示例
result = ms_swift.process("input")
print(result)
# ms-swift 配置文件示例(config.yml) app: name: "ms-swift" debug: false log_level: "INFO" # 运行时指定配置文件 ms-swift --config config.yml # 或通过环境变量配置 export MS_SWIFT_API_KEY="your-key" export MS_SWIFT_OUTPUT_DIR="./output"
<p align="center"> <br> <img src="asset/banner.png"/> <br> <p> <p align="center"> <a href="https://modelscope.cn/home">ModelScope Community Website</a> <br> <a href="README_CN.md">中文</a>   |   English   </p>
<p align="center"> <img src="https://img.shields.io/badge/python-3.12-5be.svg"> <img src="https://img.shields.io/badge/pytorch-%E2%89%A52.0-orange.svg"> <a href="https://github.com/modelscope/modelscope/"><img src="https://img.shields.io/badge/modelscope-%E2%89%A51.23-5D91D4.svg"></a> <a href="https://pypi.org/project/ms-swift/"><img src="https://badge.fury.io/py/ms-swift.svg"></a> <a href="https://github.com/modelscope/ms-swift/blob/main/LICENSE"><img src="https://img.shields.io/github/license/modelscope/ms-swift"></a> <a href="https://pepy.tech/project/ms-swift"><img src="https://pepy.tech/badge/ms-swift"></a> <a href="https://github.com/modelscope/ms-swift/pulls"><img src="https://img.shields.io/badge/PR-welcome-55EB99.svg"></a> </p>
<p align="center"> <a href="https://trendshift.io/repositories/11937" target="_blank"><img src="https://trendshift.io/api/badge/repositories/11937" alt="modelscope/ms-swift | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a> </p>
<p align="center"> <a href="https://arxiv.org/abs/2408.05517">Paper</a>   | <a href="https://swift.readthedocs.io/en/latest/">English Documentation</a>   |   <a href="https://swift.readthedocs.io/zh-cn/latest/">中文文档</a>   </p>
🍲 ms-swift is a large model and multimodal large model fine-tuning and deployment framework provided by the ModelScope community. It now supports training (pre-training, fine-tuning, human alignment), inference, evaluation, quantization, and deployment for 600+ text-only large models and 400+ multimodal large models. Large models include: Qwen3, Qwen3.5, InternLM3, GLM4.5, Mistral, DeepSeek-R1, Llama4, etc. Multimodal large models include: Qwen3-VL, Qwen3-Omni, Llava, InternVL3.5, MiniCPM-V-4, Ovis2.5, GLM4.5-V, DeepSeek-VL2, etc.
🍔 In addition, ms-swift integrates the latest training technologies, including Megatron parallelism techniques such as TP, PP, CP, EP to accelerate training, as well as numerous GRPO algorithm family reinforcement learning algorithms including: GRPO, DAPO, GSPO, SAPO, CISPO, RLOO, Reinforce++, etc. to enhance model intelligence. ms-swift supports a wide range of training tasks, including preference learning algorithms such as DPO, KTO, RM, CPO, SimPO, ORPO, as well as Embedding, Reranker, and sequence classification tasks. ms-swift provides full-pipeline support for large model training, including acceleration for inference, evaluation, and deployment modules using vLLM, SGLang, and LMDeploy, as well as model quantization using GPTQ, AWQ, BNB, and FP8 technologies.
Why Choose ms-swift?
To install using pip: ```shell pip install ms-swift -U
git clone https://github.com/modelscope/ms-swift.git cd ms-swift
CUDA_VISIBLE_DEVICES=0 swift deploy \
--model Qwen/Qwen3-4B-Instruct-2507 \
--infer_backend vllm
10 minutes of self-cognition fine-tuning of Qwen3-4B-Instruct-2507 on a single 3090 GPU:
Here is a minimal example of training to deployment using ms-swift. For more details, you can check the examples.
--model to specify the corresponding model's ID or path, and modify --dataset to specify the corresponding dataset's ID or path.--use_hf true.| Useful Links |
|---|
| [🔥Command Line Parameters](https://swift.readthedocs.io/en/latest/Instruction/Command-line-parameters.html) |
| [Megatron-SWIFT](https://swift.readthedocs.io/en/latest/Megatron-SWIFT/Quick-start.html) |
| [GRPO](https://swift.readthedocs.io/en/latest/Instruction/GRPO/GetStarted/GRPO.html) |
| [Supported Models and Datasets](https://swift.readthedocs.io/en/latest/Instruction/Supported-models-and-datasets.html) |
| [Custom Models](https://swift.readthedocs.io/en/latest/Customization/Custom-model.html), [🔥Custom Datasets](https://swift.readthedocs.io/en/latest/Customization/Custom-dataset.html) |
| [LLM Tutorial](https://github.com/modelscope/modelscope-classroom/tree/main/LLM-tutorial) |
```shell
CUDA_VISIBLE_DEVICES=0 swift app \
--model Qwen/Qwen3-4B-Instruct-2507 \
--stream true \
--infer_backend transformers \
--max_new_tokens 2048
model, tokenizer = get_model_processor(model_id_or_path, ...) template = get_template(tokenizer, ...) lora_config = LoraConfig(...) model = get_peft_model(model, lora_config)
高质量的AI工具,支持多种LLM
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ Apache 2.0 — 宽松开源协议,可商用,需保留版权声明和 NOTICE 文件,含专利授权条款。
经综合评估,AI工具 在AI工具赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | ms-swift |
| 原始描述 | 开源AI工具:Use PEFT or Full-parameter to CPT/SFT/DPO/GRPO 600+ LLMs (Qwen3.6, DeepSeek-V4, 。⭐14.4k · Python |
| Topics | PEFTFull-parameterCPTSFTDPOGRPO |
| GitHub | https://github.com/modelscope/ms-swift |
| License | Apache-2.0 |
| 语言 | Python |
收录时间:2026-06-09 · 更新时间:2026-06-11 · License:Apache-2.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。