Run this model with HF Jobs

Run Xylolabs/gemma-4-31B-MLX-8bit on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/Xylolabs/gemma-4-31B-MLX-8bit. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/Xylolabs/gemma-4-31B-MLX-8bit on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/Xylolabs/gemma-4-31B-MLX-8bit. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Xylolabs

gemma-4-31B MLX 8-bit

MLX text weights from google/gemma-4-31B for mlx-lm, with the vision tower omitted.

How to run

pip install mlx-lm==0.32.2

mlx_lm.generate --model Xylolabs/gemma-4-31B-MLX-8bit --prompt "The history of the printing press began"

Accuracy

The plots average WikiText-2, raw chat and held-out text scores against the model's MLX BF16 weights.

Quant Size WikiText-2 KL top-1 Raw chat KL top-1 Held-out KL top-1
MLX 8-bit 32.617 GB 0.002411 98.206% 0.002388 98.451% 0.002419 98.157%
mlx-community MLX 8-bit 32.617 GB 0.002362 98.206% 0.001901 98.373% 0.002205 98.059%
MLX 4-bit 17.735 GB 0.031330 93.275% 0.026509 93.784% 0.032655 93.255%
mlx-community MLX 4-bit 17.269 GB 0.077446 90.010% 0.068953 90.608% 0.087136 88.431%
Mean KL divergence by file size Top-1 agreement with BF16 by file size

Which file for your hardware

Hardware Memory File Context
Mac Studio M5 Max, 32-core GPU 36 GB unified Xylolabs/gemma-4-31B-MLX-4bit (4-bit, 17.7 GB) 32K
Mac Studio M5 Max, 40-core GPU 48 GB unified Xylolabs/gemma-4-31B-MLX-4bit (4-bit, 17.7 GB) 32K
Mac Studio M5 Max, 40-core GPU 64 GB unified Xylolabs/gemma-4-31B-MLX-8bit (8-bit, 32.6 GB) 32K
Mac Studio M5 Ultra 96 GB unified Xylolabs/gemma-4-31B-MLX-8bit (8-bit, 32.6 GB) 32K
Mac Studio M5 Max, 40-core GPU 128 GB unified Xylolabs/gemma-4-31B-MLX-8bit (8-bit, 32.6 GB) 32K
Mac Studio M5 Ultra 256 GB unified Xylolabs/gemma-4-31B-MLX-8bit (8-bit, 32.6 GB) 32K
Mac Studio M5 Ultra, 80-core GPU 512 GB unified Xylolabs/gemma-4-31B-MLX-8bit (8-bit, 32.6 GB) 32K

License and notices

Apache License 2.0, in LICENSE; modifications in NOTICE.

Updates

  • 2026-12-04: Rebuilt the accuracy table, CSV and charts. Added hardware guidance.
  • 2026-12-02: Updated 4-bit comparison row and dark charts after the 4-bit weight upgrade; added MANIFEST.
Downloads last month
100
Safetensors
Model size
31B params
Tensor type
U32
·
BF16
·
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 Xylolabs/gemma-4-31B-MLX-8bit

Quantized
(48)
this model

Collections including Xylolabs/gemma-4-31B-MLX-8bit