Views
No views yet
coder3101/gemma-4-26B-A4B-it-heretic.mlx_lm.convert's
default Gemma-4 predicate (everything 4-bit, router.proj 8-bit). Subsequent versions
(v1+) explore mixed-precision and AWQ/DWQ recipes for better quality.See the variant index below for newer revisions.
| Component | Bits | Group size | Notes |
|---|---|---|---|
router.proj (per-layer) | 8 | 64 | mlx-lm built-in Gemma-4 override |
| Everything else | 4 | 64 | including dense MLP, experts, attention |
| Mode | affine | — | mlx-lm default |
1mlx_lm.convert \
2 --hf-path coder3101/gemma-4-26B-A4B-it-heretic \
3 --mlx-path output/gemma-4-26B-A4B-it-heretic-mlx-4bit \
4 -q --q-bits 4 --q-group-size 64| Metric | Value | Dataset |
|---|---|---|
| Perplexity | 156.93 ± 2.77 | allenai/tulu-3-sft-mixture (256 samples × 512 tok = 131k tokens) |
| Eval time | 226 s | batch size 8 |
| Eval peak memory | 21.6 GB | — |
| Metric | Value |
|---|---|
| Prefill | 769 tok/s (avg over 5 trials) |
| Generation | 75.1 tok/s (avg over 5 trials) |
| Inference peak memory | 14.7 GB |
prompt_tokens=512, generation_tokens=128, batch_size=1.| Format | Size |
|---|---|
| Original (bf16) | ~52 GB |
| This MLX 4-bit | 13 GB |
mlx-community/... PPL ~109 (30% worse).
Root cause analysis identified that mlx-community uses an asymmetric MoE recipe:
8-bit on the always-on dense MLP path + 4-bit on sparse experts. Tracking
versions on HF lets us reproduce and improve from this baseline iteratively.1from mlx_lm import load, generate
2
3model, tokenizer = load("BRlin/gemma-4-26B-A4B-it-heretic-mlx-4bit")
4prompt = "Hello, how are you?"
5response = generate(model, tokenizer, prompt=prompt, max_tokens=100, verbose=True)1mlx_lm.generate --model BRlin/gemma-4-26B-A4B-it-heretic-mlx-4bit \
2 --prompt "Explain quantization in one paragraph." --max-tokens 200| Version | Repo | Recipe | PPL | Gen TPS | Disk | Status |
|---|---|---|---|---|---|---|
| v0 (this) | BRlin/gemma-4-26B-A4B-it-heretic-mlx-4bit | Standard 4-bit | 156.93 | 75.1 | 13 GB | baseline |
| v1 | gemma-4-26B-A4B-it-heretic-mlx-mixed-4-8 | 8-bit dense MLP + router, 4-bit experts | 119.87 (−23.6%) | 67.6 | 14 GB | recommended default |
| v2 | BRlin/gemma-4-26B-A4B-it-heretic-mlx-awq-mixed-4-8 | v1 + AWQ calibration | TBD | TBD | TBD | planned |
| v3 | BRlin/gemma-4-26B-A4B-it-heretic-mlx-dwq-mixed-4-8 | v1/v2 + DWQ distillation | TBD | TBD | TBD | planned |
v1 is recommended for most use cases — large quality gain, modest speed cost.