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
|
@@ -22,17 +22,11 @@ license: mit
|
|
| 22 |
## 1. Model Introduction
|
| 23 |
| Model Name | Vision Encoder | Language Model | HF Link |
|
| 24 |
| ---------------------- | -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------ |
|
| 25 |
-
| Skywork-R1V-38B | [InternViT-6B-448px-V2_5](https://huggingface.co/OpenGVLab/InternViT-6B-448px-V2_5) | [deepseek-ai/DeepSeek-R1-Distill-Qwen-32B](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-32B) | [🤗 Link](https://huggingface.co/Skywork/Skywork-R1V-38B) |
|
| 26 |
| Skywork-R1V2-38B | [InternViT-6B-448px-V2_5](https://huggingface.co/OpenGVLab/InternViT-6B-448px-V2_5) | [Qwen/QwQ-32B](https://huggingface.co/Qwen/QwQ-32B) | [🤗 Link](https://huggingface.co/Skywork/Skywork-R1V2-38B) |
|
| 27 |
|
| 28 |
|
| 29 |
-
## 2. Feature
|
| 30 |
-
- **Visual Chain-of-Thought**: Enables multi-step logical reasoning on visual inputs, breaking down complex image-based problems into manageable steps.
|
| 31 |
-
- **Mathematical & Scientific Analysis**: Capable of solving visual math problems and interpreting scientific/medical imagery with high precision.
|
| 32 |
-
- **Cross-Modal Understanding**: Seamlessly integrates text and images for richer, context-aware comprehension.
|
| 33 |
|
| 34 |
-
|
| 35 |
-
## 3. Evaluation
|
| 36 |
<br>
|
| 37 |
<br>
|
| 38 |
<div align="center">
|
|
@@ -246,7 +240,7 @@ license: mit
|
|
| 246 |
---
|
| 247 |
|
| 248 |
|
| 249 |
-
##
|
| 250 |
|
| 251 |
### 1. Clone the Repository
|
| 252 |
|
|
@@ -273,7 +267,7 @@ CUDA_VISIBLE_DEVICES="0,1" python inference_with_transformers.py \
|
|
| 273 |
|
| 274 |
---
|
| 275 |
|
| 276 |
-
##
|
| 277 |
If you use Skywork-R1V in your research, please cite:
|
| 278 |
|
| 279 |
```
|
|
|
|
| 22 |
## 1. Model Introduction
|
| 23 |
| Model Name | Vision Encoder | Language Model | HF Link |
|
| 24 |
| ---------------------- | -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------ |
|
|
|
|
| 25 |
| Skywork-R1V2-38B | [InternViT-6B-448px-V2_5](https://huggingface.co/OpenGVLab/InternViT-6B-448px-V2_5) | [Qwen/QwQ-32B](https://huggingface.co/Qwen/QwQ-32B) | [🤗 Link](https://huggingface.co/Skywork/Skywork-R1V2-38B) |
|
| 26 |
|
| 27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
+
## 2. Evaluation
|
|
|
|
| 30 |
<br>
|
| 31 |
<br>
|
| 32 |
<div align="center">
|
|
|
|
| 240 |
---
|
| 241 |
|
| 242 |
|
| 243 |
+
## 3. Usage
|
| 244 |
|
| 245 |
### 1. Clone the Repository
|
| 246 |
|
|
|
|
| 267 |
|
| 268 |
---
|
| 269 |
|
| 270 |
+
## 4. Citation
|
| 271 |
If you use Skywork-R1V in your research, please cite:
|
| 272 |
|
| 273 |
```
|