Repository navigation
Decode BF16 weights and score merged MoE expert tensors - #144
Merged
WestWaters merged 1 commit intoOct 6, 2026
Merged
Conversation
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.
The imatrix probe cast stored BF16 bytes to floats instead of decoding the weights. Decode BF16 correctly and handle merged MoE tensors with separate input-channel importance for each expert.
Record MoE routers separately and require them to retain their source precision. Unknown tensor families, invalid shapes and non-finite costs still stop the probe.
22 tests pass using real GGUF files and direct cost calculations. On Qwen3-30B-A3B, 26 sampled matrices containing 66,060,288 values decode exactly against the original safetensors. A small HF-versus-GGUF prediction check passed preselected limits in all three domains.
Includes public dataset revisions, row indices and hashes for reproduction. Expanded calibration reduced partial-expert warnings from 36 to 28, but coverage is still incomplete. These scores estimate rounding error; they are not measured quality gains or a completed allocation-versus-uniform comparison.
Results and limits:
notes/imatrix-probe-gb10.md.I used AI assistance and reviewed and tested the changes.