Unsloth - Granite 4.0 H 1B MXFP4 Hybrid GGUF
Dense model utilizing MXFP4_MOE with hybrid weights on a dense model. Achieving interesting results that show smaller file size, more TPS, and near lossless precision.
Use The Following Models!
Stats compared against the standard Q8_0 (precision loss still compared to F16)
MXFP4_MOE-output_mxfp4-router_gate_emb_q8
0% smaller than Q8 • 510.63 TPS (13.8% more TPS than Q8) • 0.1546% precision loss
This repository contains a set of hybrid MXFP4 quantized GGUF models designed to explore a surprising discovery:
A carefully targeted combination of MXFP4 + high-precision embeddings/output weights can deliver near-Q8 accuracy with Q4–Q6 level throughput and smaller file sizes than Q8.
Unlike pure MXFP4, which heavily degrades dense models. This hybrid method selectively protects tensors that matter most for semantic stability, while allowing MXFP4 to accelerate everything else.
This is experimental. And should be treated as such. I am more than encouraging people to use this model and leave feedback! Though precision loss seemed near lossless, did the hybrid models act strange in certain situations? Worse or better on some topics compared to the original model? Did it do better/worse overall on everything? I'd love to hear back from others!
MXFP4_MOE Hybrid Naming Scheme & Synopsis
Multiple different combinations of converted models were created. The results were interesting to say the least. The following table will explain my naming scheme to what was done to the model to create it.
| Suffix Example | Meaning |
|---|---|
MXFP4_MOE |
Pure MXFP4 pipeline |
MXFP4_MOE-Q8 |
Embedding/output in Q8_0 |
MXFP4_MOE-F16 |
Embedding/output in F16 |
output_mxfp4-embd_q8 |
Output → MXFP4, Embedding → Q8 |
output_mxfp4-router_gate_emb_q5_K |
Output → MXFP4, Emb/Router/Gate → Q5_K |
MXFP4_MOE-Q6_K |
Both embedding + output in Q6_K |
Q8_0, Q6_K, Q4_K_M |
Pure model-wide quantizations |
The results achieved were interesting to say the least. It was a brute force game of mass creating models with hybrid methods to find combinations that didn't cause too much noise and paired well with MXFP4.
This repo showcases the converted models, whether good or bad that was created. But, I have been testing other models in different combinations as well. The winning hybrid combinations shown in this repo DOES NOT always equate to the same results on different models.
Some models do better or worse with different kinds of combinations. It depends if it's dense, MOE, and much more. Many times the results surprise me. Many models no matter the combination will not play nice with MXFP4. At least with the methods shown here.
Benchmark Methodology
All models were tested with a unified automated harness using llama.cpp tools.
Included tests:
Throughput:
llama-benchwith descending GPU offload (-ngl 35 → 0) and automatic OOM retry.
Highest successful TPS is recorded.Perplexity:
Three domains: general, code, math.
Each uses an auto-generated corpus of ~32k tokens.
Perplexity is computed withllama-perplexityat 2048-token context.
Same GPU retry logic as above.Precision loss:
Each model is compared to its family F16 baseline.
Precision-loss % is computed for all PPL domains, plus an averaged score.
Models are ranked by this metric.
Table - Overview of Results
Comparing to F16.
| model_name | size_reduction | tps_change |
|---|---|---|
| MXFP4_MOE-output_mxfp4-router_gate_emb_f16 | 34.07% | 11.48% |
| MXFP4_MOE-output_mxfp4-embd_f16 | 42.12% | 13.14% |
| MXFP4_MOE-output_mxfp4-embd_q8 | 46.89% | 29.89% |
| MXFP4_MOE-output_mxfp4-router_gate_emb_q8 | 46.89% | 35.83% |
| MXFP4_MOE-F16 | 41.76% | 1.79% |
| MXFP4_MOE-output_f16-router_gate_emb_f16 | 33.7% | 8.05% |
| MXFP4_MOE-output_q6_k-router_gate_emb_f16 | 34.07% | 5.26% |
| Q6_K | 58.97% | 29.82% |
| MXFP4_MOE-output_q6_k-embd_f16 | 42.12% | 14.56% |
| MXFP4_MOE-Q8 | 46.89% | 19.97% |
| Q8_0 | 46.89% | 23.78% |
| MXFP4_MOE-output_mxfp4-embd_q6_K | 48.35% | 41.16% |
| MXFP4_MOE-output_mxfp4-router_gate_emb_q6_K | 50.18% | 31.66% |
| MXFP4_MOE-output_f16-router_gate_emb_q6_k | 49.82% | 26.81% |
| MXFP4_MOE-output_q6_K-router_gate_emb_q6_K | 50.18% | 23.31% |
| MXFP4_MOE-Q6_K | 48.35% | 35.45% |
| Q5_K_M | 64.1% | 23.91% |
| MXFP4_MOE-output_mxfp4-embd_q5_K | 49.08% | 42.51% |
| MXFP4_MOE-Q5_K | 49.08% | 36.22% |
| MXFP4_MOE-output_mxfp4-router_gate_emb_q5_K | 52.01% | 38.38% |
| MXFP4_MOE-output_mxfp4-router_gate_emb_q4_K | 53.85% | 36.7% |
| MXFP4_MOE-output_mxfp4-embd_q4_K | 49.45% | 49.46% |
| MXFP4_MOE-Q4_K | 49.45% | 35.73% |
| Q4_K_M | 69.23% | 40.58% |
| MXFP4_MOE-output_q8-embd_mxfp4 | 49.45% | 29.51% |
| MXFP4_MOE | 73.26% | 47.8% |
- All percentages compared against the selected family F16 baseline.
Table - File Size + TPS + Avg Precision Loss
| model_name | file_size_gb | bench_tps | avg_prec_loss |
|---|---|---|---|
| F16 | 2.73 | 375.94 | 0 |
| MXFP4_MOE-output_mxfp4-router_gate_emb_f16 | 1.8 | 419.09 | 0.1194 |
| MXFP4_MOE-output_mxfp4-embd_f16 | 1.58 | 425.33 | 0.1425 |
| MXFP4_MOE-output_mxfp4-embd_q8 | 1.45 | 488.29 | 0.1546 |
| MXFP4_MOE-output_mxfp4-router_gate_emb_q8 | 1.45 | 510.63 | 0.1546 |
| MXFP4_MOE-F16 | 1.59 | 382.67 | 0.1846 |
| MXFP4_MOE-output_f16-router_gate_emb_f16 | 1.81 | 406.22 | 0.1847 |
| MXFP4_MOE-output_q6_k-router_gate_emb_f16 | 1.8 | 395.71 | 0.2094 |
| Q6_K | 1.12 | 488.04 | 0.2332 |
| MXFP4_MOE-output_q6_k-embd_f16 | 1.58 | 430.66 | 0.2437 |
| MXFP4_MOE-Q8 | 1.45 | 451.01 | 0.2805 |
| Q8_0 | 1.45 | 465.34 | 0.2805 |
| MXFP4_MOE-output_mxfp4-embd_q6_K | 1.41 | 530.69 | 0.3201 |
| MXFP4_MOE-output_mxfp4-router_gate_emb_q6_K | 1.36 | 494.96 | 0.36 |
| MXFP4_MOE-output_f16-router_gate_emb_q6_k | 1.37 | 476.72 | 0.4217 |
| MXFP4_MOE-output_q6_K-router_gate_emb_q6_K | 1.36 | 463.56 | 0.458 |
| MXFP4_MOE-Q6_K | 1.41 | 509.22 | 0.4761 |
| Q5_K_M | 0.98 | 465.81 | 0.4844 |
| MXFP4_MOE-output_mxfp4-embd_q5_K | 1.39 | 535.75 | 0.8425 |
| MXFP4_MOE-Q5_K | 1.39 | 512.11 | 0.8705 |
| MXFP4_MOE-output_mxfp4-router_gate_emb_q5_K | 1.31 | 520.24 | 0.9301 |
| MXFP4_MOE-output_mxfp4-router_gate_emb_q4_K | 1.26 | 513.92 | 3.6885 |
| MXFP4_MOE-output_mxfp4-embd_q4_K | 1.38 | 561.89 | 3.6998 |
| MXFP4_MOE-Q4_K | 1.38 | 510.26 | 3.9926 |
| Q4_K_M | 0.84 | 528.5 | 4.9497 |
| MXFP4_MOE-output_q8-embd_mxfp4 | 1.38 | 486.87 | 12.9609 |
| MXFP4_MOE | 0.73 | 555.64 | 23.4457 |
- Bench NGL was 35
- Utilized CUDA
Table - PPL Columns
| model_name | gen | gen_er | code | code_er | math | math_er |
|---|---|---|---|---|---|---|
| F16 | 9.7879 | 0.2271 | 1.7102 | 0.0136 | 7.7678 | 0.1714 |
| MXFP4_MOE-output_mxfp4-router_gate_emb_f16 | 9.8235 | 0.227 | 1.7133 | 0.0136 | 7.7533 | 0.1706 |
| MXFP4_MOE-output_mxfp4-embd_f16 | 9.8282 | 0.2272 | 1.7134 | 0.0136 | 7.7545 | 0.1706 |
| MXFP4_MOE-output_mxfp4-embd_q8 | 9.8152 | 0.2269 | 1.7138 | 0.0136 | 7.7658 | 0.171 |
| MXFP4_MOE-output_mxfp4-router_gate_emb_q8 | 9.8152 | 0.2269 | 1.7138 | 0.0136 | 7.7658 | 0.171 |
| MXFP4_MOE-F16 | 9.7995 | 0.2272 | 1.7115 | 0.0136 | 7.7957 | 0.1722 |
| MXFP4_MOE-output_f16-router_gate_emb_f16 | 9.79 | 0.2269 | 1.7116 | 0.0136 | 7.8028 | 0.1724 |
| MXFP4_MOE-output_q6_k-router_gate_emb_f16 | 9.8028 | 0.2272 | 1.712 | 0.0136 | 7.7966 | 0.1723 |
| Q6_K | 9.873 | 0.2293 | 1.7119 | 0.0135 | 7.6382 | 0.1661 |
| MXFP4_MOE-output_q6_k-embd_f16 | 9.8146 | 0.2276 | 1.7115 | 0.0136 | 7.7975 | 0.1723 |
| MXFP4_MOE-Q8 | 9.8094 | 0.2277 | 1.7124 | 0.0136 | 7.8061 | 0.1725 |
| Q8_0 | 9.8094 | 0.2277 | 1.7124 | 0.0136 | 7.8061 | 0.1725 |
| MXFP4_MOE-output_mxfp4-embd_q6_K | 9.8638 | 0.2283 | 1.7142 | 0.0136 | 7.764 | 0.1707 |
| MXFP4_MOE-output_mxfp4-router_gate_emb_q6_K | 9.8665 | 0.2284 | 1.7143 | 0.0136 | 7.7707 | 0.1709 |
| MXFP4_MOE-output_f16-router_gate_emb_q6_k | 9.8528 | 0.2289 | 1.7127 | 0.0136 | 7.8032 | 0.1721 |
| MXFP4_MOE-output_q6_K-router_gate_emb_q6_K | 9.8545 | 0.2289 | 1.7133 | 0.0136 | 7.8076 | 0.1723 |
| MXFP4_MOE-Q6_K | 9.8548 | 0.2289 | 1.7129 | 0.0136 | 7.8134 | 0.1724 |
| Q5_K_M | 9.9587 | 0.2315 | 1.7208 | 0.0137 | 7.697 | 0.168 |
| MXFP4_MOE-output_mxfp4-embd_q5_K | 9.9347 | 0.2296 | 1.716 | 0.0136 | 7.8213 | 0.1721 |
| MXFP4_MOE-Q5_K | 9.918 | 0.2299 | 1.715 | 0.0136 | 7.8456 | 0.1731 |
| MXFP4_MOE-output_mxfp4-router_gate_emb_q5_K | 9.9328 | 0.2294 | 1.7171 | 0.0136 | 7.8382 | 0.1726 |
| MXFP4_MOE-output_mxfp4-router_gate_emb_q4_K | 10.3958 | 0.2431 | 1.7309 | 0.0139 | 8.0509 | 0.1788 |
| MXFP4_MOE-output_mxfp4-embd_q4_K | 10.3658 | 0.2422 | 1.7291 | 0.0139 | 8.0855 | 0.1807 |
| MXFP4_MOE-Q4_K | 10.3755 | 0.2436 | 1.7277 | 0.0139 | 8.1524 | 0.1832 |
| Q4_K_M | 10.3225 | 0.2426 | 1.7493 | 0.0143 | 8.3194 | 0.187 |
| MXFP4_MOE-output_q8-embd_mxfp4 | 11.8909 | 0.2812 | 1.7662 | 0.0143 | 8.8648 | 0.1974 |
| MXFP4_MOE | 13.7703 | 0.3307 | 1.8673 | 0.0163 | 9.3574 | 0.2049 |
- gen = ppl_general
- gen_er = ppl_general_error
- code = ppl_code
- code_er = ppl_code_error
- math = ppl_math
- math_er = ppl_math_error
Table - Precision Loss Columns
| model_name | loss_general | loss_code | loss_math |
|---|---|---|---|
| F16 | 0 | 0 | 0 |
| MXFP4_MOE-output_mxfp4-router_gate_emb_f16 | 0.3637 | 0.1813 | -0.1867 |
| MXFP4_MOE-output_mxfp4-embd_f16 | 0.4117 | 0.1871 | -0.1712 |
| MXFP4_MOE-output_mxfp4-embd_q8 | 0.2789 | 0.2105 | -0.0257 |
| MXFP4_MOE-output_mxfp4-router_gate_emb_q8 | 0.2789 | 0.2105 | -0.0257 |
| MXFP4_MOE-F16 | 0.1185 | 0.076 | 0.3592 |
| MXFP4_MOE-output_f16-router_gate_emb_f16 | 0.0215 | 0.0819 | 0.4506 |
| MXFP4_MOE-output_q6_k-router_gate_emb_f16 | 0.1522 | 0.1053 | 0.3708 |
| Q6_K | 0.8694 | 0.0994 | -1.6684 |
| MXFP4_MOE-output_q6_k-embd_f16 | 0.2728 | 0.076 | 0.3823 |
| MXFP4_MOE-Q8 | 0.2197 | 0.1286 | 0.4931 |
| Q8_0 | 0.2197 | 0.1286 | 0.4931 |
| MXFP4_MOE-output_mxfp4-embd_q6_K | 0.7754 | 0.2339 | -0.0489 |
| MXFP4_MOE-output_mxfp4-router_gate_emb_q6_K | 0.803 | 0.2397 | 0.0373 |
| MXFP4_MOE-output_f16-router_gate_emb_q6_k | 0.6631 | 0.1462 | 0.4557 |
| MXFP4_MOE-output_q6_K-router_gate_emb_q6_K | 0.6804 | 0.1813 | 0.5124 |
| MXFP4_MOE-Q6_K | 0.6835 | 0.1579 | 0.587 |
| Q5_K_M | 1.745 | 0.6198 | -0.9115 |
| MXFP4_MOE-output_mxfp4-embd_q5_K | 1.4998 | 0.3391 | 0.6887 |
| MXFP4_MOE-Q5_K | 1.3292 | 0.2807 | 1.0016 |
| MXFP4_MOE-output_mxfp4-router_gate_emb_q5_K | 1.4804 | 0.4035 | 0.9063 |
| MXFP4_MOE-output_mxfp4-router_gate_emb_q4_K | 6.2107 | 1.2104 | 3.6445 |
| MXFP4_MOE-output_mxfp4-embd_q4_K | 5.9042 | 1.1051 | 4.09 |
| MXFP4_MOE-Q4_K | 6.0033 | 1.0233 | 4.9512 |
| Q4_K_M | 5.4618 | 2.2863 | 7.1011 |
| MXFP4_MOE-output_q8-embd_mxfp4 | 21.4857 | 3.2745 | 14.1224 |
| MXFP4_MOE | 40.687 | 9.1861 | 20.464 |
- loss_general = precision_loss_general_pct
- loss_code = precision_loss_code_pct
- loss_math = precision_loss_math_pct
- Downloads last month
- 213
4-bit
Model tree for magiccodingman/Granite-4.0-H-1B-Unsloth-MXFP4-Hybrid-GGUF
Base model
ibm-granite/granite-4.0-h-1b-base