Views
No views yet
| Setup | LLM-judge |
|---|---|
| Uncompressed (0x) ceiling, base Qwen3-VL-4B | 0.958 |
| This adapter @ 3x | 0.894 |
| Base Qwen3-VL-4B @ 3x (no SFT) | 0.826 |
Qwen/Qwen3-VL-4B-Instruct8001/sqrt(3) per dimension using PIL LANCZOS, e.g. a 1200×800 screenshot becomes 692×461 px (~33% of original pixels).1from transformers import AutoProcessor, Qwen3VLForConditionalGeneration
2from peft import PeftModel
3import torch
4
5base = "Qwen/Qwen3-VL-4B-Instruct"
6adapter = "Chrisyichuan/qwen3vl-4b-wiki-screenshot-3x-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# PIL image already compressed to 3x
13messages = [{"role": "user", "content": [
14 {"type": "image", "image": your_compressed_image},
15 {"type": "text", "text": your_question},
16]}]
17# ... standard Qwen3-VL inferencesft/RESULTS.md of the source repo.