Views
No views yet
| Original (BF16) | UD-Q3_K_XL (this model) | |
|---|---|---|
| Size | ~62 GB | 21 GB |
| Format | SafeTensors | SafeTensors |
| Precision | BF16 uniform | 3-bit affine + mixed bits + BF16 |
| FFN group size | — | 64 |
| Biases | — | yes |
| Repo | Bit budget | Size | Decode (tok/s) |
|---|---|---|---|
| Brooooooklyn/Gemma-4-31B-IT-UD-Q2_K_XL-mlx | 2-bit base | 18 GB | 12.1 |
| Brooooooklyn/Gemma-4-31B-IT-UD-Q3_K_XL-mlx (this model) | 3-bit base | 21 GB | 10.4 |
| Brooooooklyn/Gemma-4-31B-IT-UD-Q4_K_XL-mlx | 4-bit base | 24 GB | 9.2 |
| Brooooooklyn/Gemma-4-31B-IT-UD-MXFP4_K_XL-mlx | mxfp4 | 24 GB | 10.6 |
| Brooooooklyn/Gemma-4-31B-IT-UD-NVFP4_K_XL-mlx | nvfp4 | 24 GB | 9.9 |
| Brooooooklyn/Gemma-4-31B-IT-UD-Q5_K_XL-mlx | 5-bit base | 28 GB | 6.8 |
| Brooooooklyn/Gemma-4-31B-IT-UD-Q6_K_XL-mlx | 6-bit base | 31 GB | 7.2 |
| Brooooooklyn/Gemma-4-31B-IT-UD-MXFP8_K_XL-mlx | mxfp8 | 34 GB | 7.8 |
| Brooooooklyn/Gemma-4-31B-IT-UD-Q8_K_XL-mlx | 8-bit base | 35 GB | 7.2 |
examples/lm.ts (best decode tok/s across turns 2–4, steady-state, capitals chat with reasoningEffort: 'low').examples/lm.ts capitals chat with reasoningEffort: 'low'). Decode is memory-bandwidth bound on Apple Silicon — fewer bytes per token directly translates to higher throughput. Gemma-4-31B is fully dense (all 31B parameters active per token), so each decoded token must stream the entire quantized weight footprint from unified memory.| Weight | Mode | Bits | Group | Rationale |
|---|---|---|---|---|
embed_tokens | 5-bit affine | 5 | 64 | Tied with lm_head (Gemma4 shares weights); affine-only loader |
self_attn.q_proj | 5-bit affine | 5 | 64 | AWQ-corrected via input_layernorm |
self_attn.k_proj | 5-bit affine | 5 | 64 | AWQ-corrected via input_layernorm |
self_attn.v_proj | 5-bit affine | 5 | 64 | AWQ-corrected via input_layernorm |
mlp.gate_proj | 3-bit affine | 3 | 64 | Dense MLP (top-level default) (top-level default) |
mlp.up_proj | 3-bit affine | 3 | 64 | Dense MLP (top-level default) (top-level default) |
mlp.down_proj | 4-bit affine | 4 | 64 | Dense MLP; "slightly more sensitive" (unsloth base+1) |
self_attn.o_proj | bf16 | — | — | NOT AWQ-correctable; kept full-precision |
--q-bits 3 the unsloth recipe assigns the base bits to MLP gate/up projections (the bulk of the parameter budget), base+1 to down_proj (slightly more sensitive), base+2 (snapped to a valid bit width) + AWQ pre-scaling to attention q/k/v projections, base+2 to embed_tokens / lm_head (tied weights), and keeps self_attn.o_proj as bf16 (AWQ-uncorrectable — its inputs come from the attention compute, not from a norm layer).| Parameter | Value |
|---|---|
| Total parameters | ~31B (fully dense — all parameters active per token) |
| Hidden size | 5,376 |
| Layers | 60 (sliding-window attention) |
| Attention heads | 32 (16 KV heads, GQA 2:1) |
| Head dimension | 256 |
| MLP intermediate size | 21,504 |
| Vocab size | 262,144 |
| Max context | 131,072 tokens |
| Vision | yes (Gemma4ForConditionalGeneration) |
1import { loadSession } from '@mlx-node/lm';
2
3const session = await loadSession('./Gemma-4-31B-IT-UD-Q3_K_XL-mlx');
4
5for await (const event of session.sendStream('Explain the sliding-window attention design in Gemma-4.', {
6 config: { maxNewTokens: 2048, temperature: 0.6, reasoningEffort: 'low' },
7})) {
8 if (!event.done) process.stdout.write(event.text);
9}1mlx convert \
2 -i gemma-4-31b-it \
3 -o Gemma-4-31B-IT-UD-Q3_K_XL-mlx \
4 -q --q-bits 3 --q-recipe unsloth \
5 --imatrix-path imatrix_unsloth.gguf