Skip to content
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

fix optimizer reset for relora sft #1414

Merged
merged 5 commits into from
Dec 3, 2024
Merged

Conversation

winglian
Copy link
Collaborator

@winglian winglian commented Mar 16, 2024

the relora optimizer reset wasn't pruning anything, this fixes that.

what seemed to be wrong with the original implementation is that iterating over the optimizer states isn't sufficient to determine the optimizer keys.

@winglian
Copy link
Collaborator Author

hmm, still doesn't seem to be correct,

[2024-11-21 21:17:08,843] [INFO] [axolotl.relora.reset_optimizer:72] [PID:2840] [RANK:0] Percent of optimizer states zeroed: 0.00                                                                                                                         
[2024-11-21 21:17:08,843] [INFO] [axolotl.relora.reset_optimizer:73] [PID:2840] [RANK:0] absolute n of optimizer states zeroed: 0                                                                                                                         
[2024-11-21 21:17:09,011] [INFO] [axolotl.relora.reset_optimizer:72] [PID:2841] [RANK:1] Percent of optimizer states zeroed: 0.00                                                                                                                         
[2024-11-21 21:17:09,011] [INFO] [axolotl.relora.reset_optimizer:73] [PID:2841] [RANK:1] absolute n of optimizer states zeroed: 0   

also, ooms after the first relora restart

@winglian winglian added the help wanted Extra attention is needed label Nov 21, 2024
@winglian
Copy link
Collaborator Author

winglian commented Dec 3, 2024

@winglian winglian changed the title fix optimizer reset fix optimizer reset for relora sft Dec 3, 2024
@winglian winglian removed the help wanted Extra attention is needed label Dec 3, 2024
@winglian winglian merged commit 1ef7031 into main Dec 3, 2024
12 of 13 checks passed
@winglian winglian deleted the relora-fix-optimizer-reset branch December 3, 2024 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant