fix: resolve rope_theta from rope_parameters in DeepseekV32Bridge#1734
Merged
zhuzilin merged 1 commit intoTHUDM:mainfrom Mar 22, 2026
Merged
fix: resolve rope_theta from rope_parameters in DeepseekV32Bridge#1734zhuzilin merged 1 commit intoTHUDM:mainfrom
zhuzilin merged 1 commit intoTHUDM:mainfrom
Conversation
transformers 5.x RotaryEmbeddingConfigMixin.convert_rope_params_to_dict() consumes rope_theta from __init__ kwargs and stores it inside the rope_parameters dict, never setting self.rope_theta as a top-level attribute. DeepseekV3Bridge._build_config() expects hf_config.rope_theta directly, causing AttributeError during checkpoint conversion. Add __init__ to DeepseekV32Bridge that resolves rope_theta from the rope_parameters dict when it's not available as a top-level attribute. Same fix pattern as GLM4MoELiteBridge in glm4moe_lite.py. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
DeepseekV3Bridge._build_config()expectshf_config.rope_thetaas a top-level attribute, but transformers 5.xRotaryEmbeddingConfigMixinmoves it into therope_parametersdict__init__toDeepseekV32Bridgeto resolverope_thetafromrope_parameterswhen not available as a top-level attribute (no-op on transformers 4.x)GLM4MoELiteBridgeinglm4moe_lite.pyTest plan
config.rope_thetadirectly (fix is no-op)config.rope_parametersdict (fix resolves it)🤖 Generated with Claude Code