yuccaaa commited on
Commit
a24c313
·
verified ·
1 Parent(s): d7db5ba

Upload ms-swift/docs/source/GetStarted/SWIFT安装.md with huggingface_hub

Browse files
ms-swift/docs/source/GetStarted/SWIFT安装.md ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SWIFT安装
2
+
3
+ ## Wheel包安装
4
+
5
+ 可以使用pip进行安装:
6
+
7
+ ```shell
8
+ pip install 'ms-swift'
9
+ # 使用评测
10
+ pip install 'ms-swift[eval]' -U
11
+ # 全能力
12
+ pip install 'ms-swift[all]' -U
13
+ ```
14
+
15
+ ## 源代码安装
16
+
17
+ ```shell
18
+ # pip install git+https://github.com/modelscope/ms-swift.git
19
+
20
+ # 全能力
21
+ # pip install "git+https://github.com/modelscope/ms-swift.git#egg=ms-swift[all]"
22
+
23
+ git clone https://github.com/modelscope/ms-swift.git
24
+ cd ms-swift
25
+ pip install -e .
26
+
27
+ # 全能力
28
+ # pip install -e '.[all]'
29
+ ```
30
+
31
+ ## 旧版本
32
+
33
+ SWIFT在3.0版本开始进行了不兼容式重构,如果需要使用2.x旧版本,请执行如下命令进行安装:
34
+ ```shell
35
+ pip install ms-swift==2.*
36
+ ```
37
+
38
+ ## 镜像
39
+
40
+ ```
41
+ # vllm0.8.3 (该版本vllm可能导致部分GRPO训练卡住,GRPO建议优先使用vllm0.7.3)
42
+ modelscope-registry.cn-hangzhou.cr.aliyuncs.com/modelscope-repo/modelscope:ubuntu22.04-cuda12.4.0-py311-torch2.6.0-vllm0.8.3-modelscope1.25.0-swift3.3.0.post1
43
+ modelscope-registry.us-west-1.cr.aliyuncs.com/modelscope-repo/modelscope:ubuntu22.04-cuda12.4.0-py311-torch2.6.0-vllm0.8.3-modelscope1.25.0-swift3.3.0.post1
44
+
45
+ # vllm0.7.3
46
+ modelscope-registry.us-west-1.cr.aliyuncs.com/modelscope-repo/modelscope:ubuntu22.04-cuda12.4.0-py311-torch2.5.1-modelscope1.25.0-swift3.2.2
47
+ ```
48
+
49
+ 更多镜像可以查看[这里](https://modelscope.cn/docs/intro/environment-setup#%E6%9C%80%E6%96%B0%E9%95%9C%E5%83%8F)
50
+
51
+ ## 支持的硬件
52
+
53
+ | 硬件环境 | 备注 |
54
+ | --------------- | --------------------------- |
55
+ | A10/A100/H100 | |
56
+ | RTX20/30/40系列 | |
57
+ | T4/V100 | 部分模型出现NAN |
58
+ | Ascend NPU | 部分模型出现NAN或算子不支持 |
59
+ | MPS | |
60
+ | CPU | |
61
+
62
+
63
+ ## 运行环境
64
+
65
+ | | 范围 | 推荐 | 备注 |
66
+ | ------ |--------------| ---- | --|
67
+ | python | >=3.9 | 3.10 ||
68
+ | cuda | | cuda12 |使用cpu、npu、mps则无需安装|
69
+ | torch | >=2.0 | ||
70
+ | transformers | >=4.33 | 4.51 ||
71
+ | modelscope | >=1.19 | ||
72
+ | peft | >=0.11,<0.16 | ||
73
+ | trl | >=0.13,<0.17 | 0.16 |RLHF|
74
+ | deepspeed | >=0.14 | 0.14.5 |训练|
75
+ | vllm | >=0.5.1 | 0.7.3/0.8.3 |推理/部署/评测|
76
+ | lmdeploy | >=0.5 | 0.7.2.post1 |推理/部署/评测|
77
+ | evalscope | >=0.11 | |评测|
78
+
79
+ 更多可选依赖可以参考[这里](https://github.com/modelscope/ms-swift/blob/main/requirements/install_all.sh)。
80
+
81
+ ## Notebook环境
82
+
83
+ Swift支持训练的绝大多数模型都可以在`A10`显卡上使用,用户可以使用ModelScope官方提供的免费显卡资源:
84
+
85
+ 1. 进入[ModelScope](https://www.modelscope.cn)官方网站并登录
86
+ 2. 点击左侧的`我的Notebook`并开启一个免费GPU实例
87
+ 3. 愉快地薅A10显卡羊毛