Views
No views yet
| Vision encoder | google/siglip2-base-patch16-224 (frozen) |
| LLM | Qwen/Qwen2.5-0.5B-Instruct (LoRA: q,k,v,o,gate,up,down) |
| Visual tokens | 49 per image (14x14 patches, 2x2 pixel-shuffle) |
| Image placeholder | `< |
| Stage 1 | projector alignment on Flickr8k + Flickr30k captions |
| Stage 2 | LoRA instruction tuning on VQAv2 + LLaVA-ReCap + captions |
What color is the bus?
Answer the question using a single word or phrase. -> "red"
What color is the bus? -> "The bus is red."projector.pt -- projector weights (pool_stride is recoverable from the tensor shapes)lora_adapter/ -- PEFT adapter for the LLMModel/model.py,
Model/dataset.py, Inference/inference.py):1from huggingface_hub import hf_hub_download, snapshot_download
2from inference import load_model, answer
3
4projector = hf_hub_download(repo_id="dhruvpatel93/tinyvlm-vqa", filename="projector.pt")
5lora = snapshot_download(repo_id="dhruvpatel93/tinyvlm-vqa", allow_patterns=["lora_adapter/*"]) + "/lora_adapter"
6
7model = load_model(projector, lora, device="cuda")
8print(answer(model, "photo.jpg", "What is in this image?"))
9print(answer(model, "photo.jpg", "What color is the car?", short_answer=True))