Downloads · 30 days
49
27% of all-time downloads
quark75/granite-4.2-3b-Q4_K_M-imatrix-GGUF
granite-4.2-3b-Q4_K_M-imatrix-GGUF is a text generation model from quark75. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
A 4-bit GGUF of ibm-granite/granite-4.2-3b, quantized with an importance matrix built from a mixed prose and tool-calling calibration corpus. Of the three quantizations we made of this model, it's the closest to the o…
Downloads · 30 days
49
27% of all-time downloads
All-time downloads
184
Public
Repo size
2.2 GB
Likes
0
Public
Click a slice to open those files.
.gguf2.2 GB · 100%
From the Hugging Face model README
A 4-bit GGUF of ibm-granite/granite-4.2-3b, quantized with an importance matrix built from a mixed prose and tool-calling calibration corpus. Of the three quantizations we made of this model, it's the closest to the original and the smallest.
| File | Quant | Size | Bits per weight | Mean KLD vs f16 | Same top token |
|---|---|---|---|---|---|
granite-4.2-3b-Q4_K_M.gguf | Q4_K_M + imatrix | 2.1 GB | 4.90 | 0.062012 | 87.88% |
"Same top token" is llama.cpp's Same top p statistic: the share of positions where the
quantized model's most likely next token matches the f16 model's.
convert_hf_to_gguf.py (mainline llama.cpp), bf16 safetensors → f16 GGUF.
Granite's scaling parameters (attention_scale, embedding_scale, residual_scale,
logits_scale) are supported natively.llama-imatrix over
bartowski's v6 calibration dataset:
prose plus tool-calling conversations, rendered through Granite's own chat template.
573 chunks of 512 tokens.llama-quantize --imatrix <imatrix> <f16.gguf> <out.gguf> Q4_K_M.llama-perplexity --kl-divergence against the f16 model's saved logits, on the
wikitext-2-raw test split.The calibration corpus matters. This build beat our best GPTQ build (0.110 KLD) by about 44%. Plain wikitext-2 is a common default for imatrix calibration, but a corpus in the model's own chat format with tool use covers more of what the model actually does.
llama-server -m granite-4.2-3b-Q4_K_M.gguf
Any llama.cpp-based runtime that supports Granite 4 should load it. We haven't benchmarked this file's inference speed yet. The speed figures in the GPTQ card are for vLLM and don't apply here.
| Variant | Format | Size | Mean KLD vs unquantized ↓ | Perplexity (wikitext-2) | Eval harness |
|---|---|---|---|---|---|
| Original (bf16) | safetensors (2 shards) | 6.8 GB | — | 19.94 | transformers |
| Q4_K_M + imatrix | GGUF, 4.90 BPW | 2.1 GB | 0.062 | not measured | llama.cpp |
| GPTQ W4A16 (int4) | compressed-tensors | 2.7 GB | 0.110 | 21.11 (+5.88%) | transformers |
| MXFP4A16 | compressed-tensors | 2.6 GB | 0.1405 | 21.27 (+6.68%) | transformers |
| MXFP4 GGUF (same weights, transcoded) | GGUF | 2.5 GB | 0.138 | +7.1% vs f16 | llama.cpp |
Lower KLD means the quantized model's next-token distribution stays closer to the original's.
How to read this table. The GGUF rows come from a different harness than the others.
llama-perplexity --kl-divergence against the f16 GGUF's logits, on the wikitext-2-raw
test split.Both measure mean KL divergence on the same corpus, but the code isn't identical. Compare rows within the same harness directly; across harnesses, treat gaps as directional, not decimal-precise. The MXFP4 weights were measured both ways (0.1405 in transformers, 0.138 in llama.cpp), which gives a feel for how closely the two harnesses agree.
Hardware: all measurements are on an AMD Radeon Pro V620 (RDNA2, gfx1030, 32 GB) with ROCm 7.14. Nothing here was tested on NVIDIA or other AMD GPUs.
render_corpus.py.