fix(model_provider): add attention_backend and attention_softmax_in_fp32 to provider#2155
Open
lyzustc wants to merge 1 commit into
Open
fix(model_provider): add attention_backend and attention_softmax_in_fp32 to provider#2155lyzustc wants to merge 1 commit into
lyzustc wants to merge 1 commit into
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.
Forward
attention_backendandattention_softmax_in_fp32to the bridge model providerWhen
--megatron-to-hf-mode bridgeis used, the model provider is built byAutoBridgeand only a subset of args are manually copied onto it. This meantattention_backendandattention_softmax_in_fp32were silently dropped, so bridge mode ignored the user's choices and fell back to the bridge defaults — diverging from the default (non-bridge) path, where these are forwarded automatically viacore_transformer_config_from_args. This change copies both values from args onto the provider alongside the existing parallelism overrides, and does so beforeprovider.finalize()so finalize-time invariants (e.g.apply_query_key_layer_scalingforcingattention_softmax_in_fp32=True) still hold. The fix is scoped entirely to the bridge branch and does not affect any other code path.