alt.freeweights.gemma / gemma-4-31B-it-qat-OptiQ-4bit
From: mlx-community <huggingface.co/mlx-community>Newsgroups: alt.freeweights.gemmaSubject:

gemma-4-31B-it-qat-OptiQ-4bit

Date: 2026-11-15Commit: 634fd99Signed: 2DC28CC7B26A283B ✓

Text generation model with 30.7B parameters. Safetensors weights, 23.6 GB in all. Published by mlx-community under Apache-2.0.

30.7B params23.6GBgemma-4-31B-it-qat-OptiQ-4bitsafetensorspermissive
FactsParams30.7BSize23.6 GBFormatssafetensorsTasktext generationLicenseApache-2.0From sourcepermissive
$ fw get mlx-community/gemma-4-31B-it-qat-OptiQ-4bit
# manifest sha256 5708f7ff0ec3… · 23.6 GB · 17 files
$ fw verify ./gemma-4-31B-it-qat-OptiQ-4bit mlx-community/gemma-4-31B-it-qat-OptiQ-4bit
From sourceHosted (signed)mlx-community/gemma-4-31B-it-qat-OptiQ-4bitLast check: 2026-11-15 04:58 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Quantized of gemma-4-31B-it-qat-q4_0-unquantized.

Works with

Overview

Size
23.6 GB
Weights
23.5 GB (safetensors)
Parameters
30.7B
Formats
safetensors
Task
text generation
License
Apache-2.0 (permissive)
Files
17, each with a sha256
Publisher
mlx-community
Added
2026-11-15
Section
alt.freeweights.gemma
Lineage

Original release from the publisher.

Base model: google/gemma-4-31B-it-qat-q4_0-unquantized

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 04:58 UTCpassed

Model card

From the publisher at commit 634fd99. Shown as plain text with links; images open at the publisher.

mlx-community/gemma-4-31B-it-qat-OptiQ-4bit#

Built with mlx-optiq, the MLX-native toolkit to quantize, fine-tune, and serve LLMs locally on Apple Silicon, no PyTorch and no cloud. Try the Lab · All OptiQ quants · Docs

A 4-bit mixed-precision MLX quant produced by mlx-optiq, built on Google's quantization-aware-trained (QAT) Gemma-4 base. This is the flagship of the family: the 31B dense Gemma-4, and the strongest OptiQ quant on the Capability Score. OptiQ's sensitivity-guided per-layer bit allocation is applied on top of weights already trained to survive low-bit quantization, and it still beats a uniform 4-bit quant of the same QAT base by +1.65 Capability Score points.

This is a quant of google/gemma-4-31B-it-qat-q4_0-unquantized. Per-layer bit-widths come from a KL-divergence sensitivity pass on a six-domain calibration mix (prose, reasoning, code, agent, tool-call, constraint-bearing instructions). Sensitive layers go to 8-bit, robust ones stay at 4-bit.

Quantization details#

PropertyValue
Basegoogle/gemma-4-31B-it-qat-q4_0-unquantized (QAT, dense)
Predominant precision4-bit
Components at 8-bit (sensitive)186
Components at 4-bit (robust)224
Total quantized components410
Achieved bits-per-weight5.20
Group size64
Reference for sensitivityuniform 4-bit (streamed)
Calibration mixsix-domain mix
Visionbf16 sidecar (optiq_vision.safetensors), image+text via optiq
Speculative draftergoogle/gemma-4-31B-it-qat-q4_0-unquantized-assistant via optiq serve --drafter

Capability Score#

Six-metric mean (MMLU, GSM8K, IFEval, BFCL, HumanEval, HashHop), scored against a uniform 4-bit quant of the same QAT base. That comparison isolates what the mixed-precision allocation adds, holding the base fixed.

BenchmarkThis model (OptiQ, QAT base)Uniform-4 (QAT base)Delta
MMLU (5-shot, 1000)72.7%72.4%+0.3
GSM8K (1000)96.3%96.6%-0.3
IFEval (full, strict)77.8%77.4%+0.4
BFCL-V3 simple (200)93.0%93.0%+0.0
HumanEval (pass@1, 164)93.3%92.7%+0.6
HashHop (long-context)59.0%50.0%+9.0
Capability Score (mean)82.0180.36+1.65

OptiQ adds +1.65 points over uniform 4-bit on this QAT base, the largest margin in the Gemma-4 family alongside the small QAT models (E2B +2.09, E4B +1.19, 12B +1.37). The gain concentrates in long-context retrieval (HashHop +9.0): the per-layer allocation puts 8-bit on the attention and projection layers that carry the retrieval signal, which the larger model leans on most. The mixed quant is 5.20 bits-per-weight (about 20.8 GB on disk) versus 4.0 bits-per-weight (about 16.1 GB) for uniform 4-bit, with the extra budget spent on the layers that need it.

Usage#

This is a Gemma-4 (model_type: gemma4, gemma4_text), so it needs mlx-lm from main and import optiq (the Gemma-4 text tower is not in the 0.31.3 PyPI release; the main build also reports 0.31.3, so install from git, not a version pin):

pip install -U mlx-optiq "mlx-lm @ git+https://github.com/ml-explore/mlx-lm.git"
import optiq  # registers the OptiQ model paths
from mlx_lm import load, generate
model, tokenizer = load("mlx-community/gemma-4-31B-it-qat-OptiQ-4bit")
print(generate(model, tokenizer, "Explain mixed-precision quantization.", max_tokens=256))

Image+text input and the speculative drafter run through mlx-optiq:

pip install mlx-optiq
optiq serve --model mlx-community/gemma-4-31B-it-qat-OptiQ-4bit \
            --drafter google/gemma-4-31B-it-qat-q4_0-unquantized-assistant

The language and image+text paths both run through optiq. The bf16 vision tower rides in optiq_vision.safetensors, which mlx-lm ignores (it globs model*.safetensors), so both paths work from one artifact.

Files

17 files · 23.6 GBWeights 23.5 GB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 17 files with their sha256
FileSizesha256
.gitattributes1.57 KB34448b82c17d60fec9b65b1f093c115ddbaadc04beb1b0140b6bfed2e012a930
README.md4.69 KB11d44b4c3126d91ee0cbbca1e35a8b5a166840bbec219fb1dc31cbcce9a87578
chat_template.jinja18.7 KBae53464bf3be25802b3a5b37def7fd89667067d7577049b3b2d74c4d8de4c6d4
config.json89.0 KBfcbca54807808674be65d852263e91b9d8a8e8609598d596cf0e0b5e84de9312
generation_config.json203 Bb69207f9be617e982d13cc273cce6fd88c98dda99a4bdc5e2d52ffe0a0d9f0a9
kv_config.json3.95 KB8b9a88c37405152b02d38d5d6529dcae4039c84313ef009415fd48181630b419
model-00001-of-00005.safetensors5.36 GB50765df2a6dcb94d73ea2a5d0016bc19a6a270af2137adf1e0d5c1277456da7b
model-00002-of-00005.safetensors5.34 GB4a4aad45c554cc58cf2dfc3b3499d196cd158d865c0677f93f435afdd52fec42
model-00003-of-00005.safetensors5.28 GBb38885dde36d3a698f1ad2eddf4e928e45cafc7becfe467310bc8cd339546a80
model-00004-of-00005.safetensors5.37 GB758d4ff6687ed509f5027ffd991ef0316f58cd594c5b0486d6ea3d06e6060817
model-00005-of-00005.safetensors1.02 GBa7c31deb64e19831c8b440c77768f341dcd4cc69f268c1e7b2b6899191cdc29b
model.safetensors.index.json194 KB67e0904ae1a7b91093ac4f1544216098053b88dda251cdf1730a044ae6d2d219
optiq_metadata.json42.2 KB75cbd9ed3969453f90f6a3e455144eeb3c6edf4296544f6f44a9663208bb271e
optiq_vision.safetensors1.15 GB3c8cf44a8e09f464e052997f79f2f54e0b800e4c3512a589c222379bfa0def8c
processor_config.json1.69 KB32bdf45d2ad4cc29a0822ddd157a182de76644f0419a6228d151495256e9813c
tokenizer.json32.2 MBcc8d3a0ce36466ccc1278bf987df5f71db1719b9ca6b4118264f45cb627bfe0f
tokenizer_config.json2.77 KBe40cb5c9e039f9f63ed42cd44273bd969130270e7e63ee50ac0001869917f8f6
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
634fd99e56 pinned now2026-11-15 04:58 UTC17 files · 23.6 GB

Use it

$ fw get mlx-community/gemma-4-31B-it-qat-OptiQ-4bit
# manifest sha256 5708f7ff0ec3… · 23.6 GB · 17 files
$ fw verify ./gemma-4-31B-it-qat-OptiQ-4bit mlx-community/gemma-4-31B-it-qat-OptiQ-4bit
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/mlx-community/gemma-4-31B-it-qat-OptiQ-4bit.json --dir ./gemma-4-31B-it-qat-OptiQ-4bit $ python3 fw.py verify ./gemma-4-31B-it-qat-OptiQ-4bit ./mlx-community__gemma-4-31B-it-qat-OptiQ-4bit.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download mlx-community/gemma-4-31B-it-qat-OptiQ-4bit --revision 634fd99e567344670154873535b8fef2731517e3 --local-dir ./gemma-4-31B-it-qat-OptiQ-4bit
transformersLoad the weights in Python.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from transformers import AutoModelForCausalLM, AutoTokenizer tok = AutoTokenizer.from_pretrained("mlx-community/gemma-4-31B-it-qat-OptiQ-4bit", revision="634fd99e567344670154873535b8fef2731517e3") model = AutoModelForCausalLM.from_pretrained("mlx-community/gemma-4-31B-it-qat-OptiQ-4bit", revision="634fd99e567344670154873535b8fef2731517e3", device_map="auto")
vLLMServe an OpenAI-compatible API.
$ HF_ENDPOINT=https://freeweights.allternit.com vllm serve mlx-community/gemma-4-31B-it-qat-OptiQ-4bit --revision 634fd99e567344670154873535b8fef2731517e3

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
README.md
Text sha256
11d44b4c3126d91ee0cbbca1e35a8b5a166840bbec219fb1dc31cbcce9a87578
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: mlx-community <huggingface.co/mlx-community>Newsgroups: alt.freeweights.gemmaSubject: gemma-4-31B-it-qat-OptiQ-4bitDate: 2026-11-15Commit: 634fd99Signed: 2DC28CC7B26A283B ✓
Upstream
mlx-community/gemma-4-31B-it-qat-OptiQ-4bit
Pinned commit
634fd99e567344670154873535b8fef2731517e3
Manifest
gemma-4-31B-it-qat-OptiQ-4bit.json · .minisig
Manifest sha256
5708f7ff0ec3e76fe736ba9c85105408c8ffbd511784795bd613a903ed891b7c
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 04:58 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/mlx-community/gemma-4-31B-it-qat-OptiQ-4bit.json $ curl -O https://freeweights.allternit.com/manifests/mlx-community/gemma-4-31B-it-qat-OptiQ-4bit.json.minisig $ minisign -Vm gemma-4-31B-it-qat-OptiQ-4bit.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

Parent

google/gemma-4-31B-it-qat-q4_0-unquantized · this model is a quantization of it

No model in the catalog names this one as its parent.

Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download mlx-community/gemma-4-31B-it-qat-OptiQ-4bit
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. gemma-4-31B-it-qat-OptiQ-4bit.json. Provenance. Takedown history: none.
From: laion <huggingface.co/laion>Subject: Alexandria-Gemma-4-12B-it-Ornith9-Summaries-LoRA-r128
From: laion <huggingface.co/laion>Subject: Alexandria-Gemma-4-12B-it-Ornith9-Summaries-LoRA-r64
From: laion <huggingface.co/laion>Subject: Alexandria-Gemma-4-12B-it-Qwen27-Knowledge-Units-LoRA-r128
From: laion <huggingface.co/laion>Subject: Alexandria-Gemma-4-12B-it-Qwen27-Summaries-LoRA-r128
From: laion <huggingface.co/laion>Subject: Alexandria-Gemma-4-12B-it-Qwen27-Summaries-LoRA-r64
From: laion <huggingface.co/laion>Subject: Alexandria-Gemma-4-E4B-it-Qwen27-Knowledge-Units-LoRA-r128