Instructions to use Skywork/Skywork-R1V2-38B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Skywork/Skywork-R1V2-38B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Skywork/Skywork-R1V2-38B", 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-R1V2-38B", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Skywork/Skywork-R1V2-38B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Skywork/Skywork-R1V2-38B" # 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-R1V2-38B", "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-R1V2-38B
- SGLang
How to use Skywork/Skywork-R1V2-38B 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-R1V2-38B" \ --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-R1V2-38B", "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-R1V2-38B" \ --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-R1V2-38B", "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-R1V2-38B with Docker Model Runner:
docker model run hf.co/Skywork/Skywork-R1V2-38B
Update README.md
Browse files
README.md
CHANGED
|
@@ -30,72 +30,21 @@ license: mit
|
|
| 30 |
<br>
|
| 31 |
<br>
|
| 32 |
<div align="center">
|
| 33 |
-
<b>Comparison with Larger-Scale Open-Source
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
</div>
|
| 35 |
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
<tr>
|
| 45 |
-
<th></th>
|
| 46 |
-
<th></th>
|
| 47 |
-
<th align="center"><strong>QwQ-32B-Preview</strong></th>
|
| 48 |
-
<th align="center"><strong>InternVL-2.5-38B</strong></th>
|
| 49 |
-
<th align="center"><strong>VILA 1.5-40B</strong></th>
|
| 50 |
-
<th align="center"><strong>InternVL2-40B</strong></th>
|
| 51 |
-
<th align="center"><strong>Skywork-R1V-38B</strong></th>
|
| 52 |
-
</tr>
|
| 53 |
-
</thead>
|
| 54 |
-
<tbody>
|
| 55 |
-
<tr>
|
| 56 |
-
<td rowspan="3">Reasoning</td>
|
| 57 |
-
<td>MATH-500</td>
|
| 58 |
-
<td align="center">90.6</td>
|
| 59 |
-
<td align="center">-</td>
|
| 60 |
-
<td align="center">-</td>
|
| 61 |
-
<td align="center">-</td>
|
| 62 |
-
<td align="center"><strong>94.0</strong></td>
|
| 63 |
-
</tr>
|
| 64 |
-
<tr>
|
| 65 |
-
<td>AIME 2024</td>
|
| 66 |
-
<td align="center">50.0</td>
|
| 67 |
-
<td align="center">-</td>
|
| 68 |
-
<td align="center">-</td>
|
| 69 |
-
<td align="center">-</td>
|
| 70 |
-
<td align="center"><strong>72.0</strong></td>
|
| 71 |
-
</tr>
|
| 72 |
-
<tr>
|
| 73 |
-
<td>GPQA</td>
|
| 74 |
-
<td align="center">54.5</td>
|
| 75 |
-
<td align="center">-</td>
|
| 76 |
-
<td align="center">-</td>
|
| 77 |
-
<td align="center">-</td>
|
| 78 |
-
<td align="center"><strong>61.6</strong></td>
|
| 79 |
-
</tr>
|
| 80 |
-
<tr>
|
| 81 |
-
<td rowspan="3">Vision</td>
|
| 82 |
-
<td>MathVista(mini)</td>
|
| 83 |
-
<td align="center">-</td>
|
| 84 |
-
<td align="center">71.9</td>
|
| 85 |
-
<td align="center">49.5</td>
|
| 86 |
-
<td align="center">63.7</td>
|
| 87 |
-
<td align="center">67.5</td>
|
| 88 |
-
</tr>
|
| 89 |
-
<tr>
|
| 90 |
-
<td>MMMU(Val)</td>
|
| 91 |
-
<td align="center">-</td>
|
| 92 |
-
<td align="center">63.9</td>
|
| 93 |
-
<td align="center">55.1</td>
|
| 94 |
-
<td align="center">55.2</td>
|
| 95 |
-
<td align="center"><strong>69.0</strong></td>
|
| 96 |
-
</tr>
|
| 97 |
-
</tbody>
|
| 98 |
-
</table>
|
| 99 |
|
| 100 |
|
| 101 |
<br>
|
|
@@ -233,9 +182,6 @@ license: mit
|
|
| 233 |
</tbody>
|
| 234 |
</table>
|
| 235 |
|
| 236 |
-
<div align="center">
|
| 237 |
-
<img src="eval.jpeg" width="90%" height="90%" alt="skywork_r1v_eval" />
|
| 238 |
-
</div>
|
| 239 |
|
| 240 |
---
|
| 241 |
|
|
|
|
| 30 |
<br>
|
| 31 |
<br>
|
| 32 |
<div align="center">
|
| 33 |
+
<b>Comparison with Larger-Scale Open-Source Models</b>
|
| 34 |
+
</div>
|
| 35 |
+
|
| 36 |
+
<div align="center">
|
| 37 |
+
<img src="open_source.png" width="100%" height="100%" alt="skywork_r1v2_eval_open" />
|
| 38 |
</div>
|
| 39 |
|
| 40 |
+
|
| 41 |
+
<div align="center">
|
| 42 |
+
<b>Comparison with Properitary Models</b>
|
| 43 |
+
</div>
|
| 44 |
+
|
| 45 |
+
<div align="center">
|
| 46 |
+
<img src="properitary.png" width="100%" height="100%" alt="skywork_r1v2_eval_properitary" />
|
| 47 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
|
| 50 |
<br>
|
|
|
|
| 182 |
</tbody>
|
| 183 |
</table>
|
| 184 |
|
|
|
|
|
|
|
|
|
|
| 185 |
|
| 186 |
---
|
| 187 |
|