fix(lora): honor --attention-backend in the bridge LoRA path - #1915
Merged
Conversation
yushengsu-thu
requested review from
Shi-Dong,
Zhichenzzz,
fzyzcjy,
maocheng23 and
yueming-yuan
as code owners
July 28, 2026 18:31
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
yushengsu-thu
commented
Jul 28, 2026
yushengsu-thu
force-pushed
the
fix/lora-attention-backend
branch
from
July 28, 2026 20:49
5ec7a7f to
80df936
Compare
_setup_lora_model_via_bridge copied ~20 args onto the provider but not attention_backend, unlike model_provider.py. Megatron maps that field to NVTE_FLASH_ATTN/NVTE_FUSED_ATTN/NVTE_UNFUSED_ATTN, so the dropped value let TE pick a backend the caller had opted out of, which is what breaks test_lora_qwen2.5_0.5B.py in the fused-attention backward. Honoring it makes one previously inert request take effect: gpt-oss runs with --softmax-type learnable, where TE 2.17 disables FlashAttention outright and reports no fused kernel, leaving UnfusedDotProductAttention as the only option. Its CI test asked for fused, so ask for auto instead.
yushengsu-thu
force-pushed
the
fix/lora-attention-backend
branch
from
July 28, 2026 20:57
80df936 to
5201c5d
Compare
Collaborator
|
let's wait for CI pass and then merge |
yushengsu-thu
enabled auto-merge (squash)
July 28, 2026 22:07
yushengsu-thu
disabled auto-merge
July 28, 2026 22:55
yushengsu-thu
enabled auto-merge (squash)
July 28, 2026 22:55
Collaborator
Author
|
@guapisolo passed |
Zhichenzzz
approved these changes
Jul 28, 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.
LoRA runs silently ignore
--attention-backend:_setup_lora_model_via_bridgenever copies it onto the provider, unlikemodel_provider.py:78. Megatron maps that field to theNVTE_*_ATTNvars, so the dropped value let TE pick a backend the caller had opted out of — which is whytest_lora_qwen2.5_0.5B.pydies in the fused-attention backward onmainnightly.Honoring it makes one previously inert request take effect. gpt-oss runs with
--softmax-type learnable, where TE 2.17 disables FlashAttention outright and reports no fused kernel, leavingUnfusedDotProductAttentionas the only option; its CI test asked forfused, so it now asks forauto.