STAR-Qwen3.5-4B
a capable vision-language model for image analysis
2 min read
STAR-Qwen3.5-4B is a multimodal model (VLM, a model that works with both text and images) fine-tuned from Qwen3.5-4B using knowledge distillation from a frozen teacher. It was trained on pairs of original and locally edited images paired with questions that have different answers, helping it better grasp context and fine visual details. It takes an uploaded image and outputs direct answers to text questions about it. This release is aimed at developers and researchers looking for a compact yet capable model for computer vision and visual analysis tasks.
Key features
- Base architecture: Built on the lightweight Qwen3.5-4B language model (roughly 5.17 billion parameters).
- Specialized training: Distilled on 6,176 pairs of locally edited images for accurate visual feature comparison.
- Benchmark gains: Delivers noticeable improvements across benchmarks (the Avg6 score rose from 71.27 to 79.31).
- Ready to run: The repository includes full BF16 weights (distilled at training step 60), the tokenizer, and the image processor.
What you can do
- Image analysis: Deploy the model in chatbots and apps to accurately answer questions about uploaded images.
- Edit detection: Leverage its ability to spot subtle differences between similar visuals.
- Pipeline integration: Load it via the Transformers library to test multimodal workflows locally.
Example
import torch
from PIL import Image
from transformers import AutoModelForImageTextToText, AutoProcessor
model_dir = "./STAR-Qwen3.5-4B"
processor = AutoProcessor.from_pretrained(model_dir)
model = AutoModelForImageTextToText.from_pretrained(
model_dir, dtype=torch.bfloat16, device_map="auto"
).eval()
messages = [{
"role": "user",
"content": [
{"type": "image", "image": Image.new("RGB", (224, 224), "red")},
{"type": "text", "text": "What color is the square?"},
]
}]
inputs = processor.apply_chat_template(
messages, add_generation_prompt=True, tokenize=True, enable_thinking=False,
return_dict=True, return_tensors="pt"
).to(model.device)
with torch.inference_mode():
output = model.generate(**inputs, do_sample=False, max_new_tokens=32)
answer = processor.batch_decode(
output[:, inputs["input_ids"].shape[1]:], skip_special_tokens=True
)[0]
print(answer)Read more
DetailsBenchmarks (Avg6): the base Qwen3.5-4B model scores 71.27, while STAR-Qwen3.5-4B reaches 79.31 (including a jump on MME-RealWorld EN from 63.81 to 77.76).
Requirements: BF16 weights, tested with Transformers 5.20.1.
Limitations: evaluated using greedy decoding with an 8,192-token output limit.
License: Apache License 2.0.










Comments