Instructions to use PRIME-RL/P1-VL-235B-A22B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PRIME-RL/P1-VL-235B-A22B 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-235B-A22B") 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)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("PRIME-RL/P1-VL-235B-A22B") model = AutoModelForMultimodalLM.from_pretrained("PRIME-RL/P1-VL-235B-A22B", 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=256) 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-235B-A22B 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-235B-A22B" # 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-235B-A22B", "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-235B-A22B
- SGLang
How to use PRIME-RL/P1-VL-235B-A22B 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-235B-A22B" \ --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-235B-A22B", "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-235B-A22B" \ --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-235B-A22B", "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-235B-A22B with Docker Model Runner:
docker model run hf.co/PRIME-RL/P1-VL-235B-A22B
Add metadata and links to paper and code
#1
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
| 3 |
---
|
| 4 |
|
| 5 |
<div align="center">
|
|
@@ -7,7 +9,9 @@ license: apache-2.0
|
|
| 7 |
</div>
|
| 8 |
|
| 9 |
<p align="center">
|
| 10 |
-
<a href="https://
|
|
|
|
|
|
|
| 11 |
<a href="https://phyarena.github.io/"><b>🏆 HiPhO Leaderboard</b></a>
|
| 12 |
</p>
|
| 13 |
|
|
@@ -22,7 +26,9 @@ license: apache-2.0
|
|
| 22 |
|
| 23 |
## Model Description
|
| 24 |
|
| 25 |
-
**P1-VL-235B-A22B** is the flagship variant of the P1-VL series, a high-performance open-source vision-language model specialized in physics reasoning.
|
|
|
|
|
|
|
| 26 |
|
| 27 |
### Key Highlights
|
| 28 |
|
|
@@ -162,7 +168,7 @@ We are grateful to the open-source community for their invaluable contributions.
|
|
| 162 |
@misc{p1vl2025,
|
| 163 |
title={P1-VL: Bridging Visual Perception and Scientific Reasoning in Physics Olympiads},
|
| 164 |
author={P1 Team},
|
| 165 |
-
year={
|
| 166 |
-
url={https://
|
| 167 |
}
|
| 168 |
-
```
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
library_name: transformers
|
| 4 |
+
pipeline_tag: image-text-to-text
|
| 5 |
---
|
| 6 |
|
| 7 |
<div align="center">
|
|
|
|
| 9 |
</div>
|
| 10 |
|
| 11 |
<p align="center">
|
| 12 |
+
<a href="https://huggingface.co/papers/2602.09443"><b>📜 Paper</b></a> |
|
| 13 |
+
<a href="https://github.com/PRIME-RL/P1-VL"><b>💻 Code</b></a> |
|
| 14 |
+
<a href="https://prime-rl.github.io/P1-VL/"><b>🌐 Project Page</b></a> |
|
| 15 |
<a href="https://phyarena.github.io/"><b>🏆 HiPhO Leaderboard</b></a>
|
| 16 |
</p>
|
| 17 |
|
|
|
|
| 26 |
|
| 27 |
## Model Description
|
| 28 |
|
| 29 |
+
**P1-VL-235B-A22B** is the flagship variant of the P1-VL series, a high-performance open-source vision-language model specialized in physics reasoning. It was introduced in [P1-VL: Bridging Visual Perception and Scientific Reasoning in Physics Olympiads](https://huggingface.co/papers/2602.09443).
|
| 30 |
+
|
| 31 |
+
Built on *Qwen3-VL-235B-A22B-Thinking* and refined through multi-stage reinforcement learning on curated physics competition data, P1-VL-235B-A22B becomes the first open-source Vision-Language Model (VLM) to secure 12 gold medals on HiPhO, ranking No.3 in the model leaderboard. The model effectively solves tasks that require precise diagram-to-logic alignment, demonstrating exceptional performance in physics Olympiad competitions.
|
| 32 |
|
| 33 |
### Key Highlights
|
| 34 |
|
|
|
|
| 168 |
@misc{p1vl2025,
|
| 169 |
title={P1-VL: Bridging Visual Perception and Scientific Reasoning in Physics Olympiads},
|
| 170 |
author={P1 Team},
|
| 171 |
+
year={2026},
|
| 172 |
+
url={https://arxiv.org/abs/2602.09443}
|
| 173 |
}
|
| 174 |
+
```
|