Can I run gemma-4-31B-it on a Apple M4?
Not at these settings. No indexed quantization of gemma-4-31B-it fits Apple M4 at any context we compute, with q4_0 KV. The smallest shipped quantization is 7.95 GiB in weights alone, against 5.58 GiB usable. CPU offload can still run it, slowly.
Every quantization at every context
| Quant | Weights● | 4K◐ | 8K◐ | 16K◐ | 32K◐ | 64K◐ | 128K◐ |
|---|---|---|---|---|---|---|---|
| BF16 | 57.20 GiB | 58.3 | 58.5 | 58.9 | 59.6 | 61.0 | 63.8 |
| Q8_0 | 30.87 GiB | 32.0 | 32.2 | 32.5 | 33.2 | 34.6 | 37.5 |
| Q6_K_L | 25.21 GiB | 26.3 | 26.5 | 26.9 | 27.6 | 29.0 | 31.8 |
| Q6_K | 24.89 GiB | 26.0 | 26.2 | 26.6 | 27.3 | 28.7 | 31.5 |
| Q5_K_L | 21.37 GiB | 22.5 | 22.7 | 23.0 | 23.7 | 25.1 | 28.0 |
| Q5_K_M | 21.06 GiB | 22.2 | 22.4 | 22.7 | 23.4 | 24.8 | 27.6 |
| Q5_K_S | 20.03 GiB | 21.2 | 21.3 | 21.7 | 22.4 | 23.8 | 26.6 |
| Q4_K_L | 18.57 GiB | 19.7 | 19.9 | 20.2 | 20.9 | 22.3 | 25.2 |
| Q4_1 | 18.41 GiB | 19.5 | 19.7 | 20.1 | 20.8 | 22.2 | 25.0 |
| Q4_K_M | 18.25 GiB | 19.4 | 19.6 | 19.9 | 20.6 | 22.0 | 24.8 |
| Q4_0 | 17.16 GiB | 18.3 | 18.5 | 18.8 | 19.5 | 20.9 | 23.7 |
| Q4_K_S | 16.95 GiB | 18.1 | 18.3 | 18.6 | 19.3 | 20.7 | 23.5 |
| IQ4_NL | 16.79 GiB | 17.9 | 18.1 | 18.5 | 19.2 | 20.6 | 23.4 |
| IQ4_XS | 15.98 GiB | 17.1 | 17.3 | 17.6 | 18.3 | 19.8 | 22.6 |
| Q3_K_L | 15.66 GiB | 16.8 | 17.0 | 17.3 | 18.0 | 19.4 | 22.2 |
| Q3_K_M | 14.82 GiB | 16.0 | 16.1 | 16.5 | 17.2 | 18.6 | 21.4 |
| IQ3_M | 14.09 GiB | 15.2 | 15.4 | 15.8 | 16.5 | 17.9 | 20.7 |
| Q3_K_S | 13.34 GiB | 14.5 | 14.7 | 15.0 | 15.7 | 17.1 | 19.9 |
| IQ3_XS | 12.89 GiB | 14.0 | 14.2 | 14.6 | 15.3 | 16.7 | 19.5 |
| IQ3_XXS | 12.09 GiB | 13.2 | 13.4 | 13.8 | 14.5 | 15.9 | 18.7 |
| Q2_K_L | 12.08 GiB | 13.2 | 13.4 | 13.7 | 14.4 | 15.9 | 18.7 |
| IQ2_M | 11.78 GiB | 12.9 | 13.1 | 13.4 | 14.1 | 15.6 | 18.4 |
| Q2_K | 11.76 GiB | 12.9 | 13.1 | 13.4 | 14.1 | 15.5 | 18.3 |
| IQ2_S | 11.25 GiB | 12.4 | 12.6 | 12.9 | 13.6 | 15.0 | 17.8 |
| UD-IQ3_XXS | 11.02 GiB | 12.2 | 12.3 | 12.7 | 13.4 | 14.8 | 17.6 |
| IQ2_XS | 10.71 GiB | 11.8 | 12.0 | 12.4 | 13.1 | 14.5 | 17.3 |
| IQ2_XXS | 10.09 GiB | 11.2 | 11.4 | 11.7 | 12.5 | 13.9 | 16.7 |
| UD-IQ2_M | 10.01 GiB | 11.2 | 11.3 | 11.7 | 12.4 | 13.8 | 16.6 |
| IQ1_M | 9.42 GiB | 10.6 | 10.7 | 11.1 | 11.8 | 13.2 | 16.0 |
| UD-IQ2_XXS | 7.95 GiB | 9.1 | 9.3 | 9.6 | 10.3 | 11.7 | 14.5 |
Figures are GiB of total memory: weights plus KV cache plus compute buffer and backend overhead. Weights and KV are near-exact; the overhead term is modeled. Hover any cell for the breakdown.
Why other calculators disagree
A parameters × bits ÷ 8 estimate ignores two things that dominate at long context. First, the weights themselves are not the nominal rate — quantizations are mixtures, so the real file is consistently larger than the label implies. Second, most of this model's layers cache only a 1,024-token window rather than the full context.