Repository navigation
fix(gguf): shape.rs byte-size table covers the IQ/TQ ggml types (#3601) - #3654
Closed
alfredodeza wants to merge 2 commits into
Closed
alfredodeza wants to merge 2 commits into
alfredodeza wants to merge 2 commits into
Conversation
apr inspect (RosettaStone -> GgufReader::get_tensor_raw) refused any tensor
carrying an IQ-family or ternary ggml dtype ("Unsupported dtype N for raw
extraction"), even though aprender-serve's GGML_TYPES table (#3432) already
has the correct, vetted block/byte sizes for these ids. Real Unsloth "UD-*"
dynamic quants mix IQ4_XS/IQ2_XXS/etc. into otherwise-K-quant GGUFs, so this
crashed apr inspect on real downloads (repro: Qwen3.5-4B-UD-Q4_K_XL.gguf,
dtype 23 = IQ4_XS).
Adds the missing ids (16-23, 29, 34, 35) to shape.rs's byte_size match, using
the same sizes as ggml_type_table.rs, plus a regression test pinning all of
them via a synthetic single-tensor GGUF per id.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
alfredodeza
enabled auto-merge
September 21, 2026 05:37
alfredodeza
disabled auto-merge
September 21, 2026 06:25
Contributor
Author
|
§13.11 rung 1 — quorum shadow verdict Shadow mode: this records a verdict and merges nothing. A refusal |
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.
Summary
Closes #3601.
apr inspect(viaRosettaStone::inspect→GgufReader::get_tensor_raw)refused any tensor carrying an IQ-family or ternary ggml dtype with
Unsupported dtype N for raw extraction, even thoughaprender-serve'sGGML_TYPEStable (#3432) already has correct, vetted block/byte sizes forthese ids. Real Unsloth
UD-*dynamic quants mixIQ4_XS/IQ2_XXS/etc.into otherwise-K-quant GGUFs, so real downloads crashed
apr inspect(repro:
Qwen3.5-4B-UD-Q4_K_XL.gguf, dtype 23 = IQ4_XS).Change
crates/aprender-core/src/format/gguf/shape.rs: add the missing ggml ids(16-23 IQ2_XXS..IQ4_XS, 29 IQ1_M, 34/35 TQ1_0/TQ2_0) to
get_tensor_raw'sbyte_sizematch, using the sameblck_size/type_sizepairs asaprender-serve/src/gguf/ggml_type_table.rs'sGGML_TYPESso the twotables agree.
crates/aprender-core/src/format/gguf/builder.rs: regression testtest_get_tensor_raw_sizes_every_iq_and_tq_idbuilds a syntheticsingle-tensor GGUF per new id and asserts
get_tensor_rawreturns theexact byte count instead of refusing.
This is a pre-#3421/Phase-2 leaf fix (same shape as #3432):
aprender-corecan't depend on
aprender-serve, and the unifiedTRAITScrate #3430proposes doesn't exist yet, so this duplicates the vetted sizes locally.
When Phase 2 lands, this call site becomes one more to migrate.
Test plan
cargo test -p aprender-core --lib format::gguf— 380 passedcargo clippy -p aprender-core --lib -- -D warnings— cleanapr inspect ~/Downloads/Qwen3.5-4B-UD-Q4_K_XL.ggufnow succeeds (previouslyerror: ... Unsupported dtype 23 for raw extraction)🤖 Generated with Claude Code