Instructions to use zhangkangning/VAD_for_Qwen3.5-4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zhangkangning/VAD_for_Qwen3.5-4b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="zhangkangning/VAD_for_Qwen3.5-4b") 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("zhangkangning/VAD_for_Qwen3.5-4b") model = AutoModelForMultimodalLM.from_pretrained("zhangkangning/VAD_for_Qwen3.5-4b", 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 zhangkangning/VAD_for_Qwen3.5-4b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zhangkangning/VAD_for_Qwen3.5-4b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zhangkangning/VAD_for_Qwen3.5-4b", "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/zhangkangning/VAD_for_Qwen3.5-4b
- SGLang
How to use zhangkangning/VAD_for_Qwen3.5-4b 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 "zhangkangning/VAD_for_Qwen3.5-4b" \ --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": "zhangkangning/VAD_for_Qwen3.5-4b", "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 "zhangkangning/VAD_for_Qwen3.5-4b" \ --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": "zhangkangning/VAD_for_Qwen3.5-4b", "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 zhangkangning/VAD_for_Qwen3.5-4b with Docker Model Runner:
docker model run hf.co/zhangkangning/VAD_for_Qwen3.5-4b
VAD for Qwen3.5-4B
This repository contains the merged inference checkpoint of Visual Attribution Distillation (VAD) built on Qwen3.5-4B.
This is the main 4B VAD model trained with the symmetric Jensen--Shannon
divergence (JSD) objective. It is the global_step_80 checkpoint reported in
the paper, with an unweighted six-benchmark average of 78.32 under the
Vision-OPD official evaluation pipeline and GPT-OSS-120B judge.
Model description
Multimodal on-policy distillation normally transfers the complete correction proposed by a privileged teacher. That correction can mix visual evidence with language preferences, formatting behavior, and other teacher-specific effects. VAD instead asks which part of the correction is attributable to a controlled change in the relevant visual evidence.
At each student-generated prefix, VAD evaluates the same fixed teacher with the evidence present and removed. The resulting distributional response provides a signed proxy direction for visual support and refutation. VAD projects the teacher correction onto this direction, allocates separate budgets to supported and refuted candidate tokens, and reconstructs a target around the full-image student distribution. The reconstructed target supplies the primary JSD supervision, while the original privileged teacher contributes only a weak stability regularizer.
The auxiliary teacher views are used only during training. Inference requires a single image and uses the standard Qwen3.5-4B architecture.
Checkpoint identity
| Item | Value |
|---|---|
| Base model | Qwen/Qwen3.5-4B |
| Internal run | VC-OPD-Qwen3.5-4B-BASVCtau08-fixedInitialTeacher-anchorEta01-norhogate-nocap-8gpu-bs96-vllm18944-eval10-2epoch-20260623_223705 |
| Released checkpoint | global_step_80 |
| Primary supervision | Symmetric JSD, $\alpha=0.5$ |
| VAD target | Branch-separated, budgeted visual support and refutation |
| Positive-branch cap | $\tau_+=0.8$ |
| Weak teacher-regularizer weight | $\lambda=0.1$ |
| Projection stabilizer | $\zeta=10^{-3}$ |
| Coordinate shift bound | $c=20$ |
| Teacher | Frozen copy of the initial Qwen3.5-4B student |
| Training schedule | 2 epochs / 130 steps; checkpoint selected at step 80 |
| Learning rate | $2\times10^{-6}$ |
| Train batch size | 96 |
| Rollouts per prompt | 8 |
| Maximum prompt / response length | 8192 / 1024 tokens |
| Training context length | 18,944 tokens |
| Training GPUs | 8 |
| Random seed | 42 |
Training used 6,241 synthetic visual question-answering examples. Each example contains a full image, an evidence-present crop, and a spatially matched evidence-degraded crop. The primary token-level target is evaluated over the student top-100 support plus a tail bucket. During training, VStar, ZoomBench, HRBench-4K, and HRBench-8K were monitored every 10 optimization steps.
Evaluation
We evaluated this checkpoint using the Vision-OPD official inference and
accuracy pipeline with openai/gpt-oss-120b as judge. Inference used
max_model_len=32768, MAX_TOKENS=8192, ENABLE_THINKING=False, and seed 42.
The judge used temperature 0. All answer and judge files passed the completeness
audit, with no non-canonical final judge labels.
| Benchmark | Accuracy |
|---|---|
| VStar | 92.15 |
| ZoomBench | 60.59 |
| HRBench-4K | 85.38 |
| HRBench-8K | 83.38 |
| MME-RealWorld-EN | 76.97 |
| MME-RealWorld-CN | 71.47 |
| Unweighted average | 78.32 |
These results are specific to this checkpoint, benchmark versions, inference configuration, and judge protocol.
Serving with vLLM
Use a recent vLLM release with Qwen3.5 support:
vllm serve zhangkangning/VAD_for_Qwen3.5-4b \
--host 0.0.0.0 \
--port 8000 \
--served-model-name VAD-Qwen3.5-4B \
--trust-remote-code \
--tensor-parallel-size 1 \
--max-model-len 32768 \
--gpu-memory-utilization 0.90
Example OpenAI-compatible multimodal request:
from openai import OpenAI
client = OpenAI(base_url="http://127.0.0.1:8000/v1", api_key="EMPTY")
response = client.chat.completions.create(
model="VAD-Qwen3.5-4B",
messages=[
{
"role": "user",
"content": [
{
"type": "image_url",
"image_url": {"url": "https://example.com/image.jpg"},
},
{
"type": "text",
"text": "Describe the fine-grained visual details.",
},
],
}
],
max_tokens=1024,
temperature=0,
extra_body={"chat_template_kwargs": {"enable_thinking": False}},
)
print(response.choices[0].message.content)
Replace the placeholder image URL with an accessible image URL or a supported data URL.
Intended use and limitations
- This checkpoint is intended for research on multimodal perception, fine-grained visual question answering, and on-policy distillation.
- Performance outside the reported visual benchmarks, including broad language capability, safety, bias, and robustness, has not been comprehensively evaluated.
- Like other vision-language models, it may produce incorrect or unsupported answers. Independently verify outputs in high-stakes settings.
- The model inherits the capabilities and limitations of Qwen3.5-4B.
License
The checkpoint is released under the Apache License 2.0, consistent with the base model. Users must also comply with the Qwen3.5-4B license.
Citation
The public paper identifier and final citation will be added when available. No provisional bibliographic entry is provided here.
- Downloads last month
- 28