← TinyGPT · docs · devlog · roadmap · speedup
source: docs/capability_matrix.md · view on GitHub ↗

Capability matrix — modalities × actions

Date: 2026-05-31 · Commit: 218af10 Question: For every (modality, action) pair, can tinygpt do it today?

1. Modalities

ModalityStatusNotes
Text — byte-level (vocab=256)First-class. Default for from-scratch models.
Text — BPE / HF tokenizerPinned via --tokenizer at train time; HF tokenizers loaded from model dir. SmolLM2 / Qwen3 vocabs verified.
CodeJust text under the BPE tokenizer. Curated code datasets in registry: the-stack-smol, python_code_instructions_18k_alpaca, codeforces-cots, commitpack, SWE-bench.
Structured (JSON, tool calls)FSM-constrained generation (ConstrainedGen) enforces a target JSON schema during decode. Agent runtime + JSON-mode shipped.
Multilingual text (Indic)⚠️Tokenizer side OK (smollm2 / Qwen3 vocabs). MILU + IndicGenBench eval CLIs wired. No real Indic model trained yet. Sarvam-Edge / Airavata are the planned bases.
Screen — accessibility tree (text)tinygpt screen tree returns the focused window’s AX tree as JSON. Text-only — LM-friendly out of the box.
Screen — raw pixels (image)⚠️tinygpt screen capture works in code; bare CLI hits the CGS-init quirk. Needs signed bundle / GUI-terminal context. NO vision encoder yet — just PNG bytes.
Vision (image → embeddings)Vision encoder (ViT → tinygpt decoder) is deferred research-grade work. Not shipped.
Audio (speech → text)Not in scope today. Roadmap notes Apple Speech.framework + AVSpeechSynthesizer as the eventual local choices.
Audio (text → speech)Same — AVSpeechSynthesizer placeholder, not wired.
Multi-modal — text + imageArchitecturally not shipped. Cider’s mlx_vlm compatibility patches are referenced in the research doc but not consumed; no vision-language model is part of tinygpt’s training or inference today.
Multi-modal — text + audioNot built.
Multi-modal — text + structured (tools)Tool-calling specialists ARE multi-modal in the sense “input is user text + tool catalog, output is JSON call.” Fully supported via agent runtime + mini-router.

Summary: tinygpt is a text-LM + structured-output + screen-text hybrid, with code as a first-class text variant. No vision / audio encoders are shipped. Multi-modal in the vision/audio sense is roadmapped (Wave 2.6 ViT, Wave 4 audio) but not implemented.

2. Actions

Every action below is a working CLI subcommand on M5 Pro (audit confirmed in docs/feature_audit_2026_05_31.md).

Training

ActionCLIModalityNotes
Pretrain from scratchtinygpt traintext (byte or BPE)Standard transformer LM training.
Pretrain (training-throughput bench)tinygpt bench-traintext42 ms/step Huge on M5 Pro
Continued pretrain (text corpus)tinygpt finetunetextByte-level OK; updates base weights
Supervised fine-tunetinygpt sfttext (BPE required)DoRA default. JSONL {instruction, response}.
DPO / SimPOtinygpt dpotext (BPE required)JSONL {prompt, chosen, rejected}. SimPO default.
Speculative-decoding headstinygpt train-headstextMedusa + EAGLE-2 variants
Tool-call extractor (mini-router)tinygpt train-extractortext → tool classTiny encoder + softmax over tool catalog
Knowledge distillationtinygpt distilltextTeacher → student via KL
Evolution strategiestinygpt estextGradient-free; experimental
Tuned-lens probestinygpt tuned-lenstextPer-layer logit probes (research)

Adapter / PEFT (all under tinygpt sft)

VariantFlagStatus
LoRA(default)
DoRA--dora✅ (in-session; disk format WIP)
VeRA--vera
RsLoRA--rs-lora
LoRA-FA--lora-fa
PISSA-init--pissa-init
LoftQ--loftq
AdaLoRA--adalora-target-rank N
LayerDrop--layer-drop F
LoRA+--lora-plus

Quantization + compression

ActionCLIStatusNotes
GPTQ (Hessian-calibrated int N)tinygpt gptq2/3/4/8-bit · 0.10 rel error on smoke
HQQ (no calibration)tinygpt hqq2/3/4/8-bit · 0.09 rel error on smoke
QAT (in-training)tinygpt train --qatQuantization-aware fine-tune
SmoothQuant (activation scale)(internal, shipped per progress doc)Documented in quantization_expansion.md
Pruning — unstructuredtinygpt prune-unstructured50% sparsity → -38.9% gz
Pruning — structured (heads/layers)tinygpt prune-structuredFrobenius head ranking; physical layer drop
LASER rank reduction (SVD)tinygpt laserPer-tensor low-rank approximation

Inference + serving

ActionCLIStatus
Sample / generatetinygpt sample✅ — KV cached, speculative-decode flags
HTTP server (OpenAI surface)tinygpt serve✅ — /v1/{models,chat/completions,completions}
HTTP server (Ollama surface)tinygpt serve (same port)✅ — /api/{tags,version,show,chat,generate}
Agent runtime (multi-turn + tools)tinygpt agent✅ — JSON-mode tool dispatch + persistent KV
Cloud escalation (direct call)tinygpt escalate✅ — Anthropic + OpenAI
Cloud escalation (agent-driven)tinygpt agent --cloud-escalate✅ — synthetic escalate tool added to schema
Mini-router inferencetinygpt extract✅ — top-K tool prediction with softmax confidence

Evaluation

ActionCLIStatus
Loss on a corpustinygpt eval
Standardized benchmarkstinygpt score-bench✅ — HellaSwag / MMLU-Pro / GSM8K via lm-eval adapter
Indic benchmarks (MILU, IndicGenBench)tinygpt eval-indic⚠️ — CLI wired; real-data baseline pending dataset fetch
Inference benchmark (TTFT/ITL/throughput)tinygpt bench
Training-throughput benchmarktinygpt bench-train
Base ↔ LoRA comparisontinygpt compare✅ — side-by-side eval

Data acquisition + manipulation

ActionCLIStatus
HF Datasets registry (curated)tinygpt list-datasets✅ — 22 entries
Download HF datasettinygpt download-dataset
Inspect HF model dirtinygpt hf-load / hf-inspect
GitHub issue→PR / commits / reviewstinygpt fetch-github
Synthetic instructions via Magpietinygpt magpie✅ — needs chat-tuned base
Tool-call training data (BFCL/τ-bench)tinygpt extractor-data✅ — JSONL {query, tool} pairs

Inspection + debugging

ActionCLIStatus
Inspect .tinygpt filetinygpt inspect
Round-trip validatetinygpt validate
Debug helperstinygpt debug-{dtypes,load,logits,loss,names}

Cloud / storage

ActionCLIStatus
Push checkpoint to R2tinygpt push✅ — env-gated, dry-run supported
Pull checkpoint from R2tinygpt pull
R2 bucket managementtinygpt cloud {list,delete,setup}

Screen reading

ActionCLIStatus
Capture active window (image)tinygpt screen capture⚠️ — CGS-init quirk from bare CLI
Read AX tree (text)tinygpt screen tree
Capture bothtinygpt screen both⚠️ — image half subject to same quirk

3. Modality × action coverage matrix

Reading: rows are modalities, columns are actions. ✅ = supported, ⚠️ = partial, ⬜ = not built, — = N/A.

Modality / ActionPretrainFinetuneSFTDPODistillQuantizePruneSampleServeAgentEval
Text (byte-level)
Text (BPE)
Code (BPE)
Structured (JSON, tools)✅*✅*✅*✅*✅*⚠️†
Multilingual / Indic✅*✅*✅*✅*✅*⚠️†
Screen AX tree✅*✅*✅*✅*
Screen raw pixels⚠️†
Vision (image → embed)
Audio (speech in/out)
Multi-modal text+image
Multi-modal text+audio
Multi-modal text+tools✅*✅*✅*✅*✅*⚠️†

* = the base model still gets trained as text; we don’t have a separate “structured” or “Indic” pretrainer — they’re text under a tokenizer + appropriate training data.

= the eval CLI exists but no real-data baseline has been run yet.

4. What’s exposed vs what would need building

Things tinygpt can do today that you might not realize

Things tinygpt cannot do today (and the missing piece)

5. The honest one-line summary

tinygpt is a text + code + structured-output transformer toy with quantization / PEFT / spec-decoding / agent-runtime / screen- text-via-AX, train-able from scratch on Apple Silicon and browser WebGPU. It is NOT yet multi-modal in the vision/audio sense; that’s roadmapped, not built.

For the avoidance of doubt: