--- language: en library_name: mlx tags: - quantized - mlx base_model: - google/gemma-4-31B-it pipeline_tag: image-text-to-text --- # Gemma-4-31B See gemma-4-31B in action: [demonstration video](https://youtu.be/S0oxWHGtg2w) For improved performance, download and enable a compatible [MTP speculative decoder](https://huggingface.co/models?search=inferencerlabs/gemma-4-31b-mtp-mlx). #### Tested on a M3 Ultra 512GB RAM using [Inferencer app](https://inferencer.com) - Text inference: ~17.1 tokens/s @ 1000 tokens (debug build) - Vision inference: ~15.7 tokens/s - Vision inference: (with MTP): ~34 tokens/s (available from v1.11.5) - Memory usage: ~33.1 GiB
9bpw quant typically achieves near lossless accuracy in our coding test
| Quantization (bpw) | Perplexity | Token Accuracy | Missed Divergence |
|---|---|---|---|
| q4.5 | 1.32812 | 90.5% | 26.44% |
| q5.5 | 1.23437 | 95.4% | 16.03% |
| q6.5 | 1.21875 | 96.85% | 12.55% |
| q8.5 | 1.21875 | 97.65% | 9.92% |
| q9 | 1.21093 | 97.95% | 9.61% |
| Base | 1.20312 | 100.0% | 0.000% |