mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3328] NVFP4 pack: deterministic token soup on an AVX2-only CPU (Core Ultra 9 285K) + RTX PRO 6000 (sm_120) — every expert path, every documented fallback #1352
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#1352
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @vince-wang-vs on GitHub (Oct 20, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3328
Environment
strata.exeinengine\, BUILD.json present)jpezzulli/OrcaRouter-Qwen3.8-Flash-Next-Uncensored-ModelOpt-NVFP4, converted with the documentedpipeline (
tools/nvfp4_convert.pywith the pinned llama.cpp, thentools/iq_pack.py), run per docs/NVFP4.mdwith
--ple-ggufpointing at Unsloth's UD-IQ4_XS shard 2 and the stock MTP runtime.Symptom
Greedy decoding (temperature 0) produces deterministic token soup starting from the first generated token,
on every configuration tried:
--expert-cache auto(24,000 GPU-resident)Guardty (全球的 gr deviltyty grad tslint...STRATA_PREFILL_NVFP4=fp16w4a8for the full 100 tokensSTRATA_PREFILL_NVFP4=w4a4w4a8andfp16for the full 100 tokens--expert-cache 1(all-CPU pool, AVX2 rows)Guardty ( blotyty gr格selcapcb off...STRATA_NO_NVFP4_256=1--mtpdropped)Env delivery was verified with a sentinel: with
STRATA_ADAPT_OVERLAP=1in the same configenvblock, thestartup log flips from
adaptive overlap: off (...)to the enabled wording, so config-borneSTRATA_*variablesdo reach this engine build (both switches are also present as strings in
strata.exe0.1.45).The
w4a8/w4a4/fp16result is the sharpest observation: three numerically very different product paths(int8 MMQ, Blackwell FP4 MMA, dequantize + cuBLAS FP16 — the doc's own numbers put
w4a4~5x further fromreference than
w4a8) produce byte-identical 100-token argmax streams. Whatever is broken sits upstream ofwhere these modes diverge — i.e. in a stage all three share (host-side blob preparation, expert selection, or the
non-expert skeleton as fed by this model) — not in any one kernel's arithmetic.
Yardstick (
tools/quant_quality.py, 4,995 teacher-forced positions vs the same engine servingUnsloth UD-IQ4_XS of the base model): top-1 agreement 0.00 %, mean KL 3.27, PPL 434,672
(reference model: PPL 4.17). The same engine run of the UD-IQ4_XS model on this machine is completely normal
(207 tok/s decode, sane output, yardstick reference numbers above) — so the shared skeleton, KV, sampling and
serving paths are fine; the failure is specific to the NVFP4 expert path.
What I verified about the data (all green)
tools/nvfp4_verify_gguf.py --model <ckpt> --gguf orca-nvfp4.gguf --ple-gguf <UD-IQ4_XS shard2> --samples 300→ RESULT: OK (experts bitwise + scale order, dense policy
F32 x580, BF16 x484, Q8_0 x302, NVFP4 x144, F16 x1,PLE cosine 0.9967 worst 0.9958 over 64 rows vs the borrowed table).
ffn_down_exps.input_scale(varies per expert) matches the checkpoint's per-expertinput_scaleidentity 512/512 on blk.0 — no string-sort vs router-row mismatch;transforms applied (V-reorder for qkv/z/conv, ssm_out column perm, index_qk split, +1 zero-centred gammas):
Q8_0 tensors rel_rms ≤ 0.006, BF16/F32 exact; the flagged ones from my first pass were my own missing
+1(
got == ref + 1to the last bit, i.e. the converter is right);experts.binbyte-identical to the GGUF expert slices incl. the 16-byte{s_gate, s_up, s_down, 0}tails;ple_artifact_consts()(ngram.cpp);Why I suspect the host-side blob preparation on AVX2-only machines
no AVX-512. The log says:
this CPU has no AVX-512: the expert kernels run on AVX-2.The binary also carries
STRATA_FORCE_AVX2, which suggests the AVX2 path is normally exercised on AVX-512hosts via that switch rather than being the daily driver on a no-AVX-512 machine.
two different consumers of a common, wrongly-prepared input — but both the GPU cache fill and the CPU pool
read the same
experts.bin.nvfp4_cpu_parity,mmq_nvfp4_parity,nvfp4_expert_gpu_parity) compare kernels fed thesame input bytes; a selection/packing bug upstream of the row kernels (wrong slice, wrong tail-scale
association, wrong nibble/sub-scale order) would pass all of them while poisoning every consumer. The
STRATA_NO_NVFP4_256fallback producing bit-identical output to the AVX2 rows is consistent with the doc's"bit-equal to ggml-cpu" design and therefore only tells us the row arithmetic is faithful to whatever bytes
it is given.
STRATA_PREFILL_NVFP4=fp16(dequantize + cuBLAS) producing the same opening asw4a8points at the blobcontents rather than the products: two very different kernel paths, one wrong result, deterministic.
What would help
scales) for one expert, so I can diff them against
tools/nvfp4_verify.py's dequant of the same blob;to row-level parity;
results are
nvfp4_cpu_parityrow counts, not full-model runs).Happy to run any build/test you push to the repo — I just can't compile locally (no CUDA toolchain on this box).
@github-actions[bot] commented on GitHub (Oct 20, 2026):
Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:
Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment
/reopen.Details: CONTRIBUTING.md
@Niko1221 commented on GitHub (Oct 21, 2026):
Thank you, this is one of the most careful reports we have had.
Your reasoning holds: three very different product paths give the identical stream, so the problem is upstream of them. We cannot reproduce it yet: we have no box with sm_120 and a CPU without AVX-512. Two things that would narrow it:
We will look at the host-side blob preparation as you suggest. The AVX2-only path has been validated for row parity, not for a full model run on a CPU without AVX-512, so you may be the first.
@RickoDean commented on GitHub (Oct 25, 2026):
Same boat here. Dual Xeons E5 worked but I keep getting these aVx2 error too on 0.2.4 64gb two 12gb rtx. A 3060 & a 2060
@github-actions[bot] commented on GitHub (Oct 25, 2026):
Closing this issue because it still did not follow the format after 5 days. That is housekeeping, not a rejection.
To bring it back: fix the title (area prefix) and the missing parts, then comment
/reopen. A check runs and reopens it, or tells you what is still missing. See CONTRIBUTING.md.