Uh oh!
There was an error while loading. Please reload this page.
fix: keep Adam moments in FP32 for BF16 parameters - #210
Open
JYMiracle305 wants to merge 1 commit into
Open
Conversation
JYMiracle305force-pushed
the
fix/adam-fp32-state
branch
from
August 26, 2026 08:09
8323452 to
b66c25cCompare
Base automatically changed from
feat/checkpoint-consumed-micro-batches to
masterAugust 26, 2026 08:14
kilinchangeforce-pushed
the
fix/adam-fp32-state
branch
from
August 26, 2026 08:15
b66c25c to
82a301eCompare
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 freeto 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.
修改背景
Adam 的一阶动量和二阶动量会在训练过程中持续累积。原实现让
m、v跟随模型参数的数据类型,BF16 参数会因此使用 BF16 optimizer state,容易损失较小的梯度变化。主要修改
m和二阶动量v统一使用 FP32 保存和计算该 PR 位于 checkpoint stack 中,依赖 #195,后续 PR 为 #196。