Gemma-4-12B-Coder (fable5 x composer2.5) - native MLX (nvfp4) for Apple Silicon

A GGUF-free, native-MLX build of yuxinlu1/gemma-4-12B-coder-fable5-composer2.5, runnable on Apple Silicon via KrillLM's native Swift + MLX engine (no Python at inference).

Credit

The model is @yuxinlu1's fine-tune of google/gemma-4-12B-it - a Python/algorithmic coding model that reasons in Gemma's thinking channel before emitting a solution. All capability credit is theirs; please star the original repo. This repo only re-packages the weights to run natively on MLX.

What this is

The fine-tune is published as GGUF (lossy k-quants) and as NVFP4 safetensors (compressed-tensors). This build is converted GGUF-free from the NVFP4 side into MLX:

  • decompress NVFP4 (compressed-tensors) -> bf16 (pure numpy; byte-exact to the source's stored values, self-checked), then
  • requantize to MLX nvfp4 with attention o_proj and the vision/audio projectors protected at 8-bit (the proven mixed-precision recipe).

So it is lossless by construction relative to the NVFP4 source. Converter + recipe: KrillLM tools/ and docs/GEMMA4_12B_CODER_FINETUNE.md.

Use

brew tap srvsngh99/krillm && brew install krillm
KRILL_ENABLE_THINKING=1 krillm run gemma-4-12b-coder

KRILL_ENABLE_THINKING=1 opens the model's reasoning channel (this is a thinking fine-tune); without it, it answers without reasoning. ~6.7 GB, runs on a 24 GB Mac at ~25 tok/s decode, ~1.6 s cold load.

Benchmarks

Apple M4 Pro, 24 GB, macOS. KrillLM v0.8.0, this nvfp4 build. Reasoning on, greedy (temperature 0), single sample.

Standard EvalPlus harness (leaderboard-comparable):

metric pass@1
HumanEval (base) 85.4%
HumanEval+ (base + extra tests) 83.5%

For reference, KrillLM's own (more lenient) extraction harness scored HumanEval 89.6% reasoning-on / 82.9% reasoning-off on the same problems; the EvalPlus numbers above are the comparable ones. These reflect this fine-tune's capability measured through KrillLM's MLX runtime, not a KrillLM-vs-other-engine claim.

Notes

De-refused (not safety-aligned - add your own guardrails) and English/Python-centric, per the upstream model. This is a weight-only conversion; behavior is the upstream fine-tune's.

Downloads last month
1,182
Safetensors
Model size
2B params
Tensor type
U8
·
U32
·
BF16
·
MLX
Hardware compatibility
Log In to add your hardware

Quantized

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

Model tree for srv-sngh/gemma-4-12B-coder-fable5-composer2.5-nvfp4