-
Couldn't load subscription status.
- Fork 5.9k
Support storage of large parameters #29988
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
Conversation
|
Thanks for your contribution! |
|
✅ This PR's description meets the template requirements! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Support storage of large parameters * Reduce the complexity of the unittest * Reduce the complexity of the unittest,commented out unittest for * add unittest for static.save/load * Increase the timeout threshold of 'test_static_save_load' * Increase the timeout threshold of 'test_static_save_load' * Increase the timeout threshold of 'test_static_save_load' and 'test_paddle_save_load' * Increase the timeout threshold of 'test_static_save_load' and 'test_paddle_save_load'
* Support storage of large parameters * Reduce the complexity of the unittest * Reduce the complexity of the unittest,commented out unittest for * add unittest for static.save/load * Increase the timeout threshold of 'test_static_save_load' * Increase the timeout threshold of 'test_static_save_load' * Increase the timeout threshold of 'test_static_save_load' and 'test_paddle_save_load' * Increase the timeout threshold of 'test_static_save_load' and 'test_paddle_save_load'
…0170) * Support storage of large parameters (#29988) * Support storage of large parameters * Reduce the complexity of the unittest * Reduce the complexity of the unittest,commented out unittest for * add unittest for static.save/load * Increase the timeout threshold of 'test_static_save_load' * Increase the timeout threshold of 'test_static_save_load' * Increase the timeout threshold of 'test_static_save_load' and 'test_paddle_save_load' * Increase the timeout threshold of 'test_static_save_load' and 'test_paddle_save_load' * Extend the timeout for the (#30151)
PR types
Bug fixes
PR changes
APIs
Describe
paddle.save和paddle.static.save存储模型,单个参数超过4 GiB时报错:一、PR主要修改
1.将元素个数超过2^22的参数拆分,拆成元素个数不超过2^22的子向量。
2.在用
pickle.dump保存的字典中会增加被拆分的子向量和拆分后的信息:'UnpackBigParamInfor@@':拆分信息的名字;'_l.weight':被拆分的参数的名;OriginShape:'_l.weight'的shape;slices:被拆分后的的子向量名,例如:'_l.weight'被拆分成了'_l.weight@@.0'、'_l.weight@@.1'......'_l.weight@@.0':子向量的名字。3.load的时候利用拆分后的信息还原被拆分的向量。
二、Example:
1.paddle.static.save/load:
2.paddle.save/load: