MiniCPM5-2B hybrid K-quant GGUF: Q4_K gate/up + Q5_K down
Two standard GGUF quantizations of
openbmb/MiniCPM5-2B built as a
quality-first alternative to the RCO release. No custom tensor types, no
patched runtime: these files load in stock llama.cpp (verified by loading
and generating with clean v0.7.0 CPU and ROCm builds).
The recipe keeps the two sensitive parts of the model at higher precision:
- gate_proj / up_proj: Q4_K
- down_proj: Q5_K
- attention: Q5_K (compact) or Q6_K (quality)
- token_embd: Q5_K (compact) or Q6_K (quality)
- output: Q8_0
- norms: F32
Both variants use a 32x512 imatrix built from Python stdlib code plus decoded WikiText-2/C4 train text.
Results
Same harness as the RCO release: WikiText-2 test (--chunks 16 -c 512) and a
held-out Python stdlib corpus (code2, --chunks 32 -c 512, 8176 scored
tokens, KL against F16 donor logits). The 128 KB column is the first 131,041
bytes of code2 (a proxy for Sharp's 128 KB corpus).
| Model | Size | Wiki PPL ↓ | code2 mean KL ↓ | code2 p99 ↓ | code2 top-1 ↑ | 128 KB p99 ↓ | 128 KB top-1 ↑ |
|---|---|---|---|---|---|---|---|
| Sharp Q4_K_XL | 1.596 GB | 14.1703 | 0.117031 | 1.236705 | 89.314% | 1.167117 | 89.060% |
| hybrid compact | 1.704 GB | 14.2088 | 0.093637 | 1.047941 | 90.527% | 0.972205 | 90.196% |
| hybrid quality | 1.792 GB | 14.0549 | 0.080348 | 0.905976 | 91.262% | 0.888669 | 91.075% |
| Sharp Q5_K_XL | 1.886 GB | 14.0500 | 0.035117 | 0.405327 | 93.983% | 0.370611 | 93.881% |
| Sharp Q6_K_XL | 2.198 GB | 13.8951 | 0.010015 | 0.107180 | 96.483% | 0.110036 | 96.484% |
Both hybrids beat Sharp Q4_K_XL on code2 p99 and top-1, at the cost of
108–196 MB more disk. hybrid compact is the best size/quality balance;
hybrid quality is for maximum quality under 1.8 GB.
Neither model beats Sharp Q5_K_XL or Q6_K_XL. Q6 remains in a different class: 2.198 GB, p99 0.107, top-1 96.48%.
[!NOTE] These are not RCO models. The MLP is standard K-quant; the RCO repository is the place to look for the experimental RCO format.
Which file?
| hybrid compact | hybrid quality | |
|---|---|---|
| Size | 1.704 GB | 1.792 GB |
| Attention | Q5_K | Q6_K |
| Token embedding | Q5_K | Q6_K |
| gate/up | Q4_K | Q4_K |
| down_proj | Q5_K | Q5_K |
| output | Q8_0 | Q8_0 |
| code2 p99 | 1.048 | 0.906 |
| code2 top-1 | 90.53% | 91.26% |
| Role | Best size/quality | Best quality under 1.8 GB |
Choose compact unless you specifically need the extra ~0.7 point top-1 and ~0.14 p99; the 88 MB difference is small either way.
Quick start
No patch needed:
llama-cli \
-m minicpm5-2b-hybrid-q4kup-q5kdown-q5attn-q8out-q5tok.gguf \
-ngl 99 -c 512 -n 128 -t 8 --jinja \
-p "Write a Python function that returns the n-th Fibonacci number."
-ngl 99 assumes the whole model fits in VRAM. The compact file is about
1.59 GiB; the quality file is about 1.67 GiB.
Quantization recipe
gate_proj: q4_K
up_proj: q4_K
down_proj: q5_K
attention: q5_K (compact) / q6_K (quality)
token: q5_K (compact) / q6_K (quality)
output: q8_0
norms: f32
imatrix: metadata/minicpm5_2b_imatrix.gguf (32x512, code + Wiki/C4)
Exact tensor type lists:
metadata/hybrid_compact_types.txtmetadata/hybrid_quality_types.txt
The models were quantized from the F16 GGUF with llama-quantize --tensor-type-file ... --imatrix ... Q6_K; the fallback type is only used for
tensors not listed in the type file.
Files
minicpm5-2b-hybrid-q4kup-q5kdown-q5attn-q8out-q5tok.gguf
minicpm5-2b-hybrid-q4kup-q5kdown-q6attn-q8out-q6tok.gguf
metadata/hybrid_compact_types.txt
metadata/hybrid_quality_types.txt
metadata/minicpm5_2b_imatrix.gguf
metadata/eval_results.json
docs/REPRODUCE.md
docs/RAPOR.tr.md
SHA256SUMS
Limitations
- Not a Sharp replacement at every size. Q4_K_XL is smaller (1.596 GB); Q5 and Q6 are still ahead in quality at larger sizes.
- Hybrid, not a uniform recipe.
down_projis deliberately Q5_K while gate/up are Q4_K. - Imatrix-sensitive. The results use the included 32x512 imatrix; a different calibration set can shift the tail.
- Code2 is held out. Do not tune on code2.
- Standard llama.cpp v0.7.0 works. Older builds may not know the MiniCPM5 tokenizer even though the tensor types are standard; use v0.7.0 or newer.
License
Base model: Apache-2.0. Quantization metadata and documentation: Apache-2.0. llama.cpp: MIT.