Skip to content

pr-set : Inkling 2 decode pins (#411 to #418) and the #386 graph fold - #419

Merged
danielhanchen merged 4 commits into
masterfrom
pinset-inkling2-decode-r4
Nov 23, 2026
Merged

danielhanchen merged 4 commits into
masterfrom
pinset-inkling2-decode-r4

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Adds the eight Inkling 2 decode pins (#411 to #418), the looped-layer MoE cache dedupe (#421), and repins #251.

#386 already carries the two graph-only commits #411 needs (4fff29a, inside 06322ff from #420), so it is not moved here.

pin old new change
#411 (new) 7e633d6 CUDA short convolution chain with its state store and residual in one kernel
#412 (new) 874c88c CUDA tanh-mul-add/sub, router weight normalization and add + rms_norm fusions
#413 (new) 260b1ff CUDA vector flash attention reads the gathered relative-position bias, plus the masked-KV skip
#414 (new) f766457 CUDA depth mix in one kernel (decode-size mixes before Ada keep the separate kernels)
#415 (new) a7c4e14 CUDA MMVF and vector flash attention at 2-8 rows on NVIDIA from Turing on (Hopper excluded)
#416 (new) d72c6be CUDA quantizes a MUL_MAT src1 once for the MUL_MATs that read it
#417 (new) bd47345 CUDA MoE vector kernel at 4 rows per block on Turing to Ada and cc 10.x
#418 (new) 153a686 CUDA concat of non-contiguous sources, one element per thread, cc 10.x and newer
#421 (new) b336a7e MoE expert cache keyed by the shared expert tensor, so looped layers hold one entry per weight; budget split by physical bytes (folds the idea from #410)
#251 827478f 038adc6 --moe-cache-mib auto minimum accounts for the deduped entries

#411 to #418 are each upstream b12602 plus one change (base base/upstream-418fe97b5), every one with a GGML_CUDA_DISABLE_* kill switch; #421 has LLAMA_MOE_CACHE_DEDUPE=0. #412, #413, #414 and #418 are on their review-fix heads. feature-checks.json gains cuda-concat-flat, cuda-blackwell-dc-decode, cuda-moe-vec-rows, cuda-short-conv-fusion, cuda-elem-fusions, cuda-depth-mix-fusion, cuda-rel-bias-fa-fusion, cuda-q8-1-reuse and moe-cache-shared-experts (31 features).

Checks

result
sim b12631, b12635 and the window b12633 to b12644 43 pins merge; pin_contract all intact; merge_checks clean
verify b12635 --cuda CUDA build and test-chat pass; test-backend-ops MUL_MAT 2897, MUL_MAT_ID 1183, PAD 37, GET_ROWS 361
feature_matrix --gpu 31/31 with this feature file

Numbers against #399 (same card, Inkling-2-Mini)

Exactness: every pin except #415 is bit-identical to #399 on B200, T4, L4, A100 and RTX PRO 6000 (llama-perplexity at -c 512, -c 4096, -ub 4 and -ub 1: PPL string equal, mean KLD 0), also with every kill switch set. #415 changes rounding at 2-8 rows only (mean KLD 0.0017 to 0.0037, top-1 about 98%), and is exact with GGML_CUDA_DISABLE_BLACKWELL_DC_DECODE_TUNING=1.

Speed, ratio of medians vs #399 (three ABBA rounds; #399's own spread is 0.0-1.7% except one 4.2% cell):

GPU file pp512 tg128 4 sequences
T4 UD-IQ1_S x1.08 x1.14 x1.19
L4 UD-IQ1_S x1.11 x1.13 x1.21
L4 UD-Q4_K_XL x1.10 x1.10 x1.17
A100 UD-IQ1_S x1.10 x1.26 x1.45
A100 UD-Q4_K_XL x1.08 x1.23 x1.40
A100 UD-Q8_K_XL x1.08 x1.21 x1.27
RTX PRO 6000 UD-IQ1_S x1.15 x1.25 x1.60
RTX PRO 6000 UD-Q4_K_XL x1.18 x1.24 x1.52
RTX PRO 6000 UD-Q8_K_XL x1.16 x1.20 x1.33

B200 (exclusive card, load-gated): tg128 UD-Q8_K_XL 86.3 to 112.0 tok/s (+30%).

MoE cache dedupe (#421), Inkling-2-Mini UD-Q4_K_XL with the experts in host memory and the cache size --moe-cache-mib auto picks for an 8 GB and a 12 GB card (exclusive B200, 3 interleaved repeats): 15.09 to 29.24 tok/s (1.9x) at 8 GB and 26.59 to 51.65 tok/s (1.9x) at 12 GB. Output is unchanged against the cache off (PPL equal, mean KLD 0), including --n-cpu-moe 13 and --cpu-moe at -ub 512.

Not covered: Hopper (the widened gates exclude it), HIP (every new gate is NVIDIA only, so HIP builds behave as before), Metal, and an A100 rerun of the final gated tree (the A100 evidence for the depth mix gate is the one-lever-off run).

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T05:44:04.360485Z 327aa03 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 327aa03ff2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit 6fa79e0 into master Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant