STAR-9B / README.md
Yizou's picture
Upload 21 files
7db63b4 verified
|
Raw History Blame Contribute Delete
2.71 kB
metadata
library_name: transformers
pipeline_tag: image-text-to-text
base_model: Qwen/Qwen3.5-9B
base_model_relation: finetune
license: apache-2.0
tags:
  - vision-language
  - visual-question-answering

STAR-Qwen3.5-9B

STAR-Qwen3.5-9B is a vision-language student fine-tuned from Qwen3.5-9B. This release contains the full BF16 student weights from training step 80, along with the tokenizer, image processor and chat template used for inference.

The student trained on 6,176 pairs of original and locally edited images. Each pair shares a question, with a different correct answer in each image. A frozen teacher uses an evidence crop and its mean-color control to form token-specific distillation targets. At inference the student answers directly from the image and question.

Run locally

Install PyTorch and its matching torchvision build, Transformers with Qwen3.5 support, Accelerate and Pillow. Set model_dir to the downloaded repository. The example uses a generated red square. Its image and text preprocessing was verified with Transformers 5.20.1.

import torch
from PIL import Image
from transformers import AutoModelForImageTextToText, AutoProcessor

model_dir = "./STAR-Qwen3.5-9B"
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)

Evaluation

Accuracy is expressed as a percentage. Avg6 is the unweighted mean of the six benchmark scores. These are the selected checkpoint's reported results under greedy, non-thinking evaluation with an 8,192-token output limit.

Model V* Zoom HR-Bench 4K HR-Bench 8K MME-RealWorld EN MME-RealWorld CN Avg6
Qwen3.5-9B 85.86 52.31 86.50 80.38 71.31 67.69 74.01
STAR-Qwen3.5-9B 93.72 62.25 87.00 84.50 73.50 72.50 78.91

License

These fine-tuned weights are released under the Apache License 2.0. See LICENSE and the upstream model card.