Instructions to use Skywork/Skywork-R1V-38B-AWQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Skywork/Skywork-R1V-38B-AWQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Skywork/Skywork-R1V-38B-AWQ", trust_remote_code=True) messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Skywork/Skywork-R1V-38B-AWQ", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Skywork/Skywork-R1V-38B-AWQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Skywork/Skywork-R1V-38B-AWQ" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Skywork/Skywork-R1V-38B-AWQ", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/Skywork/Skywork-R1V-38B-AWQ
- SGLang
How to use Skywork/Skywork-R1V-38B-AWQ with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Skywork/Skywork-R1V-38B-AWQ" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Skywork/Skywork-R1V-38B-AWQ", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Skywork/Skywork-R1V-38B-AWQ" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Skywork/Skywork-R1V-38B-AWQ", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use Skywork/Skywork-R1V-38B-AWQ with Docker Model Runner:
docker model run hf.co/Skywork/Skywork-R1V-38B-AWQ
Update README.md
Browse files
README.md
CHANGED
|
@@ -169,95 +169,23 @@ The AWQ quantization reduces the memory footprint compared to the original FP16
|
|
| 169 |
If you use this model in your research, please cite:
|
| 170 |
|
| 171 |
```bibtex
|
| 172 |
-
@
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
|
|
|
|
|
|
| 178 |
}
|
| 179 |
-
```
|
| 180 |
-
|
| 181 |
-
# Skywork-R1V-38B-AWQ (中文说明)
|
| 182 |
-
|
| 183 |
-
## 使用方法
|
| 184 |
-
您可以使用不同的推理框架来使用这个量化模型:
|
| 185 |
-
|
| 186 |
-
### 使用 VLLM
|
| 187 |
-
|
| 188 |
-
#### Python API
|
| 189 |
-
|
| 190 |
-
```python
|
| 191 |
-
import os
|
| 192 |
-
from vllm import LLM, SamplingParams
|
| 193 |
-
from vllm.entrypoints.chat_utils import load_chat_template
|
| 194 |
-
|
| 195 |
-
model_name = "Skywork/Skywork-R1V-38B-AWQ" # 或本地路径
|
| 196 |
-
llm = LLM(model_name,
|
| 197 |
-
dtype='float16',
|
| 198 |
-
quantization="awq",
|
| 199 |
-
gpu_memory_utilization=0.85,
|
| 200 |
-
max_model_len=4096,
|
| 201 |
-
trust_remote_code=True,
|
| 202 |
-
)
|
| 203 |
-
|
| 204 |
-
# 在此添加您的推理代码
|
| 205 |
-
```
|
| 206 |
-
|
| 207 |
-
#### OpenAI 兼容的 API 服务器
|
| 208 |
|
| 209 |
-
```bash
|
| 210 |
-
MODEL_ID="Skywork/Skywork-R1V-38B-AWQ" # 或本地路径
|
| 211 |
-
|
| 212 |
-
CUDA_VISIBLE_DEVICES=0 \
|
| 213 |
-
python -m vllm.entrypoints.openai.api_server \
|
| 214 |
-
--model $MODEL_ID \
|
| 215 |
-
--dtype float16 \
|
| 216 |
-
--quantization awq \
|
| 217 |
-
--port 23334 \
|
| 218 |
-
--max-model-len 12000 \
|
| 219 |
-
--gpu-memory-utilization 0.9 \
|
| 220 |
-
--trust-remote-code
|
| 221 |
-
```
|
| 222 |
-
|
| 223 |
-
### 使用 LMDeploy
|
| 224 |
-
|
| 225 |
-
```python
|
| 226 |
-
import os
|
| 227 |
-
from lmdeploy import pipeline, TurbomindEngineConfig, ChatTemplateConfig
|
| 228 |
-
from lmdeploy.vl import load_image
|
| 229 |
-
|
| 230 |
-
model_path = "Skywork/Skywork-R1V-38B-AWQ" # 或本地路径
|
| 231 |
-
|
| 232 |
-
engine_config = TurbomindEngineConfig(cache_max_entry_count=0.75)
|
| 233 |
-
chat_template_config = ChatTemplateConfig(model_name=model_path)
|
| 234 |
-
pipe = pipeline(model_path,
|
| 235 |
-
backend_config=engine_config,
|
| 236 |
-
chat_template_config=chat_template_config,
|
| 237 |
-
)
|
| 238 |
-
|
| 239 |
-
# 示例:多模态推理
|
| 240 |
-
image = load_image('table.jpg')
|
| 241 |
-
response = pipe(('描述这个图片?', image))
|
| 242 |
-
print(response.text)
|
| 243 |
-
```
|
| 244 |
-
|
| 245 |
-
## 硬件要求
|
| 246 |
-
|
| 247 |
-
与原始 FP16 模型相比,AWQ 量化减少了内存占用。我们建议:
|
| 248 |
-
|
| 249 |
-
- 至少一块 30GB+ 显存的 GPU 用于推理
|
| 250 |
-
- 对于更长上下文的最佳性能,建议使用 40GB+ 显存
|
| 251 |
-
|
| 252 |
-
## 引用
|
| 253 |
-
|
| 254 |
-
如果您在研究中使用此模型,请引用:
|
| 255 |
-
|
| 256 |
-
```bibtex
|
| 257 |
@misc{peng2025skyworkr1vpioneeringmultimodal,
|
| 258 |
-
title={Skywork
|
| 259 |
-
author={Yi Peng and
|
| 260 |
year={2025},
|
| 261 |
-
|
|
|
|
|
|
|
|
|
|
| 262 |
}
|
| 263 |
-
```
|
|
|
|
| 169 |
If you use this model in your research, please cite:
|
| 170 |
|
| 171 |
```bibtex
|
| 172 |
+
@misc{shen2025skyworkr1v3technicalreport,
|
| 173 |
+
title={Skywork-R1V3 Technical Report},
|
| 174 |
+
author={Wei Shen and Jiangbo Pei and Yi Peng and Xuchen Song and Yang Liu and Jian Peng and Haofeng Sun and Yunzhuo Hao and Peiyu Wang and Jianhao Zhang and Yahui Zhou},
|
| 175 |
+
year={2025},
|
| 176 |
+
eprint={2507.06167},
|
| 177 |
+
archivePrefix={arXiv},
|
| 178 |
+
primaryClass={cs.CL},
|
| 179 |
+
url={https://arxiv.org/abs/2507.06167},
|
| 180 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 181 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 182 |
@misc{peng2025skyworkr1vpioneeringmultimodal,
|
| 183 |
+
title={Skywork R1V: Pioneering Multimodal Reasoning with Chain-of-Thought},
|
| 184 |
+
author={Yi Peng and Peiyu Wang and Xiaokun Wang and Yichen Wei and Jiangbo Pei and Weijie Qiu and Ai Jian and Yunzhuo Hao and Jiachun Pan and Tianyidan Xie and Li Ge and Rongxian Zhuang and Xuchen Song and Yang Liu and Yahui Zhou},
|
| 185 |
year={2025},
|
| 186 |
+
eprint={2504.05599},
|
| 187 |
+
archivePrefix={arXiv},
|
| 188 |
+
primaryClass={cs.CV},
|
| 189 |
+
url={https://arxiv.org/abs/2504.05599},
|
| 190 |
}
|
| 191 |
+
```
|