Deep Dive · Small Language Models

On-Device Small Language Models — and Why Gemma 4 E2B & E4B Redrew the Map

The most interesting thing happening in AI right now isn't the biggest model. It's the smallest one that's good enough. Somewhere in the last year, "small language model" stopped meaning "cute demo" and started meaning "the model in the app on your phone, right now, doing real work". This is a plain-English guide to what changed, why Google's Gemma 4 family is at the middle of it, and how to actually run one today.

What a "small language model" actually is

A large language model (LLM) is what powers ChatGPT and its peers — hundreds of billions of parameters, living on racks of GPUs in a data center. A small language model (SLM) is the same underlying idea, sized down to run somewhere you can hold: a laptop, a phone, a car head-unit, a robot. In practice, "small" usually means a few billion parameters or fewer, and the model's weights are a file measured in low gigabytes rather than terabytes.

SLMs matter for exactly one reason: where they run. A model that fits on a phone can be private (nothing travels), free-per-message (no server bill), and offline (no network needed). Those three properties don't exist in cloud AI, at any size. The only question is whether the small model is good enough at the task — and for a growing list of tasks, the answer is finally yes.

The most interesting number in AI right now isn't a benchmark score. It's the smallest model that clears the bar for the job you actually need done.

Why on-device AI was almost impossible until recently

The dream of running a real language model on a phone bumped into three walls at once:

Every previous "small model on your phone" story broke on one of these three. Gemma 4 is the first family that clears all three at once — and it clears them because of two architectural choices worth knowing about.

The Gemma family, briefly

Google's Gemma models are the open-weight relatives of Gemini — smaller, released for anyone to run, but built with lessons from training the big ones. The lineage:

Gemma 1 standard transformer laptop-first Gemma 2 bigger, still monolithic Gemma 3 + vision, + multilingual Gemma 3n PLE + matformer E2B / E4B naming 4 Gemma 4 on-device–first inherits PLE Same open-weight lineage. The turn to phone-first happens with the highlighted models on the right.
Where the family turned. PLE and matformer entered with Gemma 3n; Gemma 4 is what happens when the whole mainline is designed for that world.

The important thing about Gemma 4 isn't a benchmark score. It's that the architecture was designed backward from "must run well on a mid-range phone", not forward from "must beat GPT-4 on paper".

PLE: the trick that let 2B parameters fit on a phone GPU

Here's a specific, concrete constraint that most people never hear about. Many popular Android phones — a Samsung Galaxy S23 Ultra, for one — expose a maximum WebGPU storage buffer of 128 MB per binding. That's the size limit of a single tensor the GPU driver will accept. Overshoot it and the driver rejects the binding, and the model silently outputs garbage or falls back to CPU.

In a standard transformer, the biggest single tensor is the embedding table: vocabulary size × hidden dimension. For a modern multilingual model this table alone can be 150–260 MB, even after INT8 quantization. In other words: on a huge fraction of real phones, the embedding table won't load. The model can't run on the GPU. CPU fallback works but is 10–20× slower — a system prompt takes twenty seconds to prefill instead of one.

Per-Layer Embedding is Gemma 4's answer. Instead of one enormous embedding table, embeddings are split across layers, so each tensor is comfortably below the 128 MB ceiling. The overall parameter count is similar, but the shape is different — and shape is what actually determines whether the model runs on real hardware.

Why the shape of the model matters Standard transformer one giant embedding table vocab × hidden ≈ 155 MB ✕ overflows 128 MB GPU buffer Gemma 4 (PLE) embeddings split per layer L1 L2 L3 L4 L5 L6 L7 L8 L9 ✓ each tensor well under 128 MB Runs on the phone GPU? Standard SLM (Qwen 0.6B, Llama 3.2 1B, Gemma 3 1B): no — CPU fallback, 10–20× slower Gemma 4 E2B / E4B (PLE): yes — full GPU inference
Same parameter count, different shape. The reason Gemma 4 runs where other small models don't is the layout of the tensors, not the size of the model.

Matformer: what E2B and E4B actually mean

The E in E2B and E4B stands for Effective. An E2B model behaves like a dense 2-billion-parameter model in the tasks that matter; an E4B like a dense 4B. But under the hood, they come from the same weights.

The mechanism is called matformer — think matryoshka dolls, but for neural networks. During training, the model is optimized so that its parameters form a nested hierarchy: you can slice the model at different depths and widths and get a smaller sub-model that still behaves coherently. From one master set of weights, Google can carve out E2B for phones with tighter memory and E4B for phones with more room. Both share training, both benefit from the same instruction-tuning; you're not choosing between two independent products, you're choosing where along a continuum your device sits.

Matformer: one training run, two effective sizes Master weights trained end-to-end nested hierarchy E2B ⊂ E4B slice at inference time E2B Effective ~2B E4B Effective ~4B (contains E2B) Which slice loads? 📱 mid-range phone → E2B 📱 more RAM / flagship → E4B 💻 laptop → either You're not picking between two products. You're picking where on the same model your device sits.
Matryoshka dolls, but for neural networks. The smaller model lives inside the bigger one; the device decides how deep to reach.

How Gemma 4 compares to other small models

The 2B-and-under space is more crowded than most people realize. Here's an honest look at the shortlist, with the practical runs on a mid-range Android GPU? question front and center.

ModelParamsEmbedding size (INT8)Fits 128 MB buffer?
Qwen3 0.6B0.6B≈ 155 MB✕ CPU fallback
Gemma 3 1B1B≈ 151 MB (even INT4)✕ CPU fallback
Llama 3.2 1B1B≈ 262 MB✕ CPU fallback
Qwen3 1.7B1.7B≈ 311 MB✕ CPU fallback
IBM Granite 4.0 350M0.35B≈ 102 MB✓ (small vocab, weaker multilingual)
Gemma 4 E2B (PLE)Effective 2Bsplit per layer✓ full GPU
Gemma 4 E4B (PLE)Effective 4Bsplit per layer✓ full GPU (with enough RAM)

The story the table tells: parameter count is a proxy people fixate on, but on real phones the deciding factor is whether the biggest single tensor overflows the GPU's per-buffer limit. For today's Android landscape, PLE is the architecture that wins.

What the CPU fallback actually costs you Prefill time for the same ~3,700-character system prompt, same phone (Snapdragon 8 Gen 2) Non-PLE model, CPU fallback > 20 seconds Gemma 4 (PLE), full GPU ≈ 1 second 0s 10s 20s+
One second is a conversation. Twenty seconds is a bug report. Same phone, same prompt, different architecture — that's the whole game.

Where to actually try Gemma 4 today

On your phone: Gist&Chat (E2B, free)

Gist&Chat is a free Android app built around Gemma 4 E2B. First launch, it downloads the model on Wi-Fi — a one-time ~2.6 GB — and from then on the AI runs entirely on your phone. You get:

If you want the shorter version of the "why on-device at all" argument, that's a separate piece. If you want the Gemma-4-specific version, it's this article — and it happens to be running the model on your side while you read it.

E4B on Pro (coming)

The larger Gemma 4 E4B variant is landing in Gist&Chat's upcoming Pro tier. E4B doubles the effective parameters — noticeably better at reasoning, longer-context Q&A, and code-adjacent tasks — but wants a phone with more RAM to stay smooth. Pro users get to pick the model tier that fits their hardware; free users continue to run E2B.

On a laptop or desktop

Prefer to tinker on a bigger machine? Google's Gemma 4 weights are available through the usual open-model ecosystem — Hugging Face, Ollama, LM Studio, Jan, GPT4All. We compare that whole desktop shelf against the mobile picture in offline ChatGPT alternatives: the real options in 2026.

The honest limits

A guide that skips this section is a press release. What Gemma 4 E2B won't match:

What you get in return is the same three properties that make on-device AI worth caring about in the first place: your words don't travel, there's no meter, and the phone doesn't need to be connected to anything.

Try Gemma 4 on your phone, free

Gist&Chat ships Gemma 4 E2B out of the box — private AI chat plus YouTube, article and PDF summaries, in 11 languages. The larger E4B variant is coming to Pro.

▶ Get Gist&Chat free on Google Play

Free to download · One-time ~2.6 GB model download on Wi-Fi · Not a byte of your chat leaves the phone — privacy policy

Frequently asked questions

What is Gemma 4 and how is it different from earlier Gemma models?

Gemma 4 is Google's on-device–first small-model family. Unlike Gemma 1, 2 and 3 — which were mainly small versions of the same monolithic transformer — Gemma 4 uses a Per-Layer Embedding (PLE) architecture inherited from Gemma 3n. Instead of one huge embedding table, embeddings are split per layer, which keeps every individual tensor small enough to fit on the tight memory limits of a phone GPU.

What do the E2B and E4B in Gemma 4 mean?

The E stands for Effective. E2B is a model whose behavior is comparable to a dense 2B-parameter model, and E4B to a dense 4B. Under the hood, both are cut from the same matformer weights (a matryoshka-style nested-parameter design), so a device can pick the effective size that matches its RAM and heat budget.

Why does PLE architecture matter for on-device use?

Mid-range phone GPUs have hard per-buffer memory limits — a Snapdragon 8 Gen 2 phone, for instance, exposes only 128 MB per WebGPU storage buffer. A single monolithic embedding table (vocab size × hidden size) in most modern LLMs already blows past that. PLE splits the embeddings by layer so no single tensor overflows the limit; the model runs on the GPU instead of falling back to slow CPU inference.

Can I run Gemma 4 on my phone today?

Yes. Gist&Chat is a free Android app that ships Gemma 4 E2B out of the box: a one-time download, then the model runs entirely on your phone for private chat and for summarizing YouTube videos, articles and PDFs. The larger E4B variant is coming to Gist&Chat's Pro tier for higher-end phones with enough RAM to run it comfortably.

How does Gemma 4 E2B compare to other small models like Phi, Qwen, or Llama 3.2?

On paper the parameter counts look similar. In practice, most other 1–2B models still ship with a large monolithic embedding table that fails to load on many mobile GPUs and forces a slow CPU fallback. Gemma 4's PLE architecture is currently the most reliable way to run a real 2B-class model on the GPU of a mid-range phone, which changes latency from painful to conversational.


More from gist-ai.net: what on-device AI actually is (and why it works), offline ChatGPT alternatives — the real options in 2026, the AI chatbot that works in airplane mode, how to summarize any YouTube video with AI, summarize articles, PDFs and photos of text — offline, practice a language with an AI in your pocket, and the 8 best podcasts on YouTube — no sign-up, ever.

Built in the quiet hours, between everything else. If it helped — ☕ Buy me a coffee
Gist&Chat
Gist&Chat App Gemma 4 E2B, on-device Free on Google Play