Instructions to use Hugo0713/vision-opd-qwen3.5-4b-reproduction with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Hugo0713/vision-opd-qwen3.5-4b-reproduction with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Hugo0713/vision-opd-qwen3.5-4b-reproduction") 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("Hugo0713/vision-opd-qwen3.5-4b-reproduction") model = AutoModelForMultimodalLM.from_pretrained("Hugo0713/vision-opd-qwen3.5-4b-reproduction", 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 Hugo0713/vision-opd-qwen3.5-4b-reproduction with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Hugo0713/vision-opd-qwen3.5-4b-reproduction" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Hugo0713/vision-opd-qwen3.5-4b-reproduction", "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/Hugo0713/vision-opd-qwen3.5-4b-reproduction
- SGLang
How to use Hugo0713/vision-opd-qwen3.5-4b-reproduction 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 "Hugo0713/vision-opd-qwen3.5-4b-reproduction" \ --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": "Hugo0713/vision-opd-qwen3.5-4b-reproduction", "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 "Hugo0713/vision-opd-qwen3.5-4b-reproduction" \ --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": "Hugo0713/vision-opd-qwen3.5-4b-reproduction", "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 Hugo0713/vision-opd-qwen3.5-4b-reproduction with Docker Model Runner:
docker model run hf.co/Hugo0713/vision-opd-qwen3.5-4b-reproduction
Vision-OPD Qwen3.5-4B Reproduction
This repository contains an unofficial reproduction of Vision-OPD based on
Qwen/Qwen3.5-4B. It is not an official model release from the Vision-OPD
authors.
Vision-OPD applies regional-to-global on-policy self-distillation to improve
fine-grained visual perception. This checkpoint was produced with the public
Vision-OPD implementation and the
public yuanqianhao/Vision-OPD-6K
training set.
Training
| Setting | Value |
|---|---|
| Base model | Qwen/Qwen3.5-4B |
| Training data | yuanqianhao/Vision-OPD-6K (6,241 samples) |
| Epochs | 1 |
| Final step | 65 |
| Batch size | 96 |
| Rollouts per prompt | 8 |
| Learning rate | 2e-6 |
| Hardware | 8 x NVIDIA B200 |
The uploaded artifact is the merged Transformers checkpoint, not an FSDP training shard.
Evaluation
Generation used non-thinking mode with a maximum output length of 32,768
tokens. The answer judge was openai/gpt-oss-120b, served locally with a
65,536-token context window and a 2,048-token judge output limit.
| Benchmark | Qwen3.5-4B baseline | This reproduction | Paper Vision-OPD-4B |
|---|---|---|---|
| V* | 84.29 | 90.05 | 92.15 |
| ZoomBench | 47.69 | 59.64 | 59.76 |
| HRBench-4K | 84.38 | 81.75 | 84.50 |
| HRBench-8K | 80.13 | 80.00 | 80.38 |
| MME-RealWorld-EN | 63.86 | 71.96 | 74.88 |
| MME-RealWorld-CN | 63.70 | 69.56 | 70.76 |
| Average | 70.68 | 75.49 | 77.07 |
The reproduction improves the six-benchmark average by 4.81 points over the reported Qwen3.5-4B baseline and remains 1.58 points below the paper result.
Usage
Use a recent Transformers release with Qwen3.5 support (transformers>=5.5.0).
from transformers import AutoModelForMultimodalLM, AutoProcessor
model_id = "Hugo0713/vision-opd-qwen3.5-4b-reproduction"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForMultimodalLM.from_pretrained(
model_id,
torch_dtype="auto",
device_map="auto",
)
The model can also be served with vLLM:
vllm serve Hugo0713/vision-opd-qwen3.5-4b-reproduction \
--served-model-name Vision-OPD-4B \
--gpu-memory-utilization 0.85
Limitations
This is a single reproduction run. The reported results depend on the local inference and judge configuration described above and should not be treated as an official Vision-OPD release.
Citation
@article{yuan2026vision,
title={Vision-OPD: Learning to See Fine Details for Multimodal LLMs via On-Policy Self-Distillation},
author={Yuan, Qianhao and Lou, Jie and Yu, Xing and Lin, Hongyu and Sun, Le and Han, Xianpei and Lu, Yaojie},
journal={arXiv preprint arXiv:2605.18740},
year={2026}
}
License
Apache-2.0. See LICENSE for details.
- Downloads last month
- 10