Upload folder using huggingface_hub
Browse filesFiles changed (11)
- .gitattributes+1
- dataset9/.gitattributesAdded+36
- dataset9/.ms_upload_cacheAdded+1
- dataset9/README.mdAdded+124
- dataset9/chat_template.jinjaAdded+122
- dataset9/config.jsonAdded+112
- dataset9/generation_config.jsonAdded+9
- dataset9/model.safetensorsAdded+3
- dataset9/processor_config.jsonAdded+60
- dataset9/tokenizer.jsonAdded+3
- dataset9/tokenizer_config.jsonAdded+32
58 unmodified lines59606158 unmodified lines*.mp4 filter=lfs diff=lfs merge=lfs -text*.webm filter=lfs diff=lfs merge=lfs -textdataset4/tokenizer.json filter=lfs diff=lfs merge=lfs -text58 unmodified lines5960616258 unmodified lines*.mp4 filter=lfs diff=lfs merge=lfs -text*.webm filter=lfs diff=lfs merge=lfs -textdataset4/tokenizer.json filter=lfs diff=lfs merge=lfs -textdataset9/tokenizer.json filter=lfs diff=lfs merge=lfs -text
123456789101112131415161718192021222324252627282930313233343536*.7z filter=lfs diff=lfs merge=lfs -text*.arrow filter=lfs diff=lfs merge=lfs -text*.bin filter=lfs diff=lfs merge=lfs -text*.bz2 filter=lfs diff=lfs merge=lfs -text*.ckpt filter=lfs diff=lfs merge=lfs -text*.ftz filter=lfs diff=lfs merge=lfs -text*.gz filter=lfs diff=lfs merge=lfs -text*.h5 filter=lfs diff=lfs merge=lfs -text*.joblib filter=lfs diff=lfs merge=lfs -text*.lfs.* filter=lfs diff=lfs merge=lfs -text*.mlmodel filter=lfs diff=lfs merge=lfs -text*.model filter=lfs diff=lfs merge=lfs -text*.msgpack filter=lfs diff=lfs merge=lfs -text*.npy filter=lfs diff=lfs merge=lfs -text*.npz filter=lfs diff=lfs merge=lfs -text*.onnx filter=lfs diff=lfs merge=lfs -text*.ot filter=lfs diff=lfs merge=lfs -text*.parquet filter=lfs diff=lfs merge=lfs -text*.pb filter=lfs diff=lfs merge=lfs -text*.pickle filter=lfs diff=lfs merge=lfs -text*.pkl filter=lfs diff=lfs merge=lfs -text*.pt filter=lfs diff=lfs merge=lfs -text*.pth filter=lfs diff=lfs merge=lfs -text*.rar filter=lfs diff=lfs merge=lfs -text*.safetensors filter=lfs diff=lfs merge=lfs -textsaved_model/**/* filter=lfs diff=lfs merge=lfs -text*.tar.* filter=lfs diff=lfs merge=lfs -text*.tar filter=lfs diff=lfs merge=lfs -text*.tflite filter=lfs diff=lfs merge=lfs -text*.tgz filter=lfs diff=lfs merge=lfs -text*.wasm filter=lfs diff=lfs merge=lfs -text*.xz filter=lfs diff=lfs merge=lfs -text*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -texttokenizer.json filter=lfs diff=lfs merge=lfs -text1{"version": 3, "repo_id": "SIGSjjy/benchmarkdata", "files": {"dataset9/tokenizer.json|1789976656.9442096|19989343": {"hash": "87a7830d63fcf43bf241c3c5242e96e62dd3fdc29224ca26fed8ea333db72de4", "size": 19989343, "status": "c"}, "dataset9/model.safetensors|1789977119.7610369|18819720264": {"hash": "8727e447b3d42e589672c1b27443a6e8399c92ccfc90ebde3f9cb7e8496d9b9f", "size": 18819720264, "status": "c"}, "dataset9/.gitattributes|1789976654.7901769|1570": {"hash": "34448b82c17d60fec9b65b1f093c115ddbaadc04beb1b0140b6bfed2e012a930", "size": 1570, "status": "c"}, "dataset9/config.json|1789976655.4109192|2900": {"hash": "995196f6106dfbb228e3f198b3eaf14985ef437de88ca5fa5f8910eaf83b2353", "size": 2900, "status": "c"}, "dataset9/generation_config.json|1789976655.3742962|204": {"hash": "5f02aa641d88dd1b466df7b5ef82e5829629d28931a9e6a6750ddfd2b796b812", "size": 204, "status": "c"}, "dataset9/README.md|1789976658.1813314|6178": {"hash": "e510652ae7d79ccd5f2dc0d83c6849033d1f506bc029cbb88a10152daad05988", "size": 6178, "status": "c"}, "dataset9/chat_template.jinja|1789976655.3687828|5415": {"hash": "d9604b52b4e1f4b9ec68e065238c757a3d7efdebe1c3692d13a97df6f84c54db", "size": 5415, "status": "c"}, "dataset9/processor_config.json|1789976662.8358223|1191": {"hash": "d89ef49ce9cd37fbf510158e13c1ef063d9286411c1ec9049932dbe0487143b1", "size": 1191, "status": "c"}, "dataset9/tokenizer_config.json|1789976656.123347|1139": {"hash": "e98f1901ac6f0adff67b1d540bfa0c36ac1a0cf59eb72ed78146ef89aafa1182", "size": 1139, "status": "c"}}}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124---license: apache-2.0base_model:- Qwen/Qwen3.5-9Blanguage:- en- zhlibrary_name: transformerspipeline_tag: image-text-to-textdatasets:- yuanqianhao/Vision-OPD-6Ktags:- multimodal- vision-language- fine-grained-visual-understanding- on-policy-distillation- self-distillation---
# Vision-OPD-9B
<p align="center"> 📄 <a href="https://arxiv.org/abs/2605.18740">Paper</a> | 💻 <a href="https://github.com/VisionOPD/Vision-OPD">Code</a> | 🤗 <a href="https://huggingface.co/datasets/yuanqianhao/Vision-OPD-6K">Training Data</a> | 📦 <a href="https://hf.co/collections/yuanqianhao/vision-opd">Collection</a></p>
## Model Summary
**Vision-OPD-9B** is a multimodal LLM built on [`Qwen/Qwen3.5-9B`](https://huggingface.co/Qwen/Qwen3.5-9B) and trained with**Vision-OPD (Vision On-Policy Distillation)**, the regional-to-global self-distillation framework introduced in[Vision-OPD: Learning to See Fine Details for Multimodal LLMs via On-Policy Self-Distillation](https://arxiv.org/abs/2605.18740).
MLLMs often answer fine-grained questions correctly when given an evidence-centered **crop**, yet fail on the corresponding**full image** — a persistent *regional-to-global perception gap*. Vision-OPD closes this gap by letting the model act as itsown teacher: a **crop-conditioned teacher** and a **full-image-conditioned student** are instantiated from the same MLLM, thestudent generates on-policy rollouts, and training minimizes the token-level divergence between the two distributions alongthese rollouts. The benefit of visual zooming is thereby internalized into a **single forward pass** — no external teacher,no ground-truth labels, no reward verifiers, and no inference-time tool use.
With only **6.2K synthetic samples**, Vision-OPD-9B outperforms much larger open-source models (e.g., Qwen3.5-397B, Kimi-K2.6),closed-source models (e.g., GPT-5.4, Gemini-3.1-Pro), and "Thinking-with-Images" agentic methods on fine-grained visualunderstanding benchmarks, while preserving general multimodal abilities on holdout tasks.
## Key Features
- 🔍 **Sees fine details in one forward pass** — no cropping tools, zoom-in calls, or multi-step agentic inference at test time.- 🪞 **Self-distillation, label-free** — the model's own crop-conditioned perception supervises its full-image policy; no external teacher, ground-truth labels, or reward verifiers.- 🎯 **On-policy + dense supervision** — token-level divergence (JSD, β = 0.5) on the student's own rollouts avoids the exposure bias of SFT and the sparse rewards of RLVR.- 📉 **Data-efficient** — trained on only 6.2K automatically synthesized samples ([Vision-OPD-6K](https://huggingface.co/datasets/yuanqianhao/Vision-OPD-6K)), one epoch.- 🧠 **No forgetting** — general multimodal capability is preserved on holdout tasks (MMVP, CV-Bench, MMStar, POPE).
## How It Works
1. **Data synthesis** — evidence regions are proposed on unlabeled images via object identification and segmentation; a question answerable from the crop alone is generated, and the region's bounding box is overlaid on the full image for grounding. This yields triplets *(full image, crop, question)*.2. **Two policies, one model** — the teacher conditions on the privileged crop, the student on the full image.3. **On-policy distillation** — the student samples a rollout (up to 1024 tokens); at every position both policies are evaluated on the same student prefix, and the per-token JSD between them is minimized (top-K = 100 logits distillation). Gradients flow only through the student.4. **EMA teacher regularization** — the teacher is updated as an exponential moving average of the student (α = 0.05), which prevents teacher–student co-adaptation and training collapse.
## Quickstart
Weights load with standard `transformers` (≥ 5.5):
```pythonfrom transformers import AutoModelForImageTextToText, AutoProcessor
model_id = "yuanqianhao/Vision-OPD-9B"model = AutoModelForImageTextToText.from_pretrained(model_id, dtype="bfloat16", device_map="auto")processor = AutoProcessor.from_pretrained(model_id)
messages = [{ "role": "user", "content": [ {"type": "image", "url": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg"}, {"type": "text", "text": "What is the color of the label on the bottle in the background?"}, ],}]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=512)print(processor.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))```
Or serve with vLLM (OpenAI-compatible API), as used in our evaluation:
```bashvllm serve yuanqianhao/Vision-OPD-9B --port 8000```
To reproduce the reported numbers, use the released evaluation harness:
```bashgit clone https://github.com/VisionOPD/Vision-OPD && cd Vision-OPDbash eval/run_eval.sh # see README for API base / judge / benchmark env vars```
## Training Details
| | ||---|---|| Base model | [`Qwen/Qwen3.5-9B`](https://huggingface.co/Qwen/Qwen3.5-9B) (non-thinking mode) || Data | [Vision-OPD-6K](https://huggingface.co/datasets/yuanqianhao/Vision-OPD-6K) — 6.2K synthesized (full image, crop, question) triplets || Objective | Token-level JSD (β = 0.5) on on-policy student rollouts, top-K = 100 logits distillation || Teacher | Same model conditioned on the privileged crop, EMA-regularized (α = 0.05) || Rollout length | 1024 tokens, 1 epoch |
Training code: [github.com/VisionOPD/Vision-OPD](https://github.com/VisionOPD/Vision-OPD).
## Citation
```bibtex@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
Released under Apache-2.0, following the base model [`Qwen/Qwen3.5-9B`](https://huggingface.co/Qwen/Qwen3.5-9B).123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122{%- set _enable_thinking = enable_thinking if enable_thinking is defined else none %}{%- if tools %} {{- '<|im_start|>system\n' }} {%- if messages[0].role == 'system' %} {%- if messages[0].content is string %} {{- messages[0].content }} {%- else %} {%- for content in messages[0].content %} {%- if 'text' in content %} {{- content.text }} {%- endif %} {%- endfor %} {%- endif %} {{- '\n\n' }} {%- endif %} {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }} {%- for tool in tools %} {{- "\n" }} {{- tool | tojson }} {%- endfor %} {{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}{%- else %} {%- if messages[0].role == 'system' %} {{- '<|im_start|>system\n' }} {%- if messages[0].content is string %} {{- messages[0].content }} {%- else %} {%- for content in messages[0].content %} {%- if 'text' in content %} {{- content.text }} {%- endif %} {%- endfor %} {%- endif %} {{- '<|im_end|>\n' }} {%- endif %}{%- endif %}{%- set image_count = namespace(value=0) %}{%- set video_count = namespace(value=0) %}{%- for message in messages %} {%- if message.role == "user" %} {{- '<|im_start|>' + message.role + '\n' }} {%- if message.content is string %} {{- message.content }} {%- else %} {%- for content in message.content %} {%- if content.type == 'image' or 'image' in content or 'image_url' in content %} {%- set image_count.value = image_count.value + 1 %} {%- if add_vision_id %}Picture {{ image_count.value }}: {% endif -%} <|vision_start|><|image_pad|><|vision_end|> {%- elif content.type == 'video' or 'video' in content %} {%- set video_count.value = video_count.value + 1 %} {%- if add_vision_id %}Video {{ video_count.value }}: {% endif -%} <|vision_start|><|video_pad|><|vision_end|> {%- elif 'text' in content %} {{- content.text }} {%- endif %} {%- endfor %} {%- endif %} {{- '<|im_end|>\n' }} {%- elif message.role == "assistant" %} {{- '<|im_start|>' + message.role + '\n' }} {%- if message.content is string %} {{- message.content }} {%- else %} {%- for content_item in message.content %} {%- if 'text' in content_item %} {{- content_item.text }} {%- endif %} {%- endfor %} {%- endif %} {%- if message.tool_calls %} {%- for tool_call in message.tool_calls %} {%- if (loop.first and message.content) or (not loop.first) %} {{- '\n' }} {%- endif %} {%- if tool_call.function %} {%- set tool_call = tool_call.function %} {%- endif %} {{- '<tool_call>\n{"name": "' }} {{- tool_call.name }} {{- '", "arguments": ' }} {%- if tool_call.arguments is string %} {{- tool_call.arguments }} {%- else %} {{- tool_call.arguments | tojson }} {%- endif %} {{- '}\n</tool_call>' }} {%- endfor %} {%- endif %} {{- '<|im_end|>\n' }} {%- elif message.role == "tool" %} {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} {{- '<|im_start|>user' }} {%- endif %} {{- '\n<tool_response>\n' }} {%- if message.content is string %} {{- message.content }} {%- else %} {%- for content in message.content %} {%- if content.type == 'image' or 'image' in content or 'image_url' in content %} {%- set image_count.value = image_count.value + 1 %} {%- if add_vision_id %}Picture {{ image_count.value }}: {% endif -%} <|vision_start|><|image_pad|><|vision_end|> {%- elif content.type == 'video' or 'video' in content %} {%- set video_count.value = video_count.value + 1 %} {%- if add_vision_id %}Video {{ video_count.value }}: {% endif -%} <|vision_start|><|video_pad|><|vision_end|> {%- elif 'text' in content %} {{- content.text }} {%- endif %} {%- endfor %} {%- endif %} {{- '\n</tool_response>' }} {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} {{- '<|im_end|>\n' }} {%- endif %} {%- endif %}{%- endfor %}{%- if add_generation_prompt %} {{- '<|im_start|>assistant\n' }} {{- '<think>\n\n</think>\n\n' }}{%- endif %}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112{ "architectures": [ "Qwen3_5ForConditionalGeneration" ], "bos_token_id": null, "dtype": "bfloat16", "eos_token_id": 248046, "image_token_id": 248056, "model_type": "qwen3_5", "pad_token_id": 248044, "text_config": { "attention_bias": false, "attention_dropout": 0.0, "attn_output_gate": true, "bos_token_id": null, "dtype": "bfloat16", "eos_token_id": 248044, "full_attention_interval": 4, "head_dim": 256, "hidden_act": "silu", "hidden_size": 4096, "initializer_range": 0.02, "intermediate_size": 12288, "layer_types": [ "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention" ], "linear_conv_kernel_dim": 4, "linear_key_head_dim": 128, "linear_num_key_heads": 16, "linear_num_value_heads": 32, "linear_value_head_dim": 128, "mamba_ssm_dtype": "float32", "max_position_embeddings": 262144, "mlp_only_layers": [], "model_type": "qwen3_5_text", "mtp_num_hidden_layers": 1, "mtp_use_dedicated_embeddings": false, "num_attention_heads": 16, "num_hidden_layers": 32, "num_key_value_heads": 4, "pad_token_id": null, "partial_rotary_factor": 0.25, "rms_norm_eps": 1e-06, "rope_parameters": { "mrope_interleaved": true, "mrope_section": [ 11, 11, 10 ], "partial_rotary_factor": 0.25, "rope_theta": 10000000, "rope_type": "default" }, "tie_word_embeddings": false, "use_cache": true, "vocab_size": 248320 }, "tie_word_embeddings": false, "transformers_version": "5.5.0", "video_token_id": 248057, "vision_config": { "deepstack_visual_indexes": [], "depth": 27, "dtype": "bfloat16", "hidden_act": "gelu_pytorch_tanh", "hidden_size": 1152, "in_channels": 3, "initializer_range": 0.02, "intermediate_size": 4304, "model_type": "qwen3_5", "num_heads": 16, "num_position_embeddings": 2304, "out_hidden_size": 4096, "patch_size": 16, "spatial_merge_size": 2, "temporal_patch_size": 2 }, "vision_end_token_id": 248054, "vision_start_token_id": 248053}123456789{ "_from_model_config": true, "eos_token_id": 248046, "output_attentions": false, "output_hidden_states": false, "pad_token_id": 248044, "transformers_version": "5.5.0", "use_cache": true}123version https://git-lfs.github.com/spec/v1oid sha256:8727e447b3d42e589672c1b27443a6e8399c92ccfc90ebde3f9cb7e8496d9b9fsize 18819720264123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960{ "image_processor": { "do_convert_rgb": true, "do_normalize": true, "do_rescale": true, "do_resize": true, "image_mean": [ 0.5, 0.5, 0.5 ], "image_processor_type": "Qwen2VLImageProcessor", "image_std": [ 0.5, 0.5, 0.5 ], "merge_size": 2, "patch_size": 16, "resample": 3, "rescale_factor": 0.00392156862745098, "size": { "longest_edge": 16777216, "shortest_edge": 65536 }, "temporal_patch_size": 2 }, "processor_class": "Qwen3VLProcessor", "video_processor": { "do_convert_rgb": true, "do_normalize": true, "do_rescale": true, "do_resize": true, "do_sample_frames": true, "fps": 2, "image_mean": [ 0.5, 0.5, 0.5 ], "image_std": [ 0.5, 0.5, 0.5 ], "max_frames": 768, "merge_size": 2, "min_frames": 4, "patch_size": 16, "resample": 3, "rescale_factor": 0.00392156862745098, "return_metadata": false, "size": { "longest_edge": 25165824, "shortest_edge": 4096 }, "temporal_patch_size": 2, "video_processor_type": "Qwen3VLVideoProcessor" }}123version https://git-lfs.github.com/spec/v1oid sha256:87a7830d63fcf43bf241c3c5242e96e62dd3fdc29224ca26fed8ea333db72de4size 199893431234567891011121314151617181920212223242526272829303132{ "add_prefix_space": false, "audio_bos_token": "<|audio_start|>", "audio_eos_token": "<|audio_end|>", "audio_token": "<|audio_pad|>", "backend": "tokenizers", "bos_token": null, "clean_up_tokenization_spaces": false, "eos_token": "<|im_end|>", "errors": "replace", "image_token": "<|image_pad|>", "is_local": true, "model_max_length": 262144, "model_specific_special_tokens": { "audio_bos_token": "<|audio_start|>", "audio_eos_token": "<|audio_end|>", "audio_token": "<|audio_pad|>", "image_token": "<|image_pad|>", "video_token": "<|video_pad|>", "vision_bos_token": "<|vision_start|>", "vision_eos_token": "<|vision_end|>" }, "pad_token": "<|endoftext|>", "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+", "processor_class": "Qwen3VLProcessor", "split_special_tokens": false, "tokenizer_class": "TokenizersBackend", "unk_token": null, "video_token": "<|video_pad|>", "vision_bos_token": "<|vision_start|>", "vision_eos_token": "<|vision_end|>"}.gitattributes+1
dataset9/.gitattributesAdded+36
dataset9/.ms_upload_cacheAdded+1
dataset9/README.mdAdded+124
dataset9/chat_template.jinjaAdded+122
dataset9/config.jsonAdded+112
dataset9/generation_config.jsonAdded+9
dataset9/model.safetensorsAdded+3
dataset9/processor_config.jsonAdded+60
dataset9/tokenizer.jsonAdded+3
dataset9/tokenizer_config.jsonAdded+32