Ailoot Engineering
A guide to small language models, their architectures, runtime constraints, and practical selection.
Image: A compact fanless mini PC with a ribbed metal case
- Several tools
- CPU only
- 8 GB VRAM
- Unified memory
- Intermediate
- List
The short version
- PrismML reports a 75.5 average for Ternary Bonsai 8B against Qwen3-8B's 79.3 in its own comparison; the MLX 2-bit repository lists about 2.3 GB.
- Runtime support depends on the exact format and version; check the model card and your runtime before downloading.
- In Liquid AI's own comparison, LFM2.5-1.2B scored 86.23 versus Qwen3-1.7B's 73.68 on IFEval. On a Galaxy S25 Ultra CPU using llama.cpp Q4_0, its reported memory use was 719 MB versus 1,306 MB for Qwen, with 1K prefill and 100 decode tokens.
- An 8 GB card can run some speech and vision models, but check each build's memory needs independently.
- Check the licence of each model and runtime separately: for example, Moshi weights use CC BY 4.0 and PaddleOCR-VL is Apache 2.0.
A compact eight-billion-parameter model can run on a phone. PrismML reports that Ternary Bonsai 8B scores within four points of Qwen3-8B in its own benchmark comparison; check the exact build and hardware requirements before downloading.
The question about a small model used to be how big it was. Now it is what techniques the lab used to reduce the size: ternary weights, per-layer embeddings, experts streamed off an SSD, four-bit weights trained to be four-bit rather than squeezed afterwards.
Two things decide whether any of it runs on your machine: the layout, meaning how many layers keep a growing KV cache, and the runtime, because a small file is only useful if something on your machine can multiply by what is inside it.
Ternary Bonsai 8B: low-bit model architecture
PrismML's comparison reports the following sizes and average benchmark scores on its own evaluation. These are comparison figures, not necessarily the download size of each build or total runtime memory. For example, the MLX 2-bit repository lists about 2.3 GB while the benchmark table lists 1.75 GB.
| Model | Size in developer comparison | Average score |
|---|---|---|
| Bonsai 8B (1-bit GGUF) | 1.15 GB | 70.5 |
| Ternary Bonsai 8B | 1.75 GB | 75.5 |
| Qwen3-8B (16-bit) | 16.38 GB | 79.3 |
Sources: Ternary Bonsai model card and Bonsai 8B GGUF model card. Figures checked 2026-09-20.
PrismML, a Caltech team backed by Khosla Ventures, Cerberus and Google, shipped a native 1-bit family on 31 March 2026 and a ternary one on 16 April. Both were trained at low precision rather than quantised afterwards; individual formats can still use higher-precision scales.
- Ternary Bonsai 8B — 8.19B parameters on a Qwen3-8B dense backbone, 65,536-token context, Apache 2.0; the MLX 2-bit repository lists about 2.3 GB.
- 1-bit Bonsai 8B — one bit per weight: 1.15 GB parameter memory (GGUF; file ~1.16 GB), 1.28 GB in MLX, 70.5 average on PrismML’s own table.
- Speed — PrismML reports 83 generated tokens per second on an M4 Pro with 48 GB using MLX Python and 27 on an iPhone 17 Pro Max using MLX Swift, under its stated test conditions.
The catch is runtime support: the model format and kernels must be supported by the exact runtime and hardware you use. Consult the relevant model card for current installation instructions.
For a GGUF build, check PrismML’s GGUF model card for its files and runtime instructions. The repository contains both FP16 and smaller Q2_0 builds; select the intended file rather than assuming they use the same disk space.
LFM2.5: what edge-first means in the architecture
Image: A Raspberry Pi single-board computer with GPIO pins and a heatsink resting on a desk
This is the target the smallest tier is built for, not a laptop that happens to be idle.
Liquid AI is an MIT spinout founded in 2023, and its strapline is four words: device-native foundation models. LFM2 pairs gated short-convolution blocks with a small number of grouped-query-attention blocks, chosen by hardware-in-the-loop architecture search, so fewer layers carry a growing KV cache.
- LFM2.5-1.2B-Instruct — 1.2B parameters, dense hybrid. Liquid reports 719 MB of memory, 335 prefill and 70 decode tokens per second on a Galaxy S25 Ultra CPU using llama.cpp Q4_0, with 1K prefill and 100 decode tokens.
- In Liquid’s own published comparison, it scores 86.23 versus Qwen3-1.7B’s 73.68 on IFEval. In the same phone CPU test, Qwen used 1,306 MB of memory.
- LFM2.5-2.6B — 128K context.
The caveat is the licence. LFM2.5 ships under the LFM Open License v1.0, Liquid’s own licence rather than a standard permissive one, so read its LICENSE file before you deploy anything commercial on it.
Gemma 4 E2B and E4B: the trick is not running all of it
Google’s current small line is Gemma 4, the April 2026 generation, and its two small tiers are stranger than their sizes suggest: E2B is 2.3B effective parameters, 5.1B counting embeddings, and E4B is 4.5B effective out of 8B.
The mechanism comes from Gemma 3n. Per-Layer Embeddings use per-token lookups that can be stored in flash and injected into layers. Memory use depends on the implementation and configuration.
- Gemma 4 E2B — text, image and audio, 128K context, Apache 2.0. The quantisation-aware Q4_0 build lands at 3.2 GB, down from 9.6 GB at BF16.
- Gemma 4 E4B — the same modalities; its QAT Q4_0 build is 5 GB, down from 15 GB. Google also describes a text-only E2B mobile configuration without Per-Layer Embeddings that requires less than 1 GB of memory.
- QAT checkpoints shipped on 5 June 2026 with no benchmark table attached: Google says they beat ordinary post-training quantisation and did not publish the comparison.
Google released Gemma 4 Multi-Token Prediction drafters on 5 May 2026, reporting up to three times faster decoding without degrading output quality in its tests. Setup is runtime-specific: see vLLM’s MTP documentation for its target and drafter configuration.
Choosing a model for local hardware
Image: A dual-fan graphics card photographed from the front, its two fans filling the frame
A 16.4 GiB quantised 31B file is smaller than a 24 GB card’s capacity. Whether inference fits also depends on runtime overhead, the KV cache, context length and other allocations.
A 27B or 31B model may be practical on a sufficiently provisioned laptop with a suitable quantised build and runtime; check total memory requirements for the intended context. Qwen’s 2026 line has no dense model between 9B and 27B, so the interesting 27B is Qwen3.8-27B: dense, Apache 2.0, 262,144-token context.
- Qwen3.8-27B — 15.334 GiB in the UD-Q4_K_M GGUF, 16,464,440,224 bytes, or 14.952 GiB as a three-shard four-bit MLX build.
- Gemma 4 31B — 17.065 GiB at Q4_K_M, or 16.439 GiB in Google’s QAT q4_0 build. These file sizes leave some room on a 24 GB card, but do not guarantee that the runtime, KV cache and other allocations will fit.
- Gemma 4 12B QAT — LM Studio lists a 7 GB minimum system memory.
# KV cache bytes per token, fp16, one sequence
L_attn, H_kv, D_head, bytes_per_element = 8, 4, 256, 2 # Qwen3.5-9B: 8 of its 32 layers use full attention
per_token = 2 * L_attn * H_kv * D_head * bytes_per_element
print(per_token, per_token * 32768 / 1024**3) # 32768 bytes per token, 1.0 GiB at 32k
Count all 32 layers instead of the eight that keep a growing cache and you get four times the cache, which is the mistake to avoid when planning long context. The KV cache explainer does the arithmetic properly.
Mixture-of-experts shapes that buy speed rather than space
A mixture-of-experts model activates a fraction of its weights per token, which lowers the memory bandwidth each token needs and raises speed. It does not lower the file you have to hold, and that distinction gets lost constantly.
- LFM2-24B-A2B — 24B total, 2.3B active, 64 experts with top-4 routing; Liquid’s line is that it is designed to run within 32GB RAM.
- Gemma 4 26B A4B — 25.2B total, 3.8B active, 15.784 GiB at UD-Q4_K_M, 256K context.
- Qwen3.6-35B-A3B — about 3B active out of 35B, 20.614 GiB at UD-Q4_K_M.
- Granite 4.0 H-Tiny — 7B total with 1B active, Apache 2.0. IBM obtained ISO/IEC 42001 certification for the AI management system governing its Granite language models; this is a certification of the management system, not of an individual model.
The KV cache saving people credit to mixture-of-experts comes from the attention layout instead: Qwen3.6-35B-A3B keeps a growing cache on 10 of its 40 layers, so it grows at a quarter of the naive rate.
The experts change speed, not capacity. If the file does not fit on your card at all, running models bigger than your VRAM is the next stop.
Text to speech models
Image: Over-ear headphones resting on a desk in front of an open laptop
Sizes vary widely across the speech models below; check the weights and runtime requirements for your chosen build.
Kokoro-82M is the training-run story of the last two years and hardly anyone frames it this way: 82 million parameters, Apache-licensed weights, eight languages and 54 voices. The card’s own accounting for the whole run is 1,000 A100-80GB GPU-hours billed at \$400 and \$600, around \$1,000 at a dollar an hour.
- Kitten TTS v0.8 — 80M, 40M and 15M tiers at 80 MB, 41 MB and 56 MB, with the 15M int8 build at 25 MB. The lightweight ONNX models run on CPUs; the project also offers an MLX backend for Apple Silicon. KittenTTS 2 is a separate, newer model family.
- Supertonic 3 — about 99M parameters and 31 languages, the widest list here: OpenRAIL-M for the model, MIT for the code.
Kitten TTS publishes its code under Apache 2.0 but licenses model weights separately. Check the selected model repository for its terms. Kokoro uses a fixed voice set rather than voice cloning.
Ears: the transcription project that became a voice-agent stack
Moonshine began with English speech-recognition models built for real-time transcription on inexpensive hardware. Moonshine Voice now brings speech to text, intent recognition and text to speech together in one project.
- Moonshine tiny — a 27M-parameter English speech-recognition model under MIT, designed for low-latency use in applications.
- Licensing — Moonshine lists its English and streaming speech-to-text models under MIT, but some legacy non-English non-streaming models have non-commercial terms. TTS and grapheme-to-phoneme models and data have separate terms.
- NVIDIA Parakeet TDT 0.6B v3 — 6.34% average word error rate across the Open-ASR suite, 25 European languages, about 4 GB.
NVIDIA’s Parakeet TDT 0.6B v3 model card states CC BY 4.0; check the terms and attribution requirements for the exact model you use.
Moshi: full duplex, and almost nobody writes about it
Every voice assistant you have used takes turns. Kyutai’s Moshi does not: it listens and speaks at the same time, as a multi-stream transformer over Mimi codec tokens at 1.1 kbps on a 7B Helium text backbone.
Inner Monologue predicts text tokens as a prefix to the audio tokens, which holds linguistic quality up and hands you streaming transcription and synthesis as a side effect.
- Builds — moshiko-mlx-bf16 for the Mac, plus moshi_mlx for Mac and iPhone, with a -q 4 flag for four-bit weights.
Kyutai states that Moshi model weights are released under CC BY 4.0. The Python code and Rust backend have separate licences; check the exact component you plan to use.
Eyes and drawing: vision and image generation
Image: A smartphone held over a printed page on a desk, its screen showing the camera view
A 0.9B vision model reads pages and tables; a 0.39B one draws them.
The vision half is where the file sizes get silly and the licence situation gets murky.
- PaddleOCR-VL — 0.9B parameters: a NaViT-style dynamic-resolution encoder bolted to ERNIE-4.5-0.3B, covering 109 languages and handling text, tables, formulas and charts in one model.
- Moondream 2 — 1.9B dense, trained with quantisation awareness. The int4 build is measured at 2,002 MiB of VRAM for a 42% cut against fp16 and a 0.6% accuracy drop; the 0.5B sibling runs in 816 MiB.
- DreamLite — ByteDance’s 0.39B unified diffusion model, generating and editing in one network. The project reports about three seconds for 1024x1024 on an iPhone 17 Pro using its four-step mobile setup. Its published weights are for non-commercial research use; the project prohibits commercial use and public redistribution of the weights.
- Bonsai Image 4B — a FLUX.2 Klein 4B derivative. PrismML reports a 0.93 GB transformer for the binary 1-bit variant, versus 7.75 GB for the original transformer. For 1024x1024 generation it reports 1.95 GB mean-active memory for the binary variant versus 14.39 GB for the original on an M4 Pro; mean-active memory is not peak usage, and the full deployment payload is larger than the transformer alone.
How to choose between them
Start with what you have, then with what you want it to do. The fit calculator tells you whether a specific file fits once the cache and the desktop have taken their share.
- 8 GB card, chat to evaluate — Ternary Bonsai 8B, Gemma 4 E2B QAT or LFM2.5-1.2B. Verify support for the chosen file and allow extra memory for the runtime and context.
- CPU only, 16 GB of RAM — LFM2.5-1.2B at Q4_0 is the demonstrated one, with Gemma 4 E2B QAT and Qwen3.5-4B as the other starting points.
- CPU only, 32 GB of RAM — the mixture-of-experts models become interesting, because they stream like something far smaller than their file size.
- 24 GB card or 32 GB unified memory — consider Qwen3.8-27B at 15.3 GiB, Gemma 4 31B QAT at 16.4 GiB, or Gemma 4 26B A4B at 15.8 GiB. These are file sizes; leave room for the runtime, KV cache and other allocations and test the intended context.
- Speech out — Kokoro for voice range, Kitten TTS Nano for size, Supertonic 3 for languages.
- Speech in — Moonshine tiny for latency and footprint, Parakeet for accuracy.
- Pages and pictures — PaddleOCR-VL for documents, Moondream at int4 for general vision, DreamLite for generation in non-commercial research. DreamLite’s published terms prohibit commercial use and public redistribution of its weights.
If the runtime installation is the blocker rather than the model choice, the Ollama guide covers the boring part.
Quick answers
- ### Are these small models free for commercial use?
Licence terms vary by model and component. The PaddleOCR-VL model card lists Apache 2.0; Kyutai lists Moshi weights under CC BY 4.0 and specifies separate licences for code. LFM2.5 uses the LFM Open License v1.0. Check the exact model, version, dependencies and their terms before deployment.
- ### Why does a mixture-of-experts model need less memory than its size suggests?
It often does not, which is the misunderstanding worth clearing up. Active parameters buy speed, not space: a 35B-A3B model still puts 20.6 GiB on disk at Q4, and only about 3B parameters are read per token. The KV cache saving people attribute to MoE comes from the attention layout, where only a fraction of layers keep a growing cache.
Primary sources
- Ternary Bonsai model card — PrismML
- Bonsai 8B GGUF model card — PrismML
- LFM2.5-1.2B-Instruct model card — Liquid AI
- Gemma 4 quantisation-aware training checkpointsGoogle
- Gemma 3n: per-layer embeddings and MatFormerGoogle
- Kokoro-82M model card — hexgrad
- Kitten TTS code and model licence information — KittenML
- Moonshine Voice and licensing — Moonshine AI
- Moshi project and model licences — Kyutai
- PaddleOCR-VL model card — PaddlePaddle
- Moondream model sizes — Moondream
- DreamLite — ByteVisionLab
- Parakeet TDT 0.6B v3 model card — NVIDIA
Originally published on Ailoot. Small AI Models Worth Running
Discover Ailoot’s LLM inference API. One Ailoot-issued API key gives you 1,284 models and variants across 15 categories. That catalogue puts Ailoot among the world’s largest AI routers by model count. The catalogue covers text with GPT or Claude, images with FLUX, video with Kling, voice with Eleven v4, music with Suno, 3D assets with Tripo3D and ranking with Cohere Rerank.
Pair your local model stack with hosted Ailoot access to GPT, Claude, Gemini and DeepSeek. One Ailoot key also covers media models.
Use Ailoot Arena to compare the models you are considering. Ailoot workspaces give the hosted part of your stack shared billing and access controls.
One subscription covers the full Ailoot catalogue. With day-one access to new flagship models, you can keep using the same key when a new model arrives. Visit https://ailoot.ai/ for subscriptions and promo codes offering up to 50% off official provider API prices.
Top comments (0)