Views
No views yet
| Setting | Value |
|---|---|
| Base model | unsloth/Qwen2-VL-7B-Instruct-bnb-4bit |
| Method | QLoRA (r=16, alpha=16) |
| Precision | float16 (merged) |
| Max seq length | 2048 |
| Steps | 60 |
| Date | 2026-07-26 |
1from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor
2from qwen_vl_utils import process_vision_info
3import torch
4
5model_id = "vorenthiclabs/vorenthos-vision-coding-qwen25vl-7b"
6processor = AutoProcessor.from_pretrained(model_id)
7model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
8 model_id, torch_dtype=torch.float16, device_map="auto"
9)
10
11messages = [
12 {
13 "role": "user",
14 "content": [
15 {"type": "image", "image": "https://your-code-screenshot.png"},
16 {"type": "text", "text": "Reproduce the code shown in this screenshot."}
17 ]
18 }
19]
20text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
21inputs = processor(text=[text], images=[...], return_tensors="pt").to(model.device)
22output = model.generate(**inputs, max_new_tokens=1024, temperature=0.1)
23print(processor.decode(output[0], skip_special_tokens=True))