Attention tuple measured end-to-end: (128, 16, 8, 128, qk_norm=False) — 42-layer MiniCPM5-2B runs on XDNA2
What
Bringing up MiniCPM5-2B (llama3 dense, 42 layers, hidden 2048, KV expanded 2→8, head_dim 128, qk_norm=false) requires this attention combination, which is not in recipes/catalogue.py. It was built with OPEN_KERNELS_UNVALIDATED=1 (the documented override) and then ran end-to-end on hardware.
Evidence (Strix Halo, XDNA2, 2026-09-14)
- engine: OpenFlowLM-Next @ main, built on Ubuntu 24.04 (gcc 13), XRT 2.26
- kernels:
open_kernels/export_qwen36_kernels.py --spec minicpm5-2b.json - serving: 42/42 layers resident
- measured (greedy, single stream): prefill ≈ 25.5 t/s, decode ≈ 26.1–26.4 t/s, TTFT ≈ 0.7 s
- outputs: "What is 2+2?" →
4· "Was ist 25*14?" →350· coherent German/English reasoning chains; CPU reference (llama.cpp, same GGUF) agrees
Spec used (open_kernels/recipes/specs/minicpm5-2b.json):
{
"family": "llama3",
"hidden": 2048,
"num_layers": 42,
"layer_types": ["dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense", "dense"],
"vocab": 130560,
"real_vocab": 130560,
"num_heads": 16,
"num_kv_heads": 8,
"head_dim": 128,
"rotary_dim": 128,
"rope_theta": 5000000.0,
"rope_scaling": null,
"qk_norm": false,
"attn_gate": false,
"intermediate": 6144,
"norm_eps": 1e-06,
"quant": "q4_1",
"extra": {"model_type": "llama", "source": "hf_config", "model": "MiniCPM5-2B-NPU2"}
}
Weights: KV-expanded from openbmb/MiniCPM5-2B (2→8 replication — mathematically identical), f16→Q4_1 GGUF→Q4NX (Q4_0 input is a trap, see separate issue), served via oflm serve.
Request
Please add (128, 16, 8, 128, False, False, False) to the attn combination list — or tell me exactly which fixture/compare you'd like run at this configuration and I'll run it and open the PR. (Happy to contribute the spec + model recipe notes too.)
@Cyronius I'm pretty sure this bit is your bailiwick, no?
@D-revv could you open a PR for the spec file please?
PR open: #85 (spec + catalogue point, measured end-to-end as described above).
@D-revv I've got one tiny thing on your PR, but it looks good.
@Cyronius I'm pretty sure this bit is your bailiwick, no?
yeah i meant to get this one working but never did. It's a good add!