Views
No views yet
Note: This repo ships the adapter only. Load it on top ofQwen/Qwen2-VL-2B-Instruct.
1from transformers import AutoModelForCausalLM, AutoTokenizer
2from peft import PeftModel
3from PIL import Image
4
5base = "Qwen/Qwen2-VL-2B-Instruct"
6adapter = "soupstick/qwen2vl-amazon-ft-lora"
7
8model = AutoModelForCausalLM.from_pretrained(base, trust_remote_code=True, device_map="auto")
9model = PeftModel.from_pretrained(model, adapter)
10tok = AutoTokenizer.from_pretrained(base, trust_remote_code=True)
11
12img = Image.open("sample.png").convert("RGB")
13resp, _ = model.chat(tok, query="<image>\nGenerate Amazon listing.", history=[], image=img)
14print(resp)
15Training
16
17Framework: LLaMA-Factory (LoRA)
18
19Task: Multimodal instruction-following for e-commerce listings
20
21Data: community dataset (see the dataset card linked below)