-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
希望能够保持特定层的 weight 仍为 float32 #302
Comments
可以在一部分结构上用 PatrickStar/examples/moe/moe_bert.py Lines 53 to 64 in 0731c6e
不过注意,如果只是要把一层设置为 fp32 的话,这里的 |
妙啊,意思是这块是torch在管理的,不需要ps参与? |
应该是的,torch_scope 把 config 做了个临时修改 PatrickStar/patrickstar/core/preprocess.py Lines 80 to 86 in d2a5e1d
在 Module init后将参数注册为torch管理,并且保持输入输出为float PatrickStar/patrickstar/core/preprocess.py Lines 366 to 375 in d2a5e1d
|
@Jack47 @liaojianjin |
好的好的,👍 |
有办法让 BatchNorm2d 之类的层保持 float32 进行训练吗?用 half 可能导致 loss 不好收敛
The text was updated successfully, but these errors were encountered: