How to use from
Pi
Start the MLX server
# Install MLX LM:
uv tool install mlx-lm
# Start a local OpenAI-compatible server:
mlx_lm.server --model "inferencerlabs/gemma-4-31B-MLX-Q9"
Configure the model in Pi
# Install Pi:
npm install -g @earendil-works/pi-coding-agent
# Add to ~/.pi/agent/models.json:
{
  "providers": {
    "mlx-lm": {
      "baseUrl": "http://localhost:8080/v1",
      "api": "openai-completions",
      "apiKey": "none",
      "models": [
        {
          "id": "inferencerlabs/gemma-4-31B-MLX-Q9"
        }
      ]
    }
  }
}
Run Pi
# Start Pi in your project directory:
pi
Quick Links

Gemma-4-31B

See gemma-4-31B in action: demonstration video

For improved performance, download and enable a compatible MTP speculative decoder.

Tested on a M3 Ultra 512GB RAM using Inferencer app

  • 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)PerplexityToken AccuracyMissed Divergence
q4.51.3281290.5%26.44%
q5.51.2343795.4%16.03%
q6.51.2187596.85%12.55%
q8.51.2187597.65%9.92%
q91.2109397.95%9.61%
Base1.20312100.0%0.000%
  • Perplexity: Measures the confidence for predicting base tokens (lower is better)
  • Token Accuracy: The percentage of correctly generated base tokens
  • Missed Divergence: Measures severity of misses; how much the token was missed by
Quantized with a modified version of MLX
For more details see demonstration video or visit google/gemma-4-31B-it.

Disclaimer

We are not the creator, originator, or owner of any model listed. Each model is created and provided by third parties. Models may not always be accurate or contextually appropriate. You are responsible for verifying the information before making important decisions. We are not liable for any damages, losses, or issues arising from its use, including data loss or inaccuracies in AI-generated content.

Downloads last month
270
Safetensors
Model size
10B params
Tensor type
BF16
·
U32
·
MLX
Hardware compatibility
Log In to add your hardware

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for inferencerlabs/gemma-4-31B-MLX-Q9

Quantized
(302)
this model