Repository navigation
deps(defuser): require 0.0.31 for GLM-4.x router tuple - #4056
Merged
Merged
Conversation
Defuser 0.0.31 fixes the GLM-4.5/4.6/4.7 and GLM-4.7-Flash replacement MoE blocks, which passed the Transformers 5.22 router tuple (router_logits, topk_weights, topk_indices) into route_tokens_to_experts() and crashed on .sigmoid(). Raise the floor to defuser>=0.0.31 and remove the local gptqmodel/utils/defuser_compat.py shim now that the fix is upstream. Update the Tenstorrent manifest pin, version-gate tests, and the Transformers 5.22 compatibility docs. Depends on ModelCloud/Defuser#72 and the 0.0.31 release.
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
Follow-up to #4055 (issue #4040, section F): the authoritative GLM-4.x router fix has moved upstream to Defuser. This PR raises the
defuserfloor and removes the temporary GPT-QModel shim.Depends on ModelCloud/Defuser#72 and the
0.0.31release. Draft until that release is on the index, because CI installsdefuser>=0.0.31fromrequirements.txt.Changes
requirements.txtdefuser>=0.0.30->defuser>=0.0.31requirements/tenstorrent-py312.txtdefuser==0.0.30->defuser==0.0.31gptqmodel/models/loader.pyDEFUSER_MIN_VERSION = "0.0.31"; drop the shim callgptqmodel/utils/hf_load.pygptqmodel/utils/defuser_compat.pytests/test_defuser_glm4_router_compat.pytests/test_defuser_version_check.py0.0.30is now below the floor;0.0.31is supportedDefuser 0.0.31 unwraps
(router_logits, topk_weights, topk_indices)to the raw logits insideroute_tokens_to_experts()and keeps its own grouped top-k selection, so the routing math is byte-identical to the tensor path. GPT-QModel no longer needs to inspectforwardsource or wrap the method.Validation
tests/test_convert_model.py-> 54 passed; new tuple/tensor equivalence and full defused-model forward tests coverglm4_moeandglm4_moe_lite.tests/test_defuser_version_check.py tests/test_require_pkgs.py-> 14 passed.ruff checkon every changed Python file -> All checks passed.DEFUSER_MIN_VERSION,defuser_version_too_old("0.0.30"), anddefuser_version_too_old("0.0.31")verified from the loader.Release sequencing
0.0.31.defuser>=0.0.31.