mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #303] PLE conv1d weights are F32 in some GGUFs but read as raw fp16 bits - garbled output, all parity tests pass #145
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#145
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 @zipenghao on GitHub (Sep 30, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/303
Version: v0.1.24 (official release tarball)
Engine build: compiled from source, sm_70
Hardware: 2x Tesla V100-SXM2-16GB (sm_70, PCIe Gen3 x16, no NVLink), Xeon E5-2680 v4, 62 GiB RAM, driver 580.178.04, CUDA 12.8
Model artifact:
Qwen3.8-Flash-Next-UD-IQ3_XXS(Unsloth, 3 shards)Symptom
Generated text is letter/symbol garbage, but everything else looks healthy:
Root cause
blk.1.ple_conv1d.weightis stored as F32 in this artifact, but is handed to theF16 convolution kernel as raw bits:
The kernel reads it with
__ushort_as_half, so every weight becomes two garbagehalf-precision numbers. The conv output comes out ~500x too large, residual #1 is
poisoned, and layers 2-47 then all build on a wrong residual.
Embedding, the hyper-connection mixer, the 48-layer backbone and
lm_headare allcorrect - which is exactly why the failure looks like an output-only problem.
Why the bundled tests do not catch it
ple_parityand friends use synthetic F16 weights, so they never see that the fileis actually F32. Also, the v0.1.24 release tarball ships neither
ref/model.pynorbench/micro/*_parity.cpp, so "all tests green" is not evidence of numericalcorrectness. (Related:
iq_parityreports 10 failures out of the box because therelease has no Q3_K fixture - so the test suite is not self-checking here either.)
Evidence
--tokens 760("The"), first output ideval-callback--tokens 760,6511,314,9338,369, first output idtoken_embd,lm_head, all 248320 logits--layer-split 24 --split-device 0)The per-layer / PLE-intermediate dump used to localise this is in the linked
repository (patch 04). With it the diagnosis was immediate: only
convwas ~1000xtoo large, everything else lined up.
Suggested fix
Decide by the pack's
WeightKindand byte count at load time instead of trusting thepointer cast. For F32: copy back to the host, re-round element-wise through
f16_from_f32, upload. A startup line such asPLE conv1d re-rounded F32 -> fp16 (40960 taps)makes it verifiable.Note for anyone porting this: check
kindanddst_bytesin the pack index, not theelement type in the kernel header comment - that comment was written for a different
artifact and was the source of the confusion.
Questions
artifacts whose
ple_conv1d.weightis F32? I could not test the official shards.log line, and I can add a parity case that uses an F32 weight so it cannot regress.
Full write-up, all four patches and the reproduction steps:
https://github.com/zipenghao/strata-v100-sm70
Note: this report and the linked patches were drafted with AI assistance; every
finding above was reproduced and verified manually on the hardware listed.
@Niko1221 commented on GitHub (Oct 1, 2026):
Fixed in 0.1.31: iq_pack stores an F32 ple_conv1d as F16, and the engine refuses an old pack with a wide conv1d ("repack") instead of reading garbage. Please repack with 0.1.31. Thanks for the precise report!
@zipenghao commented on GitHub (Oct 10, 2026):
Confirmed fixed on 0.1.34. Repacked with 0.1.34's
iq_pack.pyand the narrowing is visible in the packer's own output:Numerical check against the values I reported for 0.1.24 + a local fix, with the patch now removed entirely:
--tokens 760,6511,314,9338,369, first ideval-callbackArtifact: Unsloth
Qwen3.8-Flash-Next-UD-IQ3_XXS, 3 shards, packed with--compat-bf16. Hardware 2x V100-SXM2-16GB (sm_70), Xeon E5-2680 v4, 62 GiB, driver 580.178.04.No further action needed on our side - the patch that carried this fix is retired. Thank you for taking the report; the "refuse the old pack and say repack" behaviour is exactly what made this safe to upgrade to.