Skip to content
RfRigFit

Yes. Gemma 4 31B fits on the Mac Studio M3 Ultra 96GB at Q8: 34.0 GB needed against 67.2 GB of usable unified memory, so 33.2 GB to spare. The next quant up, FP16, needs 75.1 GB, which is 7.9 GB more than is usable. With an FP16 KV cache, about 210,000 tokens of context fit beside the 32.6 GB of Q8 weights.

Can the Mac Studio M3 Ultra 96GB run Gemma 4 31B?

Data updated . Last reviewed the same day, when this catalog snapshot was written.

Memory math

The Mac Studio M3 Ultra 96GB has 96.0 GB of unified memory shared by the CPU and GPU. The catalog counts 70% of it, 67.2 GB, as available for weights plus KV cache and leaves 28.8 GB for the operating system and other apps. A result under 2 GB of headroom is labeled tight.

Gemma 4 31B stores 31.3B parameters. Against 67.2 GB usable, Q4 needs 19.7 GB (47.5 GB spare); Q8 needs 34.0 GB (33.2 GB spare); FP16 needs 75.1 GB (7.9 GB short). Q8 is the highest of the three that fits. Q4 comes from gemma-4-31B-it-Q4_K_M.gguf plus KV cache at 8K.

The Hub repo also has Q5_K_M (gemma-4-31B-it-Q5_K_M.gguf, 23.0 GB with KV, 44.2 GB spare) and Q6_K (gemma-4-31B-it-UD-Q6_K_XL.gguf, 28.9 GB with KV, 38.3 GB spare), between the catalog's Q4 and Q8 steps.

The Mac Studio M3 Ultra 96GB

Check used prices on eBay for Mac Studio M3 Ultra 96GB

The eBay link is a search of used listings, not a price or a recommendation of a seller. RigFit may earn a commission from qualifying eBay purchases made through links on this site, at no extra cost to you. See the disclosure.

Gemma 4 31B

Quant ladder

Estimated memory for Gemma 4 31B on Mac Studio M3 Ultra 96GB
QuantEstimateHeadroomEst. tok/sVerdict
Q419.7 GB47.5 GB44.7 tok/sYes
Q834.0 GB33.2 GB25.1 tok/sYes
FP1675.1 GB-7.9 GB—No

Context length and KV cache

FP16 KV-cache estimate: 1.3 GB at 8,192 tokens and 5.4 GB at 32,768 tokens, about 164 KB per token (10 counted layers). GQA counts two tensors (K and V) for the stored KV heads and head dimension. config.json also sets a sliding window of 1,024 tokens. The figures assume every counted layer stores the full context, so they can overstate cache on sliding layers and understate the context that fits.

Context that fits in 67.2 GB usable unified memory, counting weights plus FP16 KV cache and nothing else (estimate: (usable - weight file) / KV per token, capped at the model's 262,144-token window): Q4: the model's full 262,144-token window; Q8: about 210,000 tokens.

Speed estimate

Gemma 4 31B is dense: every one of its 31.3B parameters is used for each token, so the 32.6 GB of Q8 weights set both what must fit and what is read per token.

Estimate, not a benchmark and not from a cited run: 819 GB/s divided by 32.6 GB of weights read per token at Q8 is a ceiling of 25.1 tok/s. It ignores prompt processing, KV-cache reads, and software overhead, so real generation is slower.

Offload

This machine has one memory pool, so there is no VRAM-versus-RAM split and nothing to offload at Q8. Going to FP16 would need 7.9 GB more than is usable, and there is no second pool to spill into.

Ollama

This command pulls the Q4_K_M file from unsloth/gemma-4-31B-it-GGUF, the Hub repo whose file size is used above. It is not an official Ollama library tag.

ollama run hf.co/unsloth/gemma-4-31B-it-GGUF:Q4_K_M

Nearby machines for Gemma 4 31B

Nearby models on the Mac Studio M3 Ultra 96GB

All hardware for Gemma 4 31B · All models for the Mac Studio M3 Ultra 96GB

Questions

How much memory does Gemma 4 31B need at Q4?
The Q4 figure used here is 19.7 GB, from gemma-4-31B-it-Q4_K_M.gguf plus KV cache at 8K. GGUF file size plus an FP16 KV-cache estimate at 8,192 tokens. The cache counts only the layers and heads named in the method on the About page.
Can the Mac Studio M3 Ultra 96GB run Gemma 4 31B?
Yes. Gemma 4 31B fits on the Mac Studio M3 Ultra 96GB at Q8: 34.0 GB needed against 67.2 GB of usable unified memory, so 33.2 GB to spare. The next quant up, FP16, needs 75.1 GB, which is 7.9 GB more than is usable. With an FP16 KV cache, about 210,000 tokens of context fit beside the 32.6 GB of Q8 weights.
How much context fits when Gemma 4 31B runs on the Mac Studio M3 Ultra 96GB?
Context that fits in 67.2 GB usable unified memory, counting weights plus FP16 KV cache and nothing else (estimate: (usable - weight file) / KV per token, capped at the model's 262,144-token window): Q4: the model's full 262,144-token window; Q8: about 210,000 tokens.
How fast is Gemma 4 31B on the Mac Studio M3 Ultra 96GB, as a bandwidth estimate?
Estimate, not a benchmark and not from a cited run: 819 GB/s divided by 32.6 GB of weights read per token at Q8 is a ceiling of 25.1 tok/s. It ignores prompt processing, KV-cache reads, and software overhead, so real generation is slower.
What is the cheapest catalog device that runs Gemma 4 31B at Q4?
Radeon RX 7900 XTX, list price $999, with 22.8 GB usable.
What changes with the next machine up from the Mac Studio M3 Ultra 96GB?
Framework Desktop 128GB (128 GB unified memory, 96.0 GB usable, 256 GB/s, list $3,449), 28.8 GB more usable than here. Yes at FP16, 20.9 GB spare. The best quant moves from Q8 to FP16.