← TinyGPT · docs · devlog · roadmap · speedup
source: docs/prds/5.3-vision-language-toy.md · view on GitHub ↗

PRD — Smallest from-scratch vision-language toy on consumer hardware

Goal

Train a LLaVA-style VL model from scratch on M5 Pro: pre-trained ViT encoder (frozen first cut) + small projector + small-from-scratch TinyGPT decoder + cross-attention or projector. Evaluate on TextVQA / VQAv2-mini. Publish “smallest from-scratch VL model runnable on a Mac” with a reproducible recipe.

Tier-5 research arc. ~2 weeks. The publishable artifact is the same shape as 5.1 / 5.2: smallest-X-on-consumer-hardware. The practical artifact is a vision-conditioned text-generation path that future Tier-B work (vision specialist, screen-understanding agent) can reuse.

Why now

Scope — in

Scope — out

Files to touch

FileChange
Sources/TinyGPTModel/VLForward.swiftnew — projector + token-soup
Sources/TinyGPTModel/VitLoader.swiftnew — loader for HF ViT weights
Sources/TinyGPT/TrainVL.swiftnew — two-stage training recipe
Sources/TinyGPT/EvalVQA.swiftnew — accuracy on VQA suites
Sources/TinyGPT/TinyGPT.swiftcase "train-vl", case "eval-vqa"
docs/research/vl-toy-results.mdnew — results
evals/vl-smoke.shnew — load ViT, project 1 image, decoder generates a non-empty caption
docs/PLAN.md5.3 ⬜ → ✅ on ship

Don’t touch

Acceptance criteria

Reference patterns

Open questions