MiniCPM5-2B RCO GGUF (v2): code16, all-MLP4, down_proj-Q5
Curated mixed-precision quantization of
openbmb/MiniCPM5-2B, packed as
GGUF. The RCO tensors keep bit-exact RCO codes; the MLP weights are not
dequantized and re-quantized through BF16.
This release supersedes the earlier experimental
minicpm5-2b-rco-attn4-q6walls repository. It keeps only the variants that are
useful as a size/quality trade-off.
[!IMPORTANT]
code16,allmlp4, anddownq5contain non-standard GGML types RCO3 (44) and/or RCO4 (45). Stock llama.cpp cannot load them. Use the patched v0.7.0 runtime inruntime/or applyruntime/llama.cpp-v0.7.0-rco-minicpm5.patch.
downq5uses Q5_K fordown_proj, so that tensor is standard K-quant; itsgate_proj/up_projMLP tensors are still bit-exact RCO4.
Which file?
| Variant | Size | WikiText-2 PPL ↓ | code2 p99 KL ↓ | code2 top-1 ↑ | MLP recipe | Role |
|---|---|---|---|---|---|---|
code16 |
1.431 GB | 14.9480 | 3.716 | 78.82% | 66 x RCO3 + 228 x RCO4 | Smallest |
allmlp4 |
1.677 GB | 14.3008 | 2.555 | 83.14% | 126 x RCO4, no RCO3 | Balanced |
downq5 |
1.759 GB | 14.0746 | 1.953 | 86.09% | 84 x RCO4 + 42 x Q5_K down | Best RCO-lineage |
allmlp4 removes every 3-bit MLP tensor. It is slightly smaller than the old
mixed2a file and much better on held-out code. downq5 then upgrades all 42
down_proj tensors to Q5_K with the imatrix, which is the largest single
quality jump in this release.
For comparison, the old mixed2a was 1.693 GB with code2 p99 3.507 and
top-1 81.20%; allmlp4 is smaller and better. The old attn4 and
mixed2a files remain available in the archived repository, but are not part
of this curated release.
[!NOTE] Sharp Q4_K_XL is still ahead on code tail: 1.596 GB, p99 1.237, top-1 89.31% on the same harness. RCO is a research format, not a Sharp replacement. See the companion hybrid K-quant repository if maximum quality under 1.8 GB is the goal.
Model summary
| Item | code16 | allmlp4 | downq5 |
|---|---|---|---|
| Base model | openbmb/MiniCPM5-2B |
same | same |
| Architecture | LlamaForCausalLM, 42 layers | same | same |
| Parameters | 2.52 B | same | same |
| Linear parameters | 1.982 B | same | same |
| Attention | RCO3/4 | 168 x Q6_K | 168 x Q6_K |
| MLP gate/up | RCO3/4 | 84 x RCO4 | 84 x RCO4 |
| MLP down | RCO3/4 | 42 x RCO4 | 42 x Q5_K |
| Walls | Q6_K (2) | Q6_K token + Q8_0 output | Q6_K token + Q8_0 output |
| Norms | F32 (85) | F32 (85) | F32 (85) |
| Total tensors | 381 | 381 | 381 |
| RCO tensors | 294 | 126 | 84 |
Evaluation
All numbers below use the same harness and the same held-out corpus:
- WikiText-2 test,
llama-perplexity -c 512 --chunks 16. - Held-out Python stdlib code (
code2),-c 512 --chunks 32, 8176 scored tokens, KL against F16 donor logits.code2was not used for calibration. - 128 KB Sharp-style proxy: the first 131,041 bytes of the same held-out code corpus, 64 chunks.
| Variant | Size | Wiki PPL | code2 mean KL | code2 p99 | code2 top-1 | 128 KB p99 | 128 KB top-1 |
|---|---|---|---|---|---|---|---|
code16 |
1.431 GB | 14.9480 | 0.451279 | 3.716013 | 78.824% | 3.486164 | 78.641% |
allmlp4 |
1.677 GB | 14.3008 | — | 2.554672 | 83.137% | 2.618498 | 83.090% |
downq5 |
1.759 GB | 14.0746 | 0.197163 | 1.952683 | 86.091% | 1.952128 | 85.957% |
| Sharp Q4_K_XL | 1.596 GB | 14.1703 | 0.117031 | 1.236705 | 89.314% | 1.167117 | 89.060% |
downq5 is the best RCO-lineage model in this repository. It still trails
Sharp Q4_K_XL on code, but it is better than Sharp Q4_K_XL on WikiText-2 PPL.
Quantization recipe
- code16: RCO GPTQ/FastOBQ database, 128-weight RCO blocks, group size 128, per-layer 3/4-bit assignment from a 16x512 code search. Attention is RCO, walls are Q6_K.
- allmlp4: same RCO database, but all 126 MLP tensors are RCO4; attention is exported as F16 and quantized to Q6_K with a 32x512 imatrix; token is Q6_K; output is Q8_0.
- downq5: same as
allmlp4, exceptdown_projis exported as F16 and quantized to Q5_K with the same imatrix. Gate/up remain RCO4.
The RCO block layout is 128 weights per block, BF16 scale d, BF16 zero-point
z, and reconstructed weights y = d * (q - z). See
docs/QUANTIZATION.md for the exact type files and
commands.
Runtime
The RCO tensors require a llama.cpp v0.7.0 build with the patch from
runtime/ applied. Stock v0.7.0 rejects the files; see
runtime/README.md for the exact steps and the verified
build commands.
./build-rocm/bin/llama-cli \
-m minicpm5-2b-rco-downq5-q6attn-q8out-q6tok.gguf \
-ngl 99 -c 512 -n 64 -t 8 --jinja \
-p "Write a Python function that reverses a linked list."
downq5 contains 84 RCO4 tensors and 42 Q5_K tensors; allmlp4 contains 126
RCO4 tensors; code16 contains 66 RCO3 + 228 RCO4 tensors.
Speed on the patched v0.7.0 ROCm build (gfx1200, 8 threads, llama-bench -p 32 -n 8 -r 2): pp32 1211.53 ± 17.77 t/s, tg8 115.45 ± 15.96 t/s.
Files
minicpm5-2b-rco-code16-q6walls.gguf
minicpm5-2b-rco-allmlp4-q6attn-q8out-q6tok.gguf
minicpm5-2b-rco-downq5-q6attn-q8out-q6tok.gguf
metadata/assign_code16.json
metadata/assign_allmlp4.json
metadata/downq5_types.txt
metadata/layer_bitwidths_code16.csv
metadata/layer_bitwidths_allmlp4.csv
metadata/minicpm5_2b_imatrix.gguf
metadata/final_summary.json
docs/QUANTIZATION.md
docs/USAGE.md
docs/RAPOR.tr.md
runtime/llama.cpp-v0.7.0-rco-minicpm5.patch
runtime/README.md
SHA256SUMS
Limitations
- Experimental format. RCO3/RCO4 are not upstream GGML types; use the patch, not a random llama.cpp build.
- ROCm tuning. The GPU path is tuned for gfx1200 (RX 9060 XT, 16 GB). Other GPUs should work but may need different chunking/thread settings.
- Lossy. These are 3/4-bit / Q5_K quantizations; use the BF16 base model when exact outputs are required.
- Code2 is held out. Do not tune on code2. Use a separate calibration split for further experiments.
- Not Sharp-class on code. Sharp Q4_K_XL remains better on code tail at similar size. The hybrid K-quant repository is the better quality choice if RCO compatibility is not required.
License
The base model is Apache-2.0. The quantization metadata and documentation in this repository are released under Apache-2.0. llama.cpp and the RCO patch are MIT-licensed.