Views
No views yet
Alignment checkpoint. Only the MLP projector was trained (on LLaVA-CC3M-Pretrain-595K) — the ViT and the Baguettotron LLM are unmodified base weights. It writes short captions and nothing more. Published so the alignment stage can be reproduced; for actual use take baguettotron-vision-vqa.
Image (448×448)
→ InternViT-300M-448px-V2.5 (304M, frozen) → 1024 tokens × 1024d
→ Pixel unshuffle (factor=2) → 256 tokens × 4096d
→ MLP projector (2-layer, ~2.7M) → 256 tokens × 576d
→ Interleave with text tokens
→ Baguettotron (321M, Llama arch, 80L, h=576)
Total: ~628M parameterspip install "transformers>=4.56,<5" torch pillow timm einops accelerate1import torch
2from transformers import AutoModelForImageTextToText, AutoProcessor
3from PIL import Image
4
5model = AutoModelForImageTextToText.from_pretrained(
6 "andreagemelli/baguettotron-internvit-alignment",
7 trust_remote_code=True,
8 dtype=torch.bfloat16,
9 device_map="auto", # also tested on Apple Silicon (mps) and CPU
10)
11processor = AutoProcessor.from_pretrained(
12 "andreagemelli/baguettotron-internvit-alignment",
13 trust_remote_code=True,
14)
15
16image = Image.open("photo.jpg").convert("RGB")
17inputs = processor(
18 messages=[{"role": "user", "content": "<image>\nDescribe the image concisely."}],
19 image=image,
20)
21inputs = {k: v.to(model.device) for k, v in inputs.items() if v is not None}
22
23print(model.chat(**inputs))Describe the image concisely. — verbatim output. Images from COCO val2017.| output | |
|---|---|
![]() | a cat is sleeping on the couch |
![]() | the bear is a good friend. |
![]() | a sign for a stop |
![]() | the bus is a red double - decoration |
<think> traces. The processor emits a bare assistant prefix (<|im_start|>assistant\n) and the model completes the caption directly. Keep prompts simple ("Describe the image").Tested againsttransformers4.57. Newer major versions may need adjustments.
1@misc{gemelli2026baguettotronvlm,
2 title = {Baguettotron-VLM: An Open, Reproducible, Multilingual Sub-1B Vision-Language Model},
3 author = {Gemelli, Andrea},
4 year = {2026},
5 howpublished = {\url{https://huggingface.co/andreagemelli/baguettotron-vision-vqa}},
6 note = {Code: \url{https://github.com/andreagemelli/baguettotron-vlm}}
7}