model : glm-dsa load DSA indexer tensors as optional#24770
Merged
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
CISC
approved these changes
Jun 18, 2026
CISC
left a comment
Member
There was a problem hiding this comment.
Update the OP to comply with our contributing guidelines please.
GLM-5.2 ships the DSA "lightning indexer" on only a subset of layers (the "full" layers; others omit it), but the GLM_DSA loader created the five indexer tensors on every layer as required, so loading any GLM-5.2 GGUF failed with e.g. `missing tensor 'blk.3.indexer.k_norm.weight'`. GLM_DSA's graph is llama_model_deepseek2::graph (plain MLA) and does not use the indexer tensors (indexer runtime not yet implemented), so they are loaded-but-unused. Marking them TENSOR_NOT_REQUIRED lets layers without an indexer load as nullptr and the model runs as full MLA attention. DeepSeek-V3.2 (uniform indexer on all layers) is unaffected.
46891f5 to
03f0da8
Compare
Contributor
Author
|
Thanks for the review! Applied:
|
Member
Please use our Pull Request Template in your OP. |
Contributor
Author
|
Updated the OP to use the PR template, with the AI-usage disclosure filled in. |
Member
Thank you. |
CISC
approved these changes
Jun 19, 2026
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.
Overview
Loading any GLM-5.2 GGUF (
GlmMoeDsaForCausalLM/GLM_DSA) fails withmissing tensor 'blk.3.indexer.k_norm.weight'. GLM-5.2 ships the DSA lightning indexer on only a subset of layers, butllama_model_glm_dsa::load_arch_tensorscreated the fiveindexer_*tensors on every layer as required.GLM_DSAusesllama_model_deepseek2::graph(plain MLA) and never references the indexer tensors (the DSA indexer runtime isn't implemented yet), so they are loaded-but-unused. Marking themTENSOR_NOT_REQUIREDlets layers without an indexer load asnullptr; the model runs as full MLA attention. DeepSeek-V3.2 (uniform indexer on every layer) is unaffected.Additional information
Complements the conversion support in #19460. Verified by loading and generating from a GLM-5.2 GGUF on Metal (previously failed at load).
Requirements
TENSOR_NOT_REQUIREDchange, and drafted this description; verified by building and running a GLM-5.2 GGUF. Given the project's policy on predominantly-AI-generated PRs, I leave it to the maintainers whether this qualifies as acceptable assistive use or should be reworked/declined.