Repository navigation
fix(transformers): keep FSDP vision paths active for mixed batches - #374
Merged
kevssim merged 1 commit intoNov 12, 2026
Merged
Conversation
Collaborator
|
twinkle 里出现了 swift 的东西。 multimodal_graph_adapter、uniform_multimodal_graph、install_zero_hooks 都是 swift 的名字,twinkle 自己并不认识它们。最好是swift去引用twinkle。 建议把置零 hook 下沉到 twinkle: |
werwrewe
force-pushed
the
fix/fsdp-mixed-modality
branch
from
November 11, 2026 07:49
40ef8ad to
1009649
Compare
Contributor
Author
|
定义公共占位图标记,根据 model_arch['aligner'] 在模型 wrap 前安装 hook。标记在最外层 forward 读取,仅对占位图特征置零并保留计算图。 |
kevssim
approved these changes
Nov 12, 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.
PR type
PR information
图文混合训练中,纯文本微批会跳过视觉模块,导致各rank的FSDP通信顺序不一致,训练卡住。
本次接通已有视觉保活机制,为纯文本微批补充占位图、屏蔽对应loss并将视觉特征置零。冻结视觉模块时也启用该机制,保证前向通信一致。