Views
No views yet
| k (images per sample) | base Qwen3-VL-4B @ 0x (no compression, no SFT) | This adapter @ 2x | Δ |
|---|---|---|---|
| 1 | 0.958 | 0.946 | -0.012 |
| 2 | 0.912 | 0.950 | +0.038 |
| 3 | 0.892 | 0.954 | +0.062 |
| 4 | 0.856 | 0.936 | +0.080 |
freeze_vision_tower=false)Qwen/Qwen3-VL-4B-Instructcutoff_len: 10240 (scaled per compression — larger for smaller compression where each image takes more tokens)1/sqrt(2) via PIL LANCZOS).<image>×k \n {query} → gold answer.1from transformers import AutoProcessor, Qwen3VLForConditionalGeneration
2from peft import PeftModel
3import torch
4
5base = "Qwen/Qwen3-VL-4B-Instruct"
6adapter = "Chrisyichuan/qwen3vl-4b-wiki-screenshot-multik-2x-lora"
7
8model = Qwen3VLForConditionalGeneration.from_pretrained(base, torch_dtype=torch.bfloat16).cuda()
9model = PeftModel.from_pretrained(model, adapter).merge_and_unload()
10processor = AutoProcessor.from_pretrained(base)
11
12# k can be any integer in 1..6. Images must already be 2x-compressed.
13messages = [{"role": "user", "content": [
14 {"type": "image", "image": img_1},
15 # ... up to img_6 ...
16 {"type": "text", "text": your_question},
17]}]
18# ... standard Qwen3-VL inferenceChrisyichuan/qwen3vl-4b-wiki-screenshot-multik-3x-lora, Chrisyichuan/qwen3vl-4b-wiki-screenshot-multik-4x-lora.