CoolFace
Modelpublic

magiccodingman/Granite-4.0-H-1B-Unsloth-MXFP4-Hybrid-GGUF

sourceHugging Faceapache-2.0updated 10mo agoView on Hugging Face
0likes67downloads
Model Card

DEPRECIATED!

This model was surpassed by the new MagicQuant hybrids. The collection can be found here:

https://huggingface.co/collections/magiccodingman/magic-quant

Use the new version. This shown MXFP4 hybrid is no longer viable in comparison, nor really useable. The data collected is good for understanding and research, but it's not as good for real use.

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 ExampleMeaning
MXFP4_MOEPure MXFP4 pipeline
MXFP4_MOE-Q8Embedding/output in Q8_0
MXFP4_MOE-F16Embedding/output in F16
output_mxfp4-embd_q8Output → MXFP4, Embedding → Q8
output_mxfp4-router_gate_emb_q5_KOutput → MXFP4, Emb/Router/Gate → Q5_K
MXFP4_MOE-Q6_KBoth embedding + output in Q6_K
Q8_0, Q6_K, Q4_K_MPure 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-bench with 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 with llama-perplexity at 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_namesize_reductiontps_change
MXFP4MOE-outputmxfp4-routergateemb_f1634.07%11.48%
MXFP4MOE-outputmxfp4-embd_f1642.12%13.14%
MXFP4MOE-outputmxfp4-embd_q846.89%29.89%
MXFP4_MOE-output_mxfp4-router_gate_emb_q846.89%35.83%
MXFP4_MOE-F1641.76%1.79%
MXFP4MOE-outputf16-routergateemb_f1633.7%8.05%
MXFP4MOE-outputq6k-routergateembf1634.07%5.26%
Q6_K58.97%29.82%
MXFP4MOE-outputq6k-embdf1642.12%14.56%
MXFP4_MOE-Q846.89%19.97%
Q8_046.89%23.78%
MXFP4MOE-outputmxfp4-embdq6K48.35%41.16%
MXFP4MOE-outputmxfp4-routergateembq6K50.18%31.66%
MXFP4MOE-outputf16-routergateembq6k49.82%26.81%
MXFP4MOE-outputq6K-routergateembq6_K50.18%23.31%
MXFP4MOE-Q6K48.35%35.45%
Q5KM64.1%23.91%
MXFP4MOE-outputmxfp4-embdq5K49.08%42.51%
MXFP4MOE-Q5K49.08%36.22%
MXFP4MOE-outputmxfp4-routergateembq5K52.01%38.38%
MXFP4MOE-outputmxfp4-routergateembq4K53.85%36.7%
MXFP4MOE-outputmxfp4-embdq4K49.45%49.46%
MXFP4MOE-Q4K49.45%35.73%
Q4KM69.23%40.58%
MXFP4MOE-outputq8-embd_mxfp449.45%29.51%
MXFP4_MOE73.26%47.8%
  • —All percentages compared against the selected family F16 baseline.

Table - File Size + TPS + Avg Precision Loss

model_namefile_size_gbbench_tpsavg_prec_loss
F162.73375.940
MXFP4MOE-outputmxfp4-routergateemb_f161.8419.090.1194
MXFP4MOE-outputmxfp4-embd_f161.58425.330.1425
MXFP4MOE-outputmxfp4-embd_q81.45488.290.1546
MXFP4MOE-outputmxfp4-routergateemb_q81.45510.630.1546
MXFP4_MOE-F161.59382.670.1846
MXFP4MOE-outputf16-routergateemb_f161.81406.220.1847
MXFP4MOE-outputq6k-routergateembf161.8395.710.2094
Q6_K1.12488.040.2332
MXFP4MOE-outputq6k-embdf161.58430.660.2437
MXFP4_MOE-Q81.45451.010.2805
Q8_01.45465.340.2805
MXFP4MOE-outputmxfp4-embdq6K1.41530.690.3201
MXFP4MOE-outputmxfp4-routergateembq6K1.36494.960.36
MXFP4MOE-outputf16-routergateembq6k1.37476.720.4217
MXFP4MOE-outputq6K-routergateembq6_K1.36463.560.458
MXFP4MOE-Q6K1.41509.220.4761
Q5KM0.98465.810.4844
MXFP4MOE-outputmxfp4-embdq5K1.39535.750.8425
MXFP4MOE-Q5K1.39512.110.8705
MXFP4MOE-outputmxfp4-routergateembq5K1.31520.240.9301
MXFP4MOE-outputmxfp4-routergateembq4K1.26513.923.6885
MXFP4MOE-outputmxfp4-embdq4K1.38561.893.6998
MXFP4MOE-Q4K1.38510.263.9926
Q4KM0.84528.54.9497
MXFP4MOE-outputq8-embd_mxfp41.38486.8712.9609
MXFP4_MOE0.73555.6423.4457
  • —Bench NGL was 35
  • —Utilized CUDA

Table - PPL Columns

model_namegengen_ercodecode_ermathmath_er
F169.78790.22711.71020.01367.76780.1714
MXFP4MOE-outputmxfp4-routergateemb_f169.82350.2271.71330.01367.75330.1706
MXFP4MOE-outputmxfp4-embd_f169.82820.22721.71340.01367.75450.1706
MXFP4MOE-outputmxfp4-embd_q89.81520.22691.71380.01367.76580.171
MXFP4MOE-outputmxfp4-routergateemb_q89.81520.22691.71380.01367.76580.171
MXFP4_MOE-F169.79950.22721.71150.01367.79570.1722
MXFP4MOE-outputf16-routergateemb_f169.790.22691.71160.01367.80280.1724
MXFP4MOE-outputq6k-routergateembf169.80280.22721.7120.01367.79660.1723
Q6_K9.8730.22931.71190.01357.63820.1661
MXFP4MOE-outputq6k-embdf169.81460.22761.71150.01367.79750.1723
MXFP4_MOE-Q89.80940.22771.71240.01367.80610.1725
Q8_09.80940.22771.71240.01367.80610.1725
MXFP4MOE-outputmxfp4-embdq6K9.86380.22831.71420.01367.7640.1707
MXFP4MOE-outputmxfp4-routergateembq6K9.86650.22841.71430.01367.77070.1709
MXFP4MOE-outputf16-routergateembq6k9.85280.22891.71270.01367.80320.1721
MXFP4MOE-outputq6K-routergateembq6_K9.85450.22891.71330.01367.80760.1723
MXFP4MOE-Q6K9.85480.22891.71290.01367.81340.1724
Q5KM9.95870.23151.72080.01377.6970.168
MXFP4MOE-outputmxfp4-embdq5K9.93470.22961.7160.01367.82130.1721
MXFP4MOE-Q5K9.9180.22991.7150.01367.84560.1731
MXFP4MOE-outputmxfp4-routergateembq5K9.93280.22941.71710.01367.83820.1726
MXFP4MOE-outputmxfp4-routergateembq4K10.39580.24311.73090.01398.05090.1788
MXFP4MOE-outputmxfp4-embdq4K10.36580.24221.72910.01398.08550.1807
MXFP4MOE-Q4K10.37550.24361.72770.01398.15240.1832
Q4KM10.32250.24261.74930.01438.31940.187
MXFP4MOE-outputq8-embd_mxfp411.89090.28121.76620.01438.86480.1974
MXFP4_MOE13.77030.33071.86730.01639.35740.2049
  • —gen = ppl_general
  • —gener = pplgeneral_error
  • —code = ppl_code
  • —codeer = pplcode_error
  • —math = ppl_math
  • —mather = pplmath_error

Table - Precision Loss Columns

model_nameloss_generalloss_codeloss_math
F16000
MXFP4MOE-outputmxfp4-routergateemb_f160.36370.1813-0.1867
MXFP4MOE-outputmxfp4-embd_f160.41170.1871-0.1712
MXFP4MOE-outputmxfp4-embd_q80.27890.2105-0.0257
MXFP4MOE-outputmxfp4-routergateemb_q80.27890.2105-0.0257
MXFP4_MOE-F160.11850.0760.3592
MXFP4MOE-outputf16-routergateemb_f160.02150.08190.4506
MXFP4MOE-outputq6k-routergateembf160.15220.10530.3708
Q6_K0.86940.0994-1.6684
MXFP4MOE-outputq6k-embdf160.27280.0760.3823
MXFP4_MOE-Q80.21970.12860.4931
Q8_00.21970.12860.4931
MXFP4MOE-outputmxfp4-embdq6K0.77540.2339-0.0489
MXFP4MOE-outputmxfp4-routergateembq6K0.8030.23970.0373
MXFP4MOE-outputf16-routergateembq6k0.66310.14620.4557
MXFP4MOE-outputq6K-routergateembq6_K0.68040.18130.5124
MXFP4MOE-Q6K0.68350.15790.587
Q5KM1.7450.6198-0.9115
MXFP4MOE-outputmxfp4-embdq5K1.49980.33910.6887
MXFP4MOE-Q5K1.32920.28071.0016
MXFP4MOE-outputmxfp4-routergateembq5K1.48040.40350.9063
MXFP4MOE-outputmxfp4-routergateembq4K6.21071.21043.6445
MXFP4MOE-outputmxfp4-embdq4K5.90421.10514.09
MXFP4MOE-Q4K6.00331.02334.9512
Q4KM5.46182.28637.1011
MXFP4MOE-outputq8-embd_mxfp421.48573.274514.1224
MXFP4_MOE40.6879.186120.464
  • —lossgeneral = precisionlossgeneralpct
  • —losscode = precisionlosscodepct
  • —lossmath = precisionlossmathpct