A quantized Gemma 4 31B can run on a 32 GB Mac, but fitting in memory does not guarantee a fast first response. One 32 GB M1 Max produced 11.6 tokens/s after a 1K input and took 15.0 seconds to begin writing; at 32K, it produced 7.7 tokens/s and took 558 seconds to start. In a separate short-test series with one GPU and full GPU placement, the RTX 3090, 4090 and 5090 delivered 39.20, 45.08 and 71.42 output tokens/s, respectively. The two series use different weights, runtimes and workloads; the figures are not a Mac-versus-PC speed ratio.
Model release: 2026-04-02. This guide covers Gemma 4 31B Instruct, announced by Google. It does not substitute base weights, a fine-tune, or the faster-but-different 26B A4B variant. These results come from the linked original testers; OnDevice Works did not rerun them.
| What you want to know | Metric to use |
|---|---|
| How long until writing starts? | TTFT, time to first token; record cold/warm and cached/uncached separately. |
| How fast is the answer once it starts? | TG / decode, output tokens per second from one request, not combined throughput from many users. |
| How fast can it read a document? | PP / prefill, input tokens per second at a specified length. A PP result alone is not a measured TTFT. |
| Will it fit my machine? | Peak memory at your workload, with room for the OS, KV cache, runtime and vision components. |
What does the official model score?
The 31B model uses a dense architecture, accepts text and images and produces text. Its weights are available under Apache 2.0. The official 256K context window describes the model, not how much context your computer can hold.
| Google DeepMind evaluation | Official 31B Instruct result |
|---|---|
| MMLU Pro | 85.2% |
| GPQA Diamond | 84.3% |
| AIME 2026, without tools | 89.2% |
| LiveCodeBench v6 | 80.0% |
| Tau2, average over three | 76.9% |
| MMMU Pro (vision) | 76.9% |
| OmniDocBench 1.5, average edit distance (lower is better) | 0.131 |
The official evaluation is not a speed test or a guarantee for lower-bit versions. When comparing to another model, check whether the prompts and tool access were the same.
Google also publishes an official QAT Q4_0 GGUF. QAT adjusts weights during training for low precision. It is not the same file as a third-party Q4_K_M GGUF or a 4-bit MLX conversion. The official context limit is a capability of the checkpoint, not a promise about usable speed. Synthetic text rates here do not predict image or video prefill.
Can a 32 GB Mac run it?
What changes between 1K and 32K on the same Mac?
One oMLX uploader tested a 24-core M1 Max with 32 GB, using oMLX 0.7.3 and 4-bit MLX weights. The same-session Code (Python) runs report MTP, VLM MTP and TurboQuant KV cache off. From 1K to 32K, memory increased 4.9 GB, but the wait to the first token rose about 37×. If you mostly work with long documents, test input length before shopping for a faster GPU or choosing a bigger model.
| Input | Time to first token | Prompt tok/s | Output tok/s | Peak memory |
|---|---|---|---|---|
| 1,024 tokens | 15.009 s | 68.2 | 11.6 | 17.8 GB |
| 4,096 tokens | 62.543 s | 65.5 | 10.7 | 18.8 GB |
| 8,192 tokens | 130.547 s | 62.8 | 10.2 | 19.3 GB |
| 16,384 tokens | 266.443 s | 61.5 | 8.9 | 20.4 GB |
| 32,768 tokens | 557.966 s | 58.7 | 7.7 | 22.7 GB |
What about other Apple Silicon Macs?
These are uploader-reported individual setups, not one controlled run. Reported peak memory is not system-wide RAM use. The token count is the source’s test point, not a claim about each model’s maximum context.
| Mac / unified memory | Runtime and weights | Test point | PP tok/s | TG tok/s | TTFT | Peak memory |
|---|---|---|---|---|---|---|
| M1 Max, 32 GPU cores / 32 GB | oMLX 0.3.5.dev1, 4-bit | 4K | 71.7 | 11.9 | 57.118 s | 19.3 GB |
| M4, 10 GPU cores / 32 GB | oMLX 0.3.1, 4-bit | 4K | 35.9 | 3.2 | 114.094 s | 20.5 GB |
| M4 Pro, 16 GPU cores / 48 GB | oMLX 0.4.5.dev1, 4-bit | 4K | 82.2 | 12.4 | 49.834 s | 20.2 GB |
| M5, 10 GPU cores / 32 GB | oMLX 0.3.8, 4-bit | 4K | 50.4 | 6.4 | 81.219 s | 20.1 GB |
| M5 Max, 40 GPU cores / 64 GB | oMLX 0.6.4, 4-bit, MTP off | 1K | 772.9 | 26.5 | 1.325 s | 17.6 GB |
| M3 Ultra, 60 GPU cores / 256 GB | oMLX 0.6.2, 4-bit, MTP off | 16K | 250.8 | 39.0 | 65.315 s | 50.0 GB |
The community submission labelled M6 / 32 GB reported 14.9 tok/s, 17.762 s TTFT and 18.9 GB peak at 4K, using oMLX 0.8.0 with a different, oQ3.5e-MTP package. Likewise a 256 GB M5 Ultra submission shows 96.3 tok/s at 1K with MTP configured. Neither is a plain-decode score or proof of a chip-to-chip gain. No matched base M1 or 16 GB Mac run establishes usable performance for this 31B checkpoint. On an 8 or 16 GB Mac, start with a smaller checkpoint rather than buying on the strength of these 32 GB results.
How fast is it on NVIDIA and AMD?
Eleven NVIDIA GPUs on one Q4_K_M test protocol
GPU Battle published first-party llama.cpp results with the Unsloth Q4_K_M GGUF, one GPU and full offload. The publisher ran separate pp512 and tg128 tests three times after warmup, with full GPU offload. The guide does not give per-repeat logs or TTFT; these are published device-level measurements, not a second reproduction or a ranking of complete PCs.
| GPU | Dedicated VRAM | Prompt tok/s | Output tok/s |
|---|---|---|---|
| H100 SXM (HBM3) | 80 GB | 2,490.6 | 76.59 |
| GeForce RTX 5090 | 32 GB | 4,020.6 | 71.42 |
| RTX PRO 6000 Blackwell WS | 96 GB | 3,717.9 | 65.42 |
| GeForce RTX 4090 | 24 GB | 2,915.6 | 45.08 |
| A100 SXM4 | 80 GB | 1,197.4 | 43.58 |
| GeForce RTX 3090 Ti | 24 GB | 1,637.4 | 43.49 |
| A100 PCIe | 40 GB | 1,201.7 | 42.57 |
| GeForce RTX 3090 | 24 GB | 1,266.1 | 39.20 |
| L40S | 48 GB | 2,581.5 | 34.95 |
| A10G | 24 GB | 810.0 | 22.67 |
| L4 | 24 GB | 704.4 | 12.84 |
In a second campaign, Local LLM Advisor’s published raw results show 38.8 / 44.4 / 71.3 / 69.4 tok/s on the 3090 / 4090 / 5090 / RTX PRO 6000 Blackwell Workstation, respectively, at the shortest depth (Q4_K_M, llama.cpp b11658, pp512 and tg128 run separately). Exact RTX 4090 and RTX PRO 6000 source rows retain the original guide’s evidence. Both series agree on the relative order for these four GPUs, but absolute numbers still vary by build and system. RTX 5090 generated about 1.6× as fast as the 4090 in both runs. Do not interpret that as a 1.6× shorter first-token wait.
AMD, Intel and shared-memory PCs
| Hardware | Same-checkpoint test condition | Prompt tok/s | Output tok/s | What it tells you |
|---|---|---|---|---|
| Radeon RX 7900 XTX, 24 GB | Variant L IQ4_NL, q4_1 K/V, pp1024 / tg128 | 962.09 | 26.73 | The same variant ran out of memory at pp32768; the smaller Variant M reported 27.98 tok/s at tg128. |
| Radeon AI PRO R9700, 32 GB | Q4_K_M, Vulkan, pp4096 / tg128, FA on | 694.06 | 27.73 | Same card, different backend in the next row. |
| Radeon AI PRO R9700, 32 GB | Q4_K_M, ROCm, pp4096 / tg128, FA on | 743.82 | 25.53 | ROCm prefills faster in this specific build, Vulkan generates faster. |
| Ryzen AI Max+ 395, 128 GB | Beelink GTR9 Pro, official QAT Q4_0, Vulkan pp512 / tg128, b10066, r3 | 308.28 | 11.38 | Enough shared memory to run it; not the same throughput as a discrete card. |
| Arc Pro B70 | Q4_K_M, llama.cpp, reported pp512 / tg128 | 601 | 21.6 | At pp32K, prompt rate was 185 tok/s in that test. |
| DGX Spark / GB10 | Q4_K_M, CUDA llama.cpp, pp512 / tg128, five repeats | 743 | 11.0 | This run fits, but abundant shared memory is not a substitute for decode bandwidth. |
A separate Arc A770 16 GB test could not load its 31B Q4_K_M fully on the card. That does not rule out an intentionally smaller quant or CPU offload, but do not use a 24 GB all-GPU bar to estimate what a 16 GB card will do. For a desktop where the model fits but the first token is slow, inspect prompt size and cache reuse before assuming the GPU is at fault.
On CPU alone, a Xeon AVX2 test using four threads reported roughly 1.3 output tokens/s with Q4_K_M. That is one constrained system, not a speed estimate for all CPUs. Do not compare it with AMD’s 128-sequence EPYC test, which measures batched server throughput in Q8_0 rather than one-person chat.
Measured TTFT on PC: why one tokens/s number is not enough
These are recorded first-token timings, not prompt length divided by prefill tok/s. Compare within a campaign and distinguish the cache state, input and concurrency. Dashes do not mean zero. The practical example: on the same Spark and a 512-token prompt, vLLM NVFP4 returned the first token faster, while llama.cpp QAT streamed subsequent tokens faster.
| Device and original benchmark | Input or cached prefix | Checkpoint / runtime | Measured TTFT | Measured decode |
|---|---|---|---|---|
| RTX 5090, Witcheer | 16K prefix, cold | QAT Q4_0, llama-server, FA on, parallel 1 | 4.970 s median | 68.7 tok/s on 16K prefix test |
| RTX 5090, same Witcheer run | 16K prefix, warm/reused | Same | 0.352 s median | Same prefix test |
| DGX Spark, Hinne1 | pp512, depth 0 | NVFP4, vLLM | 0.306 s | 6.91 tok/s |
| DGX Spark, same test | pp512, depth 0 | QAT Q4_0, llama.cpp | 1.474 s | 11.77 tok/s |
| DGX Spark, same test | pp512, 32,768 depth | NVFP4, vLLM | 46.143 s | 6.46 tok/s |
| DGX Spark, same test | pp512, 32,768 depth | QAT Q4_0, llama.cpp | 60.284 s | 8.92 tok/s |
| 4× Arc Pro B70 | pp512, depth 0, C1 | AutoRound INT4, vLLM | 0.753 s | 14.42 tok/s |
| 4× Arc Pro B70, same test | pp512, 2,048 depth, C1 | AutoRound INT4, vLLM | 5.989 s | 12.85 tok/s |
Thinking and speculative decoding change different things. MTP guesses several tokens and verifies them; speed depends on the runtime and how many guesses match. Thinking can add output tokens even when the generation rate barely changes. In one LM Studio test with the same QAT weights, the reasoning-off and reasoning-on runs were 3.293 vs 3.20 tok/s, but the request took 194 vs 393 seconds with the different total token counts. Choose an acceptable time to a usable answer, not only a speed score.
How does it compare with Qwen3.5-27B and GPT-OSS 20B?
Bohemian Silicon tested all three on the same M5 Ultra with 256 GB using mlx-lm 0.32. Each test used 512 random prompt tokens and 128 new tokens. The columns show how many tokens were already in context, so even zero preloaded tokens included a 512-token prompt. These are output rates in tokens per second.
| Model package | 0 preloaded | 8,192 preloaded | 32,768 preloaded |
|---|---|---|---|
| Gemma 4 31B, MLX QAT 4-bit | 31 | 27 | 21 |
| Qwen3.5-27B, MLX 4-bit | 55 | 53 | 48 |
| GPT-OSS 20B, MXFP4-Q8 variant | 184 | 172 | 145 |
Gemma reached 26.6 GB peak memory at the shortest point and 31.5 GB at 32K preloaded. That is a different build and workload from the oMLX tests above. These rates help compare waiting time for a fixed token count, not answer quality or how many tokens each model needs for a real task. See the Qwen3.5-27B and GPT-OSS 20B guides for their own hardware tests.
Pick the first workload on a 32 GB Mac
Three practical workloads are worth keeping apart: a short chat with explicit facts, a request that opens a long text document and a question about an image. Choose the workload you actually intend to run. The benchmark table gives useful information about text speed and memory in particular configurations. For the image task, look for evidence that your runner loaded the vision components and used the supplied image. Checking a visually obvious feature in a test image gives you an extra decision that successful text chat cannot supply.
Start with the short text case. Ask the model to find the due date and a named item in a note of a few sentences. Use an example you can score before reading the result. Keep the output short enough that you can see if it closed the response properly. Once that works, try a new note with a correction in the final paragraph. Decide which detail is authoritative before asking the model. If the answer selects the earlier value, check whether the final paragraph was sent, whether the tool used an excerpt and whether the model still gets it wrong with the relevant lines visible.
The 4,096-token result on the reported 32 GB M1 Max records 62.543 seconds to first token, 10.7 tokens/s during generation and 18.8 GB peak. On the 1,024-token row of the same reported run, first token was 15.009 seconds. That is a 47.534-second difference in initial wait over those two points. If an interactive task has a hard 45-second deadline, the first token in that particular 4K run would arrive after the deadline, before there could be a completed reply. Consult the first-token values at the input size that resembles your task before using the decode rate to estimate responsiveness.
If a user uses long inputs because the relevant evidence is hard to find, keep the source and split by logical sections. Ask each request for a short result with a supporting quotation, then verify each quote. Combine the checked results only after comparing conflicting passages with their source pages. This keeps enough of the original material to audit the answer. If the question genuinely depends on the entire document at once, record that separately and test the required workload on a configuration with enough headroom.
Check the package, memory and latency together
Record the exact checkpoint and quantization in one line. Save the runner and version in another. Add the input length, configured context, existing cache depth, output limit and whether the weights were already loaded. The package may fit, and later requests can still be constrained by a growing context or other memory use. Review activity on your own Mac and preserve the existing working settings before increasing the allocation. If sleep, a second running model or a foreground app changes the conditions, keep that in the run record.
Try a package comparison only after one version has passed the task. Keep the source and success check fixed. When testing a smaller artifact, check wording and factual correctness as well as wait and memory. A lower peak gives you useful room if it avoids other interruptions and the answer still meets the same requirements. If the smaller option drops a needed line or stops before completing, compare against a passing baseline and make the failure visible.
For a vision test, prepare two harmless images with simple but different contents, such as a chart with “April 12” in one copy and “April 18” in the other. Ask for the date from the supplied image. Send each in a new session with the intended model and use a text-only request as a separate control. If the answer never changes when the image changes, investigate whether the model received the image or is guessing. Keep any vision connector data matched to the chosen package and release. Use documented settings for the runtime and save the original images with your answer key.
Compare Windows, Linux and Mac results at the right boundary
A group of desktop GPU runs obtained with the same model package and a short workload can help compare those specific configurations. If you intend to use a different package, a longer prompt or a different backend, check whether the original test still resembles your use. For example, the two R9700 entries here use the same quantization and fixed prompt and generation sizes but different backends. One reports stronger prompt processing and the other higher decode. The tradeoff is only useful after you know whether the delay you need to reduce is before the first token or during output.
Look at the context depth when comparing first-token measurements. A short new request and a request into a long existing context can behave differently even on one machine. If your app reuses a prefix, include one fresh document in the comparison so you can judge that case separately. If the original source reports a cache state that your workload cannot reproduce, keep the measured row as an example of that source’s conditions. Use the full output and answer check when deciding whether the improvement helps.
If you are comparing Gemma with other model families, assign the same task and score it from the same answer key. An acceptable extraction might need all three fields, and a document answer may need a supporting quote. Some models produce longer reasoning or an answer with more explanation. Save the raw response and check where the final answer becomes readable instead of comparing only token count. A comparison can include capability differences such as accepting an image, as long as each result stays tied to the inputs and actual test.
Decide before expanding beyond the first working task
For a single user, define a deadline and include the review step in the observed workflow. For a batch, set acceptable success and wait ranges before adding more inputs. Track memory and latency at the input size you expect, not just the small baseline. Return to the recorded baseline if the larger task interrupts other work or begins to fail. This lets you preserve a use you already know works while investigating the next.
If the outcome is more important than the pace, choose a setup that produces an answer you can verify with source material. If the use case requires immediate interaction, compare the same evaluation on shorter excerpts and a smaller model before interpreting the benchmark peak as a purchasing threshold. Record both how fast it starts and which answers are correct. Those are the values that connect the public reports above to a decision about day-to-day work.
How can I verify it on my computer?
Use the short and long M1 Max rows to choose two test inputs on your own Mac. Put a known fact near the end of the longer input and verify the final reply contains it. Log the start delay and the answer separately, so a loaded model or a fast stream cannot mask a missed fact.
- Pick and document one exact package. For a Mac or PC starting point, use the official QAT Q4_0 GGUF with the Google llama.cpp guide, or choose LM Studio’s catalogued 31B QAT variant and record its exact source file. For Ollama, choose the explicit QAT tag. With oMLX, match the MLX conversion separately. Record package name, download hash if available, runtime build, GPU placement, Flash Attention, KV cache and whether MTP/vision are enabled.
- Measure reading and writing separately. If you already downloaded a compatible GGUF and have a working llama.cpp build, run the command below from your terminal. If your build has no GPU backend or if it only partially offloads, do not add your result to an all-GPU comparison. Check the startup log and dedicated VRAM or unified-memory pressure.
- Time your real work. Keep one request and the same output cap, use a streamed response, and record cold and warm TTFT separately. Test a short prompt and a representative document. Verify one answer from the start and one from the end. If a package fits but produces an empty reply, starts swapping, or drops a fact, treat that as a failed usability test rather than a pass based on tokens/s.
- Compare a smaller alternative only after the baseline. The 26B A4B variant activates fewer parameters per output token and may be more responsive; a smaller checkpoint can reduce the weight footprint too. Check the same sample prompt for answer quality. Raising a context limit or adding a draft model is not the first fix when a card is already out of memory.
llama-bench -m /path/to/gemma-4-31B-it-qat-q4_0.gguf -ngl 99 -fa on -p 512 -n 128 -r 3
For setup, see serving GGUF with llama.cpp, offline chat with LM Studio or Ollama context settings. Read the reported pp512 and tg128 rows separately. That benchmark does not measure elapsed time before a reader sees the first token. Start with text-only, one active request and no draft; add other settings one at a time so you can see which change actually helped.