add moh - #4881
Open
wangna11BD wants to merge 1 commit into
Open
Conversation
risemeup1111
suggested changes
Aug 13, 2026
risemeup1111
left a comment
Contributor
There was a problem hiding this comment.
| 序号 | 位置 | 优先级 | 状态 |
|---|---|---|---|
| 1 | paddleformers/transformers/deepseek_v4/modeling.py:526 | 🚧 |
Powered by Nyanpasu with gpt-5.5 xhigh, please check the suggestions carefully.
| # randomly initialize them via add primitive. | ||
| if use_moh: | ||
| stmts += [ | ||
| f"_ -> {idx_tgt}.indexer_moh_bias", |
Contributor
There was a problem hiding this comment.
indexer_moh_bias 是可持久化且会在每个 optimizer step 更新的 buffer,但这里仅在 HF -> Fleet 的正向 AOA 中加入 _ -> ...indexer_moh_bias。_gen_inv_aoa_config 的 decoder 和 MTP indexer 区块都没有把该 buffer 导出到 HF,因此 save_pretrained 不会保存训练后的 bias;下次从 HF 加载时又会执行这个 add primitive,把 bias 重新初始化为 0,丢失负载均衡状态。请在两个逆向 indexer 映射中补上 Fleet -> HF 的对应语句,并增加保存/加载 round-trip 回归测试。
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.
Before submitting
testsfolder. If there are codecov issues, please add tests cases first.PR types
New features
PR changes
Models
Description
为DSV4 CSA index增加moh结构