-
Notifications
You must be signed in to change notification settings - Fork 29.4k
from 1.11.0, torchao.prototype.low_bit_optim is promoted to torchao.optim #38689
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
torchao.optim Signed-off-by: YAO Matrix <[email protected]>
cc @MekkCyber |
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.
Thanks, just a nit
tests/trainer/test_trainer.py
Outdated
has_torchao_optim = version.parse(importlib.metadata.version("torchao")) >= version.parse("0.11.0") | ||
AdamW4bitModule = torchao.optim.AdamW4bit if has_torchao_optim else torchao.prototype.low_bit_optim.AdamW4bit | ||
AdamW8bitModule = torchao.optim.AdamW8bit if has_torchao_optim else torchao.prototype.low_bit_optim.AdamW8bit | ||
|
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.
just fix the import, we will always use the latest version of torchao
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.
@SunMarc , done, pls take a look, thx
Signed-off-by: YAO Matrix <[email protected]>
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
…ptim (huggingface#38689) * since 1.11.0, torchao.prototype.low_bit_optim is promoted to torchao.optim Signed-off-by: YAO Matrix <[email protected]> * fix review comments Signed-off-by: YAO Matrix <[email protected]> --------- Signed-off-by: YAO Matrix <[email protected]> Co-authored-by: Marc Sun <[email protected]>
per https://github.com/pytorch/ao/tree/main/torchao/prototype, from1.11.0,
torchao.prototype.low_bit_optim
is promoted totorchao.optim
, so will haveAttributeError: module 'torchao.prototype' has no attribute 'low_bit_optim'
w/ torchao 1.11.0.@ydshieh , pls help review, thx.