Skip to content

pr-set : pin #464, repin #378 #385 #386 #431 #448 for upstream b12859..b12927 - #465

Closed
danielhanchen wants to merge 4 commits into
masterfrom
pinset/nvfp4-default-scale
Closed

danielhanchen wants to merge 4 commits into
masterfrom
pinset/nvfp4-default-scale

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Nov 29, 2026 •

Copy link
Copy Markdown
Member

Related to unslothai/unsloth#20277

The prebuilt is the aged upstream b#### tag plus the pins in pr-set.json, merged in order (git merge, then additive_merge.py for pure add/add conflicts only). Pins are our ggml-org PRs plus small unslothai PRs; when upstream absorbs a pin, the pin is deleted.

This PR pins #464 and repins five pins so the nightly can move past b12858 again:

pin upstream change that broke it fix new head
#378 (Inkling 1) ggml-org#33178 aa631e031e (b12859): FA bias API cleanup (set_bias / set_sinks, bias state from src[6] / src[7], kq_b dropped from build_attn_mha(), dense bias cast to the mask type) git merge --no-ff aa631e031e, upstream side verbatim, the pin's banded-op guard kept on the renamed bias / bias_idxs. Plus: the Inkling dense relative bias stays F32 on the non-FA path (upstream's F16 mask cast moved Inkling-Small by KLD 0.196), and the 8-wide MoE router soft_max gets a -inf column on CUDA / ROCm / MUSA / Vulkan so it stays on the block kernel (ggml-org#33187 in b12878 and ggml-org#33197 in b12916 moved rows of up to 8 to a one-thread-per-row kernel that rounds differently; Inkling-Small IQ1_S turned that into KLD 0.17). The same ggml-org#33187 gave Metal a short-row kernel too; Metal used its float4 kernel for the 8-wide row before, so on Metal the row is padded to 12 (a multiple of 4) to stay on it, while the other backends keep the single -inf column 4a8e8b9472
#385 (Inkling 2 attention chunking) same, b12859 git merge --no-ff aa631e031e, chunking kept on the renamed bias / bias_idxs and the new build_attn_iswa_impl() arguments 81d72fc723
#386 (Inkling 2 banded attention) same, b12859 merges the new #378 and #385; the F16 fast path inside dense_bias_mask goes with the lambda upstream removed f475657fd6
#431 (Metal banded) carries #386 re-merges the new #386 (clean), own diff unchanged d257c98356
#448 (Q8_0 x F32 mat-vec) ggml-org#32610 94f17f659f (b12922): ggml_cuda_should_use_mmq_few() gains a dst argument git merge --no-ff b12922, upstream's call plus the pin's block; own diff byte-identical 8139c2dbe7

The 2026-12-01 nightly failed in Resolve tag (#378 refused on b12900). Every pin branch moved by fast-forward; #378 / #385 / #386 / #431 now sit on base/upstream-aa631e031, #448 on base/upstream-94f17f659. feature-checks.json gains inkling2-expert-scales (MUL_MAT_ID with weight scales, scale_gran=[12]), the op the Inkling 2 experts need on every GPU backend (Vulkan refused it from b12818 until ggml-org#29791 in b12881).

Evidence

The #378 Metal padding (4a8e8b9472) only changes the graph when the layer sits on a Metal device; on CUDA, ROCm, MUSA, Vulkan and CPU the graph is the same as at 9dd84c2ea1, so the numbers below carry over. Rerun with it: audit 47/47, sim 47/47 on b12921 through b12927, verify --cuda on b12921 (all steps, feature_matrix --gpu 33/33). The Metal path itself is not run here (no Apple GPU); it rests on the b12858 Metal dispatch picking kernel_soft_max_4 with 32 threads for widths 8 and 12 alike, where the extra -inf lanes add exact zeros.

All local, B200 + CPU. The aged tag now is b12921, the newest is b12927 (published 14:07Z, so it is the base a run after 20:07Z picks).

Inkling against the shipped b12858-mix

Reference = master's pins on b12858 (the same ggml tree as b12858-mix-86f7dbf), built with the same flags as the candidates. wikitext-2 -c 512, KLD against the reference's own logits, its A/A run as the floor.

check b12921 b12927
Inkling-Small UD-IQ1_S, full GPU, 20 chunks PPL 39.362699 equal, KLD 0, top-1 100% same
Inkling-Small UD-IQ1_S, -b 512 -ub 3 (banded path) PPL 28.334256 equal, KLD 0, top-1 100% same
Inkling-2-Mini UD-IQ1_S, full GPU PPL 8.460142 equal, KLD 0, top-1 = A/A same
Inkling-2-Mini UD-Q4_K_XL (NVFP4 experts), full GPU PPL 7.670393 equal, KLD 0, top-1 = A/A, graph splits 2 = 2 same
Mini UD-Q4_K_XL --cpu-moe PPL 7.670393 equal, KLD 0 same
Mini UD-Q4_K_XL -ngl 12 KLD 0.0018, PPL 7.684 vs 7.669 (see below) same
CPU only (no GPU visible): test-llama-archs -a inkling / inkling2, Mini UD-IQ1_S pass; PPL 7.442365 equal, KLD 0 same
CPU only: Inkling-Small UD-IQ1_S loads and runs PPL 11.65 (1 chunk, -c 128) same
Mini UD-Q4_K_XL with every .scale removed (#464) loads, KLD 0 / top-1 100% against the same file with 1.0 scales; the reference fails with "requires a weight scale" same
DSpark (Mini UD-Q4_K_XL + dspark-Inkling-2-Mini-Q8_0, -ngl 99 -ngld 99, ABAB, 4 prompts x 256 tokens) accepted / drafted identical per prompt (greedy 49.4%, T=1 40.4%); best-of-2 t/s 1.02x / 1.01x identical counts; 1.05x / 1.02x
Vulkan (NVIDIA B200, Linux), Mini UD-Q4_K_XL -ngl 99 Vulkan0 16332 MiB, CPU_Mapped 469 MiB (experts on the GPU), 2 graph splits; test-backend-ops Vulkan0 SOFT_MAX 241/241, MUL_MAT_ID 1387/1387, CONCAT 275/275, FILL 10/10

DSpark t/s was measured on a shared GPU, so it only rules out a large slowdown.

-ngl 12 is the one number that moves, by the same amount on both tags. Bisected: b12859 with this set is bit-identical to the reference, b12886 is not, and b12886 with only the softmax.cu part of ggml-org#33187 (019951ec44, b12878) reverted is bit-identical again. So it is the upstream short-row soft_max rounding on a partially offloaded Inkling 2 graph. PPL stays within 0.2% of the same build fully on the GPU, and the full GPU and --cpu-moe paths do not move. It is not patched here.

On Vulkan, from b12881 the base carries ggml-org#29791, so the Inkling 2 experts with weight scales load on the Vulkan device again. On b12858-mix they fell back to the CPU (Vulkan0 5397 MiB instead of 16332, 90 graph splits).

#464 (from the earlier version of this PR)

On b12887, tiny NVFP4 qwen35 files: without #464 a GGUF with no .scale tensors (or only some) fails to load with tensor 'blk.0.attn_qkv.weight' of type nvfp4 requires a weight scale. With #464 it loads with a single warning, and the logits are identical to the same file with explicit 1.0 scales (CPU, and CUDA T4 on one GPU and with -sm layer across two). Files that already have scales give the same hashes with and without #464.

Next upstream break (not in this PR)

Upstream master after b12927 (not yet tagged) refuses #378, #386 and #431 again, in ggml/include/ggml-rpc.h (ggml-org#32532, RPC protocol 11.0.0), ggml/src/ggml-cuda/ggml-cuda.cu (ggml-org#33190, BF16 supports_op) and src/llama-arch.* / tests/test-llama-archs.cpp (ggml-org#33485, new arch). They need the same kind of merge once a tag carrying them is published.

Not covered here

HIP, Metal, Windows, macOS and ARM run only in the nightly. Vulkan was run on NVIDIA only, not AMD hardware. DSpark speed comes from a shared GPU.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 29, 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-12-02T18:37:58.388396Z 9afeb93 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 6c681be657

ℹ️ 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 self-assigned this Nov 29, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 8717d28459

ℹ️ 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".

#378, #385, #386 and #431 merge upstream aa631e0 (FA bias API cleanup,
b12859); #378 also keeps the Inkling router soft_max off the new short-row
kernels (CUDA b12878, Vulkan b12916). #448 merges b12922 (few-row MMQ for
NVFP4 adds a dst argument to ggml_cuda_should_use_mmq_few).

feature-checks: add inkling2-expert-scales (MUL_MAT_ID with weight scales).
@danielhanchen danielhanchen changed the title pr-set : pin #464, default a missing NVFP4 / FP8 weight scale to 1.0 pr-set : pin #464, repin #378 #385 #386 #431 #448 for upstream b12859..b12927 Dec 2, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: a0d5e05a69

ℹ️ 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".

1 similar comment
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: a0d5e05a69

ℹ️ 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

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 9afeb93136

ℹ️ 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

Copy link
Copy Markdown
Member Author

Superseded by #473, which carries every change in this PR on top of it and has merged.

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