Repository navigation
pr-set: repin for upstream b12012 (Inkling, iq1-narrow, MoE prompt kernels, MXFP8), drop pins now upstream - #342
Open
danielhanchen wants to merge 4 commits into
Open
danielhanchen wants to merge 4 commits into
danielhanchen wants to merge 4 commits into
Conversation
…330, #336 and ggml-org#31360 Upstream b12008..b12012 broke six pins: - ggml-org#25731 (Inkling): ggml-org#31073 moved the KV rotation constants to per-layer device buffers and ggml-org#31376 took vocab pre-type 66; repinned to the PR head merged with b12012 (rotation inputs indexed per layer, LLAMA_VOCAB_PRE_TYPE_INKLING = 67). - #61: ggml-org#27512 added GGML_TYPE_F8_E4M3 = 43 on the type-count line; both enums kept. - #264: ggml-org#31373 added RDNA4_M to the MoE tile pick the pin restructured; RDNA4_M added to the pin's branch. - #332: MXFP8 used type 43, now upstream F8_E4M3; MXFP8 moves to the fork-local 63 and gguf reads published files that store it as 43 by their byte size. Based on the new #61 (dsv41-pin-base61e). - #330 (third-party branch): conflicts with the F8_E4M3 lines in ggml-metal-device.m; dropped until its branch carries the fix. - #336: upstream merged it as ggml-org#31376 (in b12012); dropped. ggml-org#31360 is in b12012 (c9daee1); dropped.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
The prebuilt nightly picks the newest upstream tag older than six hours. Today that is b12012 (b12014, b12015 and b12017 age in next). Six pins no longer merge onto it, so the nightly stops at the merge step:
GGML_TYPE_F8_E4M3 = 43on the type-count line.mmq.cu.ggml-metal-device.m.One more pin (the Gemma 4 chat parser fix) is already in b12012.
Change
Each conflict is resolved in its own pin branch with a
Fix merge conflictsmerge of the upstream tag, keeping upstream verbatim and re-applying only the pin's intent:set_input_pos_rel_flat; portinkling.cppto per-layerself_k_rot[il]; Inkling pre-type moves to 67 (internal, not stored in GGUF)GGML_TYPE_COUNT = 67GGML_CUDA_CC_IS_RDNA4_Mto its RDNA branchgguf.cppand gguf-py read a legacy type-43 tensor as MXFP8 when its on-disk span (measured from sorted data offsets) fits only MXFP8; when the span fits both (small tensors at alignment above 32) the rest of the file decides (another type-43 tensor that fits only one type, a type-63 tensor,general.file_type42), and a file that still cannot be told apart is refused instead of guessed.general.alignmentis cast to a Python int, so NumPy 2 no longer overflowsMetal NVFP4: the third-party pin is replaced by the same change carried on b12012 in an unslothai branch (pin 347, a01140e, original author's commit kept); upstream's F8_E4M3 exclusions stay verbatim.
Dropped: the PLaMo-3 pin and the Gemma 4 parser pin (both in upstream).
feature-checks.jsondrops theiruncheckedentries.Tests
llama_pinset.py simon b12012, b12014, b12015 and b12017: all 25 pins merge,pin_contractreports all 25 intact,merge_checksclean. On current master the same six pins are refused on all four tags.CPU verify on b12012 and b12017: gate build (
llama test-llama-archs test-backend-ops test-mtmd-impl) ok,feature_matrix16 / 16 on CPU. Assembled b12012 tree: test-llama-archs 147 / 147, test-chat passed.CUDA compile (sm_89) of the full assembled b12012 tree including the server: clean.
Inkling numeric gate on an RTX PRO 6000 (sm_120), UD-IQ1_S, wikitext-2
-c 512 --chunks 20: old pin, new pin and new pin merged with upstream master all give PPL 39.727228, mean KLD 0.000000, top-1 100%.MXFP8: headers of the published DeepSeek-V4.1 UD-Q3_K_XL / UD-Q4_K_XL / UD-Q8_K_XL shard 8 and the MXFP8 engram file read the type-43 tensor as MXFP8; synthetic old-format MXFP8, new-format MXFP8 and real F8_E4M3 files read back with the right type and identical dequantized values.
CUDA on an L4 (sm_89, nvcc 13.0), assembled b12012 tree vs plain b12012 on the same machine:
test-backend-opsMUL_MAT 2627 / 2627 (base 2490 / 2490), MUL_MAT_ID 1027 / 1027 (931 / 931), PAD 37 / 37, GET_ROWS 349 / 349 (216 / 216), full suite 19605 / 19605 (19209 / 19209), 0 failures on either side; every case that passes on b12012 passes with the pins. All 13MUL_MAT_ID_FUSIONcases pass on both, including prompt-sized ones (128 experts, 8 used, n 512).feature_matrix --gpu: all 16 features demonstrated on GPU.CUDA on 2x T4 (sm_75, nvcc 12.8), same two trees:
test-backend-opsMUL_MAT 2627 / 2627, MUL_MAT_ID 1027 / 1027, PAD 37 / 37, GET_ROWS 349 / 349, MUL_MAT_ID_FUSION 13 / 13, full suite 19605 / 19605 (base 19209 / 19209), 0 failures and no base-passing case lost.feature_matrix --gpu16 / 16.Two-GPU perplexity on the T4s (wikitext-2,
-c 512 --chunks 20 -ngl 99, every cell repeated bitwise): Qwen3-0.6B Q8_0 and Q4_K_M and granite-3.1-3b-a800m Q4_K_M (MoE) give identical PPL on both trees for one GPU and for-sm layeracross both GPUs, and-sm layerequals one GPU.-sm rowno longer exists on CUDA in b12012 (both trees refuse it the same way).ROCm on gfx1151 (Radeon 8060S), Linux and Windows 11, HIP builds of both trees:
test-backend-opson ROCm0 MUL_MAT 2627 / 2627, MUL_MAT_ID 1027 / 1027, PAD 37 / 37, GET_ROWS 349 / 349, MUL_MAT_ID_FUSION 13 / 13, full suite 19581 / 19581 (base 19185 / 19185), 0 failures and no base-passing case lost on either OS.feature_matrix --gpu16 / 16 on Linux (Windows needs the.exefix in a separate PR).After the MXFP8 reader fix and the Metal NVFP4 re-add (26 pins):
llama_pinset.py simon b12012 and on every tag from b12024 (the current six-hour-aged base) to b12032 merges all pins,pin_contractintact,merge_checksclean; CPU verify on b12012, b12024 and b12032 gate build ok,feature_matrix16 / 16.Legacy MXFP8 reader: 23 synthetic cases (alignment 32 / 64, reversed header order, explicit
general.alignment, old-format MXFP8, type 63, real F8_E4M3, evidence and refusal paths) pass in Python on NumPy 1.26 and 2.5 and in C++ with identical dequantized values (the previous pin passes 15 / 23 and 10 / 23). Headers of all 68 published DeepSeek-V4.1 GGUF files: only UD-Q3_K_XL / UD-Q4_K_XL / UD-Q8_K_XL shard 8 carry type 43, all at the default alignment, and both readers still read them as MXFP8.Not covered
-sm tensorsplit on 2x T4, the MoE model's PPL differs between the trees (8.9745 vs 8.9192, inside the +/- 0.35 error bar; dense models match bitwise). Not bisected.xcrun metalor run on Apple hardware (g++ syntax check of its host C++ files only). Vulkan, Windows CUDA and ARM builds were not run.