Skip to content

MiniCPM5-2B: spec + validated attn tuple (128, 16, 8, 128, qk_norm=False) - #85

Merged
Atomic-Germ merged 4 commits into
Atomic-Germ:mainfrom
D-revv:minicpm5-2b-spec
Sep 15, 2026
Merged

Atomic-Germ merged 4 commits into
Atomic-Germ:mainfrom
D-revv:minicpm5-2b-spec

Conversation

@D-revv

@D-revv D-revv commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Closes #83.

Adds the MiniCPM5-2B spec plus the attention tuple it needs, measured end-to-end on hardware (Strix Halo, XDNA2, fw 1.1.2.65, in-tree amdxdna 0.7, XRT 2.26):

  • model: openbmb/MiniCPM5-2B (llama arch, 42 layers, hidden 2048, intermediate 6144, 16 q-heads; KV expanded 2→8 by replication — mathematically identical, no QK-norm)
  • kernels: open_kernels/export_qwen36_kernels.py --spec open_kernels/recipes/specs/minicpm5-2b.json42/42 layers resident
  • serving: prefill ≈ 25.5 t/s · decode ≈ 26.1–26.4 t/s · TTFT 0.7 s (single stream)
  • outputs (greedy): "What is 2+2?" → 4 · "Was ist 25*14?" → 350 · coherent German/English reasoning; CPU reference (llama.cpp, same GGUF) agrees
  • weights: f16 → Q4_1 GGUF → Q4NX (Q4_0 input is currently broken — see build: one way to build the xclbins, and one contract between the pro… #10 in the converter repo)

The first kernel build used OPEN_KERNELS_UNVALIDATED=1 per the documented override; this PR adds the catalogue point so future builds validate normally.

catalogue.py: adds (128, 16, 8, 128, False, False, False) next to the Qwen3-1.7B point (same geometry, qk_norm off).

Happy to run any additional fixture/fp64 comparison you'd like.

Comment thread open_kernels/recipes/catalogue.py Outdated
@Cyronius

Copy link
Copy Markdown
Collaborator

yeah I didn't ever do anything with it, so this PR is very welcome! It's a good model.

@Atomic-Germ
Atomic-Germ merged commit 2f3c558 into Atomic-Germ:main Sep 15, 2026
2 checks passed
Cyronius pushed a commit to Cyronius/OpenFlowLM-Next that referenced this pull request Sep 16, 2026
main added MiniCPM5-2B's attention tuple to the catalogue (Atomic-Germ#85) while this
branch widened every tuple in that list by one field, so the two landed on the
same lines. MiniCPM5's tuple carries over as-is with qkv_bias False, in the
position main gave it.

The new recipe spec that came with it, minicpm5-2b.json, wants a line in
test_no_shipped_models_hash_moved's frozen list. The eleven hashes that predate
this branch are unchanged, which is the answer to what that test asks: qkv_bias
is a kernel-template knob, not a ModelSpec field, so it moved none of them.

602 pass.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request specs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Attention tuple measured end-to-end: (128, 16, 8, 128, qk_norm=False) — 42-layer MiniCPM5-2B runs on XDNA2

3 participants