Gemma 4 / QAT builds

Gemma 4 QAT

QAT builds are Google's official small versions of Gemma 4. They take about a quarter of the memory of the full model, and because the model was trained for the smaller format, Google says quality stays close to the original. For most people running Gemma 4 at home, these are the ones to download.

QAT stands for quantization-aware training ·

16-bit · full precision 26.7 GB 4-bit · QAT 6.7 GB Quality: Google says similar to full precision Gemma 4 12B · Google's memory figures
Each number in the model is stored in 4 bits instead of 16.
June 5, 2026QAT builds announced
5 sizesE2B to 31B, all covered
About 4xSmaller than full precision
Apache 2.0Same licence as Gemma 4
The idea

What QAT is, in plain terms

A model is billions of numbers. Storing each one less precisely makes the file smaller, a step called quantization. The question is when you do the shrinking.

✂️

Ordinary quantization

Train the model at full precision, then round every number down afterwards. Quick and common, but the model never had a chance to adjust, so some quality is lost.

🎓

Quantization-aware training

Simulate the rounding while the model is still being trained, so it learns numbers that survive being compressed. Only the model's maker can do this, and Google has.

In Google's words: "By simulating quantization during training, QAT minimizes quality loss when the model is compressed." The model cards describe the result as "preserving similar quality to bfloat16 while dramatically reducing the memory requirements to load the model."

From Google's QAT announcement of June 5, 2026 and the QAT model cards. Google has not published benchmark scores for the QAT builds alongside the standard ones, so "similar quality" is its description, not a measured figure on this page.

The numbers

How big each QAT build is

Full precision against 4-bit, for every size.

ModelMemory, full precisionMemory, 4-bitGoogle's QAT fileOllama downloadOllama name
Gemma 4 E2B11.4 GB2.9 GB3.35 GB4.3 GBgemma4:e2b-it-qat
Gemma 4 E4B17.9 GB4.5 GB5.15 GB6.1 GBgemma4:e4b-it-qat
Gemma 4 12B26.7 GB6.7 GB6.98 GB7.2 GBgemma4:12b-it-qat
Gemma 4 26B A4B57.7 GB14.4 GB14.4 GB16 GBgemma4:26b-a4b-it-qat
Gemma 4 31B69.9 GB17.5 GB17.7 GB19 GBgemma4:31b-it-qat

Memory figures are from Google's Gemma 4 model card and cover the model only; a long conversation needs more on top. File sizes are from Google's Hugging Face pages; Ollama sizes from Ollama's tag list. Ollama lists its QAT builds as taking text and images. To work out what your machine can hold, see the VRAM guide.

Interactive

Which QAT build should I get?

Choose your memory and your app to get a suggested build and the command for it.

Suggested build

        
      

This is this site's rule of thumb: the largest build whose download is under about 70% of your memory, leaving room for the conversation. It is a starting point, not a guarantee. For a fuller comparison use the runtime selector and model comparison.

What Google publishes

Four formats, and which sizes get each

FormatWhat it is forE2BE4B12B26B A4B31B
GGUF, Q4_0Ready to run in Ollama, llama.cpp and LM Studio✓✓✓✓✓
Unquantized QATHalf-precision weights for your own conversion or research; drafter models included✓✓✓✓✓
Compressed tensors, w4a16For serving with vLLM✓✓✓-✓
Mobile, wNa8o8For phones, through LiteRT-LM✓✓---

Most people want GGUF

It is the format desktop apps read. If you use Ollama or LM Studio you never handle the file directly.

No vLLM build for the 26B A4B

Google's compressed-tensors list covers E2B, E4B, 12B and 31B only.

Fine-tuning or converting

Start from the unquantized QAT weights. They are also published for the small drafter models.

From Google's QAT model cards and its Gemma 4 QAT Q4_0 collection of 19 repositories. Repository names follow the pattern google/gemma-4-12B-it-qat-q4_0-gguf, …-qat-q4_0-unquantized and …-qat-w4a16-ct.

Get it

How to download a QAT build

Examples use the 12B. Swap in another size from the table above.

ollama run gemma4:12b-it-qat     # 7.2 GB

# other sizes
ollama run gemma4:e2b-it-qat     # 4.3 GB
ollama run gemma4:e4b-it-qat     # 6.1 GB
ollama run gemma4:26b-a4b-it-qat # 16 GB
ollama run gemma4:31b-it-qat     # 19 GB
# install llama.cpp (macOS or Linux), then serve with a web page
curl -LsSf https://llama.app/install.sh | sh
llama serve -hf google/gemma-4-12B-it-qat-q4_0-gguf:Q4_0

# or chat in the terminal
llama cli -hf google/gemma-4-12B-it-qat-q4_0-gguf:Q4_0
# pull Google's GGUF straight from Hugging Face into Ollama
ollama run hf.co/google/gemma-4-12B-it-qat-q4_0-gguf:Q4_0
lms get google/gemma-4-12b-qat     # download
lms load google/gemma-4-12b-qat    # load into memory
from transformers import AutoProcessor, AutoModelForMultimodalLM

# the unquantized QAT weights, for your own conversion or research
processor = AutoProcessor.from_pretrained("google/gemma-4-12B-it-qat-q4_0-unquantized")
model = AutoModelForMultimodalLM.from_pretrained(
    "google/gemma-4-12B-it-qat-q4_0-unquantized", device_map="auto")

llama.cpp, Hugging Face and Transformers commands are from Google's model cards; Ollama names from Ollama's library; LM Studio names from its catalogue.

  • Ollama: add -it-qat to the size. Full walkthrough on the Ollama page.
  • LM Studio: add -qat to the model name, or search "qat" in the app. See LM Studio.
  • Mac: Ollama also offers -mlx builds made for Apple silicon. Compare them on the Mac page.
  • Serving many users: the vLLM-ready builds are covered under self-hosting.
  • Not sure where to start: the install guide and how to download go step by step.
Phones

The mobile QAT format

For E2B and E4B, Google trained a separate, more aggressive format aimed at phone hardware. Google says it brings E2B down to about 1 GB of memory, and under 1 GB for a text-only version.

📐

Static activations

Scaling settings are worked out ahead of time, so the phone's processor does less work.

🧩

Channel-wise quantization

Data is arranged the way mobile accelerator chips expect, so they can compute on it directly.

🎯

Targeted 2-bit layers

The layers that produce tokens are compressed hardest; the layers that do the reasoning keep more precision.

💾

Embedding and cache savings

Extra compression for the vocabulary table and the model's short-term memory.

From Google's QAT announcement. These builds run through LiteRT-LM and the Google AI Edge Gallery app: E2B is a 2.58 GB download and E4B 3.66 GB. Setup is on the Android page and under mobile downloads.

The evidence

Does QAT make a difference you can notice?

One independent test compared Google's 12B QAT build with a popular community 4-bit build, on an Apple silicon Mac through Ollama.

BuildFile sizeSpeed, averageTask score
Google QAT, Q4_07.20 GB39.4 tokens/s4.5 of 6
Community Q4_K_M, ordinary quantization7.60 GB30.9 tokens/s4.5 of 6
Plain Q4_0, ordinary quantizationabout 6.9 GB38.4 tokens/s*-

Faster, but not because of QAT

The plain Q4_0 build was nearly as fast. The tester's conclusion: the speed comes from the simpler Q4_0 file format, which Google happens to use.

No quality gap in a small test

Both builds scored the same on six tasks. A test that small cannot show subtle differences either way.

Still the sensible default

It is the official build, slightly smaller, at least as fast, and trained for its format. There is little reason to pick another 4-bit build.

From an independent write-up dated June 8, 2026. *Measured on a single 490-token run, where QAT reached 42.9 and Q4_K_M 33.2 tokens/s. This is one person's test on one machine, not a benchmark; the third card is this site's view. Official scores for the standard models are on the benchmarks page.

When QAT is not the answer

You have memory to spare

An 8-bit or full-precision build is the closest to the original. See model variants.

You need audio in Ollama

Ollama lists its QAT builds for text and images. Check capabilities for other routes.

Very long conversations

QAT shrinks the model, not the memory a long conversation uses. Budget for both.

You would rather not run it

Hosted Gemma 4 costs cents per million tokens. See pricing and the API page.

EmbeddingGemma 2 · released October 6, 2026
The search model

EmbeddingGemma 2 and QAT

EmbeddingGemma 2, Google's new model for search across text, images, audio and video, uses the same technique. Google's on-device release says quantization-aware training compresses its weights to 4-bit and 8-bit, which is how the full model fits in about 567 MB of memory on a phone.

EmbeddingGemma 2 on a phoneText270MVision+170MAudio+300M QATINT4 + INT8 Text only191 MB Everything567 MB Memory in use on a Pixel 11 Pro, as reported by Google
Load only the parts you need; each is already compressed.
BuildHandlesDownloadWhere
Phone, textText and code165 MBlitert-community/embeddinggemma-2-text-270m-litert-lm
Phone, text and visionAdds images388 MBlitert-community/embeddinggemma-2-text-vision-440m-litert-lm
Phone, fullText, images, audio, video485 MBlitert-community/embeddinggemma-2-740m-litert-lm
Desktop GGUF, 8-bitText only310 MBggml-org/embeddinggemma-2-GGUF
OllamaText, or text and images378 MB - 1.3 GBollama pull embeddinggemma-2
📱

Built in, not a separate download

We found no separately labelled "QAT" repositories for EmbeddingGemma 2, unlike Gemma 4. The phone builds come pre-quantized.

⚠️

Do not use float16

Google warns the model's values exceed what float16 can hold. Use bfloat16 or float32 when running the full weights.

📏

A second way to save space

Shorter vectors - 512, 256 or 128 numbers instead of 768 - cut storage for everything you index. See pricing.

QAT statement and memory figures from Google's on-device EmbeddingGemma 2 post (about 191 MB text-only and 567 MB full, on a Pixel 11 Pro); the float16 warning from the model card. The desktop GGUF and Ollama builds are not described by their publishers as QAT. How shorter vectors affect quality is on the limitations page; task prompts are in the prompt guide.

FAQ

QAT questions

More answers on the full FAQ page.

What does QAT mean?

Quantization-aware training. The model is trained while simulating the compression it will later undergo, so it loses less quality when shrunk to 4 bits.

Is a QAT build worse than the full model?

Google says quality is similar to the full-precision version. It has not published side-by-side benchmark scores, so test it on your own tasks if small differences matter.

Which QAT build should I download?

The largest that fits your memory with room to spare. For many laptops and 12-16 GB graphics cards that is the 12B: ollama run gemma4:12b-it-qat. See the 12B page.

Is QAT faster?

Not by itself. In one independent test Google's build was faster than a Q4_K_M build, but an ordinary build in the same Q4_0 format was nearly as fast.

Is there a QAT build of the 31B?

Yes. GGUF, unquantized and vLLM-ready versions exist; the GGUF file is 17.7 GB.

Can I fine-tune a QAT build?

Use the unquantized QAT weights, which Google publishes for that purpose, rather than a GGUF file.

Is it free?

Yes. The QAT builds are Apache 2.0, like the rest of Gemma 4. Get them from the download hub.

Does EmbeddingGemma 2 have QAT builds?

Google says QAT is used to compress it to 4-bit and 8-bit weights for devices. There are no separately named QAT downloads; the phone builds are already quantized.

One command to a quarter-size Gemma 4

The QAT builds are free and run on ordinary laptops and graphics cards.

Top '