-
Notifications
You must be signed in to change notification settings - Fork 910
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 new optimizer Schedule free #1250
Conversation
…nto schedule_free
Thank you for this! I'll merge it into dev or main once accelerate supports this feature in the release version! |
This implementation is not correct. I think you also need to call And the "support" added by accelerate is just a convenience function that passes the |
Edit === Currently running will result in such an error. steps: 0%| | 0/3000 [00:00<?, ?it/s] |
Thank you for reviewing! 2、i actually forget to add eval before save models. 3、i missed TI...ill add it soon 4、I know convenience function about accelerate because that updates is my request, it can keep completion about code. |
set lr_scheduler=null and not use lr_warmup will fix this |
accelerate release newest version to support schedule free,and this pr had checked and fixed some mistakes now. https://github.com/huggingface/accelerate/releases/tag/v0.29.2 |
Thank you for update! I will review and merge as soon as I have time. I will also consider whether the code can be made common. |
args.optimizer_type.lower().endswith("scheduleFree"): |
It doesn't really matter, but I modified it for aesthetic purposes |
It does matter because |
When it goes to do sample_images it should also set the optimizer to eval as well? I see big spikes in the loss after generating samples. |
Actually eval() switching is before saving, sampler is processed after saving. |
Ahh my bad, I see that now. Must be something odd with my logging. |
I merged this into I also made some modifications to simplify the code. I'll do some more testing and plan to merge it into the dev branch. |
* init * use no schedule * fix typo * update for eval() * fix typo
* init * use no schedule * fix typo * update for eval() * fix typo
* init * use no schedule * fix typo * update for eval() * fix typo
* init * use no schedule * fix typo * update for eval() * fix typo
From facebookresearch,no need set any schedule
https://github.com/facebookresearch/schedule_free
Do not use lr_schedule_warmup and with it in optimizer args
warmup_steps
warmup_steps (int): Enables a linear learning rate warmup (default 0).
other optimizer args for this
Dependences
pip install schedulefree
Need lastest accelerate
pip install git+https://github.com/huggingface/accelerate.git@main#egg=accelerate
Fix TYPO in
library/train_util.py
line 3090grandient to gradient