-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Support qlora in CPU #9233
Support qlora in CPU #9233
Conversation
@hzjane @Uxito-Ada please refer this PR |
model = prepare_model_for_kbit_training(model, use_gradient_checkpointing=False) | ||
|
||
model.enable_input_require_grads() |
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.
Somehow both setting use_gradient_checkpoint=False
and calling model.enable_input_require_grads()
are necessary. I still have not figure out why.
@@ -71,8 +73,8 @@ | |||
max_steps=200, | |||
learning_rate=2e-4, | |||
save_steps=100, | |||
fp16=True, | |||
logging_steps=20, | |||
bf16=True, |
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.
must use "bf16" in for cpu
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
ARC test is unstable. Merge it for now. |
* support qlora in CPU * revert example * fix style
Description
Support qlora in CPU