Image-Text-to-Text
Transformers
Safetensors
qwen3_vl_moe
science
physics
vision-language
reasoning
olympiad
conversational
Instructions to use PRIME-RL/P1-VL-30B-A3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PRIME-RL/P1-VL-30B-A3B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="PRIME-RL/P1-VL-30B-A3B") 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 AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("PRIME-RL/P1-VL-30B-A3B") model = AutoModelForMultimodalLM.from_pretrained("PRIME-RL/P1-VL-30B-A3B", device_map="auto") 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?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use PRIME-RL/P1-VL-30B-A3B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "PRIME-RL/P1-VL-30B-A3B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "PRIME-RL/P1-VL-30B-A3B", "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/PRIME-RL/P1-VL-30B-A3B
- SGLang
How to use PRIME-RL/P1-VL-30B-A3B 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 "PRIME-RL/P1-VL-30B-A3B" \ --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": "PRIME-RL/P1-VL-30B-A3B", "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 "PRIME-RL/P1-VL-30B-A3B" \ --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": "PRIME-RL/P1-VL-30B-A3B", "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 PRIME-RL/P1-VL-30B-A3B with Docker Model Runner:
docker model run hf.co/PRIME-RL/P1-VL-30B-A3B
Add metadata and link to paper/code (#1)
Browse files- Add metadata and link to paper/code (1b7b4babd4f66b040209b06089994e56576cdd78)
Co-authored-by: Niels Rogge <nielsr@users.noreply.huggingface.co>
README.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
| 4 |
|
| 5 |
<div align="center">
|
|
@@ -7,12 +15,12 @@ license: apache-2.0
|
|
| 7 |
</div>
|
| 8 |
|
| 9 |
<p align="center">
|
| 10 |
-
<a href="https://
|
| 11 |
-
<a href="https://
|
|
|
|
|
|
|
| 12 |
</p>
|
| 13 |
|
| 14 |
-
|
| 15 |
-
|
| 16 |
<p align="center">
|
| 17 |
<img src="hipho.png" style="width: 800px" align=center>
|
| 18 |
</p>
|
|
@@ -23,7 +31,7 @@ license: apache-2.0
|
|
| 23 |
|
| 24 |
## Model Description
|
| 25 |
|
| 26 |
-
**P1-VL-30B-A3B** is the mid-size variant of the P1-VL series, a high-performance open-source vision-language model specialized in physics reasoning.
|
| 27 |
|
| 28 |
### Key Highlights
|
| 29 |
|
|
@@ -155,8 +163,8 @@ We are grateful to the open-source community for their invaluable contributions.
|
|
| 155 |
```bibtex
|
| 156 |
@misc{p1vl2025,
|
| 157 |
title={P1-VL: Bridging Visual Perception and Scientific Reasoning in Physics Olympiads},
|
| 158 |
-
author={
|
| 159 |
-
year={
|
| 160 |
-
url={https://
|
| 161 |
}
|
| 162 |
-
```
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
library_name: transformers
|
| 4 |
+
pipeline_tag: image-text-to-text
|
| 5 |
+
tags:
|
| 6 |
+
- science
|
| 7 |
+
- physics
|
| 8 |
+
- vision-language
|
| 9 |
+
- reasoning
|
| 10 |
+
- olympiad
|
| 11 |
---
|
| 12 |
|
| 13 |
<div align="center">
|
|
|
|
| 15 |
</div>
|
| 16 |
|
| 17 |
<p align="center">
|
| 18 |
+
<a href="https://arxiv.org/abs/2602.09443"><b>π Paper</b></a> |
|
| 19 |
+
<a href="https://github.com/PRIME-RL/P1-VL"><b>π» Code</b></a> |
|
| 20 |
+
<a href="https://prime-rl.github.io/P1-VL/"><b>π Project Page</b></a> |
|
| 21 |
+
<a href="https://phyarena.github.io/"><b>π Leaderboard</b></a>
|
| 22 |
</p>
|
| 23 |
|
|
|
|
|
|
|
| 24 |
<p align="center">
|
| 25 |
<img src="hipho.png" style="width: 800px" align=center>
|
| 26 |
</p>
|
|
|
|
| 31 |
|
| 32 |
## Model Description
|
| 33 |
|
| 34 |
+
**P1-VL-30B-A3B** is the mid-size variant of the P1-VL series, a high-performance open-source vision-language model specialized in physics reasoning. Introduced in [P1-VL: Bridging Visual Perception and Scientific Reasoning in Physics Olympiads](https://huggingface.co/papers/2602.09443), it is built on *Qwen3-VL-30B-A3B-Thinking* and refined through multi-stage reinforcement learning on curated physics competition data. P1-VL-30B-A3B achieves impressive results while maintaining reasonable computational requirements, making it accessible for researchers working with physics problems that require visual understanding.
|
| 35 |
|
| 36 |
### Key Highlights
|
| 37 |
|
|
|
|
| 163 |
```bibtex
|
| 164 |
@misc{p1vl2025,
|
| 165 |
title={P1-VL: Bridging Visual Perception and Scientific Reasoning in Physics Olympiads},
|
| 166 |
+
author={Yun Luo and Futing Wang and Qianjia Cheng and Fangchen Yu and Haodi Lei and Jianhao Yan and Chenxi Li and Jiacheng Chen and Yufeng Zhao and Haiyuan Wan and Yuchen Zhang and Shenghe Zheng and Junchi Yao and Qingyang Zhang and Haonan He and Wenxuan Zeng and Li Sheng and Chengxing Xie and Yuxin Zuo and Yizhuo Li and Yulun Wu and Rui Huang and Dongzhan Zhou and Kai Chen and Yu Qiao and Lei Bai and Yu Cheng and Ning Ding and Bowen Zhou and Peng Ye and Ganqu Cui},
|
| 167 |
+
year={2026},
|
| 168 |
+
url={https://arxiv.org/abs/2602.09443}
|
| 169 |
}
|
| 170 |
+
```
|