Update README.md
Browse files
README.md
CHANGED
@@ -5,7 +5,6 @@ license_link: >-
|
|
5 |
https://github.com/SkyworkAI/Skywork/blob/main/Skywork%20Community%20License.pdf
|
6 |
---
|
7 |
|
8 |
-
|
9 |
<!-- <div align="center">
|
10 |
<h1>
|
11 |
✨Skywork
|
@@ -14,7 +13,7 @@ license_link: >-
|
|
14 |
<div align="center"><img src="misc/skywork_logo.jpeg" width="550"/></div>
|
15 |
|
16 |
<p align="center">
|
17 |
-
🤗 <a href="https://huggingface.co/Skywork" target="_blank">Hugging Face</a> • 🤖 <a href="https://modelscope.cn/organization/Skywork" target="_blank">ModelScope</a> • 👾 <a href="https://wisemodel.cn/organization/Skywork" target="_blank">Wisemodel</a> • 💬 <a href="https://github.com/SkyworkAI/Skywork/blob/main/misc/wechat.png?raw=true" target="_blank">WeChat</a>• 📜<a href="https://
|
18 |
</p>
|
19 |
|
20 |
<div align="center">
|
@@ -41,6 +40,7 @@ Skywork-MoE demonstrates comparable or superior performance to models with more
|
|
41 |
|
42 |
# Table of contents
|
43 |
|
|
|
44 |
- [👨💻Benchmark Results](#Benchmark-Results)
|
45 |
- [🏆Demonstration of Hugging Face Model Inference](#Demonstration-of-HuggingFace-Model-Inference)
|
46 |
- [📕Demonstration of vLLM Model Inference](#Demonstration-of-vLLM-Model-Inference)
|
@@ -48,7 +48,16 @@ Skywork-MoE demonstrates comparable or superior performance to models with more
|
|
48 |
- [🤝Contact Us and Citation](#Contact-Us-and-Citation)
|
49 |
|
50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
# Benchmark Results
|
|
|
52 |
We evaluated Skywork-MoE-Base model on various popular benchmarks, including C-Eval, MMLU, CMMLU, GSM8K, MATH and HumanEval.
|
53 |
<img src="misc/skywork_moe_base_evaluation.png" alt="Image" width="600" height="280">
|
54 |
|
@@ -94,15 +103,28 @@ coming soon...
|
|
94 |
|
95 |
We provide a method to quickly deploy the Skywork-MoE-Base model based on vllm.
|
96 |
|
|
|
|
|
97 |
You can get the source code in [`vllm`](https://github.com/SkyworkAI/vllm)
|
98 |
|
|
|
99 |
|
100 |
### Based on local environment
|
101 |
|
102 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
|
104 |
```shell
|
105 |
-
pip3 install xformers
|
|
|
106 |
```
|
107 |
|
108 |
Then clone the [`vllm`](https://github.com/SkyworkAI/vllm) provided by skywork:
|
@@ -115,10 +137,12 @@ cd vllm
|
|
115 |
Then compile and install vllm:
|
116 |
|
117 |
``` shell
|
|
|
|
|
118 |
MAX_JOBS=8 python3 setup.py install
|
119 |
```
|
120 |
|
121 |
-
###
|
122 |
|
123 |
You can use the docker image provided by skywork to run vllm directly:
|
124 |
|
@@ -129,7 +153,7 @@ docker pull registry.cn-wulanchabu.aliyuncs.com/triple-mu/skywork-moe-vllm:v1
|
|
129 |
Then start the container and set the model path and working directory.
|
130 |
|
131 |
```shell
|
132 |
-
model_path="Skywork/Skywork-MoE-Base"
|
133 |
workspace=${PWD}
|
134 |
|
135 |
docker run \
|
@@ -142,7 +166,7 @@ docker run \
|
|
142 |
--privileged=true \
|
143 |
--ulimit stack=67108864 \
|
144 |
--ipc=host \
|
145 |
-
-v ${model_path}:/Skywork-MoE-Base \
|
146 |
-v ${workspace}:/workspace \
|
147 |
registry.cn-wulanchabu.aliyuncs.com/triple-mu/skywork-moe-vllm:v1
|
148 |
```
|
@@ -154,7 +178,7 @@ Now, you can run the Skywork MoE model for fun!
|
|
154 |
``` python
|
155 |
from vllm import LLM, SamplingParams
|
156 |
|
157 |
-
model_path = 'Skywork/Skywork-MoE-Base'
|
158 |
prompts = [
|
159 |
"The president of the United States is",
|
160 |
"The capital of France is",
|
@@ -205,10 +229,21 @@ If you find our work helpful, please feel free to cite our paper~
|
|
205 |
```
|
206 |
@misc{wei2024skywork,
|
207 |
title={Skywork-MoE: A Deep Dive into Training Techniques for Mixture-of-Experts Language Models},
|
208 |
-
author={Tianwen Wei, Bo Zhu, Liang Zhao, Cheng Cheng, Biye Li, Weiwei
|
|
|
209 |
year={2024},
|
210 |
archivePrefix={arXiv},
|
211 |
primaryClass={cs.CL}
|
212 |
}
|
213 |
```
|
214 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
https://github.com/SkyworkAI/Skywork/blob/main/Skywork%20Community%20License.pdf
|
6 |
---
|
7 |
|
|
|
8 |
<!-- <div align="center">
|
9 |
<h1>
|
10 |
✨Skywork
|
|
|
13 |
<div align="center"><img src="misc/skywork_logo.jpeg" width="550"/></div>
|
14 |
|
15 |
<p align="center">
|
16 |
+
🤗 <a href="https://huggingface.co/Skywork" target="_blank">Hugging Face</a> • 🤖 <a href="https://modelscope.cn/organization/Skywork" target="_blank">ModelScope</a> • 👾 <a href="https://wisemodel.cn/organization/Skywork" target="_blank">Wisemodel</a> • 💬 <a href="https://github.com/SkyworkAI/Skywork/blob/main/misc/wechat.png?raw=true" target="_blank">WeChat</a>• 📜<a href="https://arxiv.org/pdf/2406.06563" target="_blank">Tech Report</a>
|
17 |
</p>
|
18 |
|
19 |
<div align="center">
|
|
|
40 |
|
41 |
# Table of contents
|
42 |
|
43 |
+
- [☁️Download URL](#Download-URL)
|
44 |
- [👨💻Benchmark Results](#Benchmark-Results)
|
45 |
- [🏆Demonstration of Hugging Face Model Inference](#Demonstration-of-HuggingFace-Model-Inference)
|
46 |
- [📕Demonstration of vLLM Model Inference](#Demonstration-of-vLLM-Model-Inference)
|
|
|
48 |
- [🤝Contact Us and Citation](#Contact-Us-and-Citation)
|
49 |
|
50 |
|
51 |
+
# Download URL
|
52 |
+
|
53 |
+
| | HuggingFace Model | ModelScope Model | Wisemodel Model |
|
54 |
+
|:-------:|:------------------------------------------------------------------------------:|:-----------------------------:|:-----------------------------:|
|
55 |
+
| **Skywork-MoE-Base** | 🤗 [Skywork-MoE-Base](https://huggingface.co/Skywork/Skywork-MoE-Base) | 🤖[Skywork-MoE-Base](https://www.modelscope.cn/models/skywork/Skywork-MoE-base) | 👾[Skywork-MoE-Base](https://wisemodel.cn/models/Skywork/Skywork-MoE-base) |
|
56 |
+
| **Skywork-MoE-Base-FP8** | 🤗 [Skywork-MoE-Base-FP8](https://huggingface.co/Skywork/Skywork-MoE-Base-FP8) | 🤖[Skywork-MoE-Base-FP8](https://www.modelscope.cn/models/skywork/Skywork-MoE-Base-FP8) | 👾[Skywork-MoE-Base-FP8](https://wisemodel.cn/models/Skywork/Skywork-MoE-Base-FP8) |
|
57 |
+
| **Skywork-MoE-Chat** | 😊 [Coming Soon]() | 🤖 | 👾 |
|
58 |
+
|
59 |
# Benchmark Results
|
60 |
+
|
61 |
We evaluated Skywork-MoE-Base model on various popular benchmarks, including C-Eval, MMLU, CMMLU, GSM8K, MATH and HumanEval.
|
62 |
<img src="misc/skywork_moe_base_evaluation.png" alt="Image" width="600" height="280">
|
63 |
|
|
|
103 |
|
104 |
We provide a method to quickly deploy the Skywork-MoE-Base model based on vllm.
|
105 |
|
106 |
+
Under fp8 precision you can run Skywork-MoE-Base with just only 8*4090.
|
107 |
+
|
108 |
You can get the source code in [`vllm`](https://github.com/SkyworkAI/vllm)
|
109 |
|
110 |
+
You can get the fp8 model in [`Skywork-MoE-Base-FP8`](https://huggingface.co/Skywork/Skywork-MoE-Base-FP8)
|
111 |
|
112 |
### Based on local environment
|
113 |
|
114 |
+
Since pytorch only supports 4090 using fp8 precision in the nightly version, you need to install the corresponding or newer version of pytorch.
|
115 |
+
|
116 |
+
``` shell
|
117 |
+
# for cuda12.1
|
118 |
+
pip3 install --pre torch pytorch-triton --index-url https://download.pytorch.org/whl/nightly/cu121
|
119 |
+
# for cuda12.4
|
120 |
+
pip3 install --pre torch pytorch-triton --index-url https://download.pytorch.org/whl/nightly/cu124
|
121 |
+
```
|
122 |
+
|
123 |
+
Some other dependencies also need to be installed:
|
124 |
|
125 |
```shell
|
126 |
+
MAX_JOBS=8 pip3 install git+https://github.com/facebookresearch/xformers.git # need to wait for a long time
|
127 |
+
pip3 install vllm-flash-attn --no-deps
|
128 |
```
|
129 |
|
130 |
Then clone the [`vllm`](https://github.com/SkyworkAI/vllm) provided by skywork:
|
|
|
137 |
Then compile and install vllm:
|
138 |
|
139 |
``` shell
|
140 |
+
pip3 install -r requirements-build.txt
|
141 |
+
pip3 install -r requirements-cuda.txt
|
142 |
MAX_JOBS=8 python3 setup.py install
|
143 |
```
|
144 |
|
145 |
+
### Base on docker
|
146 |
|
147 |
You can use the docker image provided by skywork to run vllm directly:
|
148 |
|
|
|
153 |
Then start the container and set the model path and working directory.
|
154 |
|
155 |
```shell
|
156 |
+
model_path="Skywork/Skywork-MoE-Base-FP8"
|
157 |
workspace=${PWD}
|
158 |
|
159 |
docker run \
|
|
|
166 |
--privileged=true \
|
167 |
--ulimit stack=67108864 \
|
168 |
--ipc=host \
|
169 |
+
-v ${model_path}:/Skywork-MoE-Base-FP8 \
|
170 |
-v ${workspace}:/workspace \
|
171 |
registry.cn-wulanchabu.aliyuncs.com/triple-mu/skywork-moe-vllm:v1
|
172 |
```
|
|
|
178 |
``` python
|
179 |
from vllm import LLM, SamplingParams
|
180 |
|
181 |
+
model_path = 'Skywork/Skywork-MoE-Base-FP8'
|
182 |
prompts = [
|
183 |
"The president of the United States is",
|
184 |
"The capital of France is",
|
|
|
229 |
```
|
230 |
@misc{wei2024skywork,
|
231 |
title={Skywork-MoE: A Deep Dive into Training Techniques for Mixture-of-Experts Language Models},
|
232 |
+
author={Tianwen Wei, Bo Zhu, Liang Zhao, Cheng Cheng, Biye Li, Weiwei Lü, Peng Cheng, Jianhao Zhang, Xiaoyu Zhang, Liang Zeng, Xiaokun Wang, Yutuan Ma, Rui Hu, Shuicheng Yan, Han Fang, Yahui Zhou},
|
233 |
+
url={https://arxiv.org/pdf/2406.06563},
|
234 |
year={2024},
|
235 |
archivePrefix={arXiv},
|
236 |
primaryClass={cs.CL}
|
237 |
}
|
238 |
```
|
239 |
|
240 |
+
```
|
241 |
+
@article{zhao2024longskywork,
|
242 |
+
title={LongSkywork: A Training Recipe for Efficiently Extending Context Length in Large Language Models},
|
243 |
+
author={Zhao, Liang and Wei, Tianwen and Zeng, Liang and Cheng, Cheng and Yang, Liu and Cheng, Peng and Wang, Lijie and Li, Chenxia and Wu, Xuejie and Zhu, Bo and others},
|
244 |
+
journal={arXiv preprint arXiv:2406.00605},
|
245 |
+
url={https://arxiv.org/abs/2406.00605},
|
246 |
+
year={2024}
|
247 |
+
}
|
248 |
+
```
|
249 |
+
|