-
Notifications
You must be signed in to change notification settings - Fork 383
model: add openPangu-2.0-Flash (92B-A6B) with MLA-latent cache, DSA/SWA, mHC, and multi-head MTP #2065
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
model: add openPangu-2.0-Flash (92B-A6B) with MLA-latent cache, DSA/SWA, mHC, and multi-head MTP #2065
Changes from 52 commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
df5b3e1
openpangu: Stage-1 converter probe for openPangu-2.0-Flash
joelfarthing 3115436
openpangu: Stage-2 arch scaffold (LLM_ARCH_OPENPANGU) — loadable, com…
joelfarthing 00a9fd3
openpangu: fix compresskv_conv dim (kv_lora_rank, not +rope); pin att…
joelfarthing 2629f4e
openpangu: end-to-end runtime — build_openpangu graph runs, generates…
joelfarthing 94587ef
openpangu: COHERENT generation — NEOX rope, Sinkhorn orientation, MoM…
joelfarthing ab75a88
openpangu: MoME conv-state cache — decode steps get real t-1/t-2 taps
joelfarthing 588f57c
openpangu: NextN/MTP speculative decoding — 1.7-1.8x TG on CPU
joelfarthing 42c5b22
server: include draft_n/draft_n_accepted in /completion timings
joelfarthing 7a8f018
openpangu: position-indexed MoME conv-state ring — rollback-safe spec…
joelfarthing cf4f841
openpangu: DSA lightning indexer + SWA schedule — long-context correc…
joelfarthing 93a7508
openpangu: MLA-latent KV cache — attention absorbed into the 512-late…
joelfarthing 13561e7
openpangu: fence unsupported serving modes, truth-pass comments, drop…
joelfarthing 35abf3d
openpangu: assert kv_head == first batch position at graph build
joelfarthing 0d81882
openpangu: cont h_pre before the mHC broadcast mul (CUDA binbcast mis…
joelfarthing 4c8db57
openpangu: keep DSA zero-trick sources finite (CUDA clamp propagates …
joelfarthing 00a929e
openpangu: f16 latent KV cache option (explicit -ctk/-ctv f16 halves …
joelfarthing 9d39e55
openpangu: enable graph reuse
joelfarthing 2a815a5
openpangu: wire multi-head MTP drafting
joelfarthing 3ad3f54
openpangu: add MTP heads override
joelfarthing b72ce11
openpangu: keep MTP update logits last
joelfarthing b4d3516
openpangu: scope MTP warmup heads
joelfarthing d33b9b0
speculative: apply per-request MTP heads before warmup
joelfarthing 29276e8
openpangu: fix multi-head MTP warmup computing on unwritten inputs
joelfarthing e78d3a3
speculative: default MTP drafting to a single head
joelfarthing dee12aa
speculative: fence MTP head upshift over a warmed prefix
joelfarthing 987b496
openpangu: skip dead MTP chain compute and stall-free carry readback
joelfarthing 412af2d
openpangu: stop emitting fused kv_b tensor
joelfarthing 6941d2e
openpangu: default latent cache to f16
joelfarthing 179af66
openpangu: refuse unsupported latent cache types
joelfarthing fa59190
Window OpenPangu SWA cache reads
joelfarthing 046b217
Gather OpenPangu DSA decode reads
joelfarthing 86e6de6
Chunk OpenPangu indexer prefill scoring
joelfarthing e3db97a
Chunk OpenPangu prefill attention
joelfarthing 4f79446
Gather OpenPangu sparse prefill attention
joelfarthing 5b5de3d
Drop OpenPangu value cache
joelfarthing 6cf67b7
Add OpenPangu indexer cache type flag
joelfarthing 0d3bf26
Add OpenPangu q8_0 latent cache type
joelfarthing 9b447e1
Remove OpenPangu debug trace env knobs and redundant DSA_TOPK override
joelfarthing 4ad1a86
Subchunk OpenPangu DSA prefill gather to fit CUDA grid limit
joelfarthing d4e5ab2
openpangu: fix scheduler node budget for chunked DSA prefill; drop un…
joelfarthing 0e2f462
openpangu: restore DeepSeek converter kv_b; drop trace env + dead cod…
joelfarthing 9286b50
openpangu: chat-parser support (reasoning split + thinking toggle)
joelfarthing 8104d31
openpangu: use ggml_cast for latent dequant reads
joelfarthing 4d2d104
openpangu: narrow SWA reuse-key fields to 32-bit
joelfarthing 950b91d
openpangu: precompute param_sink derived tensors at load
joelfarthing 29d73f9
openpangu: replace conv position-ring with ggml_ssm_conv + spec-rollb…
joelfarthing 618b662
openpangu: single ggml_concat copy for the latent cache store
joelfarthing 8f5d8ad
openpangu: reuse the shared kr_l indexer cache instead of a separate …
joelfarthing ceff34c
openpangu: discard pos-0 graphs from reuse; retire stale conv-state c…
joelfarthing 9f11d1a
openpangu: drop the _explicit cache-type plumbing; validate unconditi…
joelfarthing a45a71e
openpangu: keep MTP draft decodes position-contiguous under speculation
joelfarthing 1938252
openpangu: remove stale ring limits and fix MTP graph reuse
joelfarthing 0dc3bc7
cli: preserve speculative carry on fallback
joelfarthing adb171e
Merge branch 'main' into filament/openpangu
joelfarthing File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I vaguely remember reading about a model with 3 MTP layers where 1 MTP layer per drafted token is used, but the layer used depends on the draft index (i.e., 1st MTP layer is used for 1st draft token. 2nd layer for 2nd draft token, 3rd layer for all subsequent draft tokens). Any chance it is like this also here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's exactly the scheme. In the draft loop (common/speculative.cpp:2984):
llama_set_mtp_step_idx(ctx, std::min(i, n_mtp_heads - 1));
For draft token i: head 0 → token 0, head 1 → token 1, head 2 → token 2, and min(i, n_heads-1) pins the last head for every subsequent token.
With current
heads=1default, only head 0 (layer 46) is ever used, thoughheads=3is an option. I have some ideas about how to make heads 2 and 3 into a win. But for this question, yes, standard DeepSeek/GLM-style multi-token-prediction with per-position heads saturating at the last.