Image-Text-to-Text
Transformers
Safetensors
English
qwen2_5_vl
agent
conversational
text-generation-inference
Instructions to use LeonMiao/ViRC-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LeonMiao/ViRC-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="LeonMiao/ViRC-7B") 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("LeonMiao/ViRC-7B") model = AutoModelForMultimodalLM.from_pretrained("LeonMiao/ViRC-7B", 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 LeonMiao/ViRC-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LeonMiao/ViRC-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LeonMiao/ViRC-7B", "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/LeonMiao/ViRC-7B
- SGLang
How to use LeonMiao/ViRC-7B 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 "LeonMiao/ViRC-7B" \ --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": "LeonMiao/ViRC-7B", "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 "LeonMiao/ViRC-7B" \ --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": "LeonMiao/ViRC-7B", "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 LeonMiao/ViRC-7B with Docker Model Runner:
docker model run hf.co/LeonMiao/ViRC-7B
Sync README fixes and CVPR citation
Browse files
README.md
CHANGED
|
@@ -27,7 +27,7 @@ library_name: transformers
|
|
| 27 |
## π₯ News
|
| 28 |
|
| 29 |
- **[2026.04.09]** We officially open-source the **CRUX dataset** and **ViRC models** as scheduled. π
|
| 30 |
-
- **[2026.03.01]** The **
|
| 31 |
- **[2026.02.21]** ViRC has been accepted by **CVPR 2026**. π
|
| 32 |
- **[2025.12.16]** We release the [arxiv paper](https://arxiv.org/abs/2512.14654v3) and the code. π₯
|
| 33 |
|
|
@@ -74,14 +74,14 @@ conda activate virc
|
|
| 74 |
Install additional dependencies:
|
| 75 |
|
| 76 |
```bash
|
| 77 |
-
bash
|
| 78 |
```
|
| 79 |
|
| 80 |
### π Training
|
| 81 |
|
| 82 |
### Preparation
|
| 83 |
|
| 84 |
-
Download our [dataset](https://huggingface.co/datasets/LeonMiao/
|
| 85 |
|
| 86 |
```bash
|
| 87 |
huggingface-cli repo download --repo-type dataset LeonMiao/CRUX --local-dir ./data
|
|
@@ -113,8 +113,8 @@ DISABLE_VERSION_CHECK=1 llamafactory-cli train src/train/stage_2_PracSFT.yaml
|
|
| 113 |
```bash
|
| 114 |
pip install datasets==4.0.0
|
| 115 |
# Start Qwen2.5-VL-72B-Instruct with vLLM, and update Lines 32, 36, and 37 accordingly (the model-related settings).
|
| 116 |
-
\cp -f src/train/reward_for_scale_dynamic.py ./verl/utils/reward_score/
|
| 117 |
-
bash src/train/stage_3_StratRL
|
| 118 |
```
|
| 119 |
|
| 120 |
#### Notes on Training Config
|
|
@@ -156,15 +156,19 @@ python src/evaluation/ViRC_scale_dynamic.py
|
|
| 156 |
|
| 157 |
### π₯³ Acknowledgements
|
| 158 |
|
| 159 |
-
We would like to thank [LLaMA-Factory](https://github.com/hiyouga/
|
| 160 |
|
| 161 |
## β
Citation
|
| 162 |
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 169 |
}
|
| 170 |
```
|
|
|
|
| 27 |
## π₯ News
|
| 28 |
|
| 29 |
- **[2026.04.09]** We officially open-source the **CRUX dataset** and **ViRC models** as scheduled. π
|
| 30 |
+
- **[2026.03.01]** The **CRUX dataset** and **ViRC models** are ready and are currently **under internal review at Ant Group**. Full open-sourcing will be completed **no later than 2026.04.19**.β‘οΈ
|
| 31 |
- **[2026.02.21]** ViRC has been accepted by **CVPR 2026**. π
|
| 32 |
- **[2025.12.16]** We release the [arxiv paper](https://arxiv.org/abs/2512.14654v3) and the code. π₯
|
| 33 |
|
|
|
|
| 74 |
Install additional dependencies:
|
| 75 |
|
| 76 |
```bash
|
| 77 |
+
bash setup.sh
|
| 78 |
```
|
| 79 |
|
| 80 |
### π Training
|
| 81 |
|
| 82 |
### Preparation
|
| 83 |
|
| 84 |
+
Download our [dataset](https://huggingface.co/datasets/LeonMiao/CRUX), and extract `ViRC_images.tar.lz4`:
|
| 85 |
|
| 86 |
```bash
|
| 87 |
huggingface-cli repo download --repo-type dataset LeonMiao/CRUX --local-dir ./data
|
|
|
|
| 113 |
```bash
|
| 114 |
pip install datasets==4.0.0
|
| 115 |
# Start Qwen2.5-VL-72B-Instruct with vLLM, and update Lines 32, 36, and 37 accordingly (the model-related settings).
|
| 116 |
+
\cp -f src/train/reward_for_scale_dynamic.py ./verl/verl/utils/reward_score/__init__.py
|
| 117 |
+
bash src/train/stage_3_StratRL.sh
|
| 118 |
```
|
| 119 |
|
| 120 |
#### Notes on Training Config
|
|
|
|
| 156 |
|
| 157 |
### π₯³ Acknowledgements
|
| 158 |
|
| 159 |
+
We would like to thank [LLaMA-Factory](https://github.com/hiyouga/LlamaFactory) and [verl](https://github.com/verl-project/verl), upon which our repo is built.
|
| 160 |
|
| 161 |
## β
Citation
|
| 162 |
|
| 163 |
+
[CVPR 2026 paper](https://openaccess.thecvf.com/content/CVPR2026/html/Wang_ViRC_Enhancing_Visual_Interleaved_Mathematical_CoT_with_Reason_Chunking_CVPR_2026_paper.html)
|
| 164 |
+
|
| 165 |
+
```bibtex
|
| 166 |
+
@InProceedings{Wang_2026_CVPR,
|
| 167 |
+
author = {Wang, Lihong and Li, Liangqi and Feng, Weiwei and Wu, Jiamin and Miao, Changtao and Wu, Tieru and Ma, Rui and Zhang, Bo and Li, Zhe},
|
| 168 |
+
title = {ViRC: Enhancing Visual Interleaved Mathematical CoT with Reason Chunking},
|
| 169 |
+
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
|
| 170 |
+
month = {June},
|
| 171 |
+
year = {2026},
|
| 172 |
+
pages = {26144--26153}
|
| 173 |
}
|
| 174 |
```
|