-
Notifications
You must be signed in to change notification settings - Fork 63
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
Add a pip-installable, simple implementation of MeZO (along with a distributed impl. and some tests) #26
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Fabrice Normandin <[email protected]>
Signed-off-by: Fabrice Normandin <[email protected]>
Signed-off-by: Fabrice Normandin <[email protected]>
Signed-off-by: Fabrice Normandin <[email protected]>
Signed-off-by: Fabrice Normandin <[email protected]>
Signed-off-by: Fabrice Normandin <[email protected]>
Signed-off-by: Fabrice Normandin <[email protected]>
Signed-off-by: Fabrice Normandin <[email protected]>
Signed-off-by: Fabrice Normandin <[email protected]>
|
||
|
||
```bash | ||
pip install git+https://www.github.com/lebrice/MeZO |
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.
Note: If you're interested in merging this PR, then simply accept this change so people pip-install your repo instead of my fork.
pip install git+https://www.github.com/lebrice/MeZO | |
pip install git+https://www.github.com/princeton-nlp/MeZO |
Signed-off-by: Fabrice Normandin <[email protected]>
Hey @gaotianyu1350 @sadhikamalladi @eltociear @danqi, would you be interested in reviewing this contribution to your repo? |
@lebrice appreciate the effort youve gone through, this is adding productively to some experiments were o at the moment! |
Hello there!
I was very interested in your work after seeing it a NeurIPS. I'd like to play around with it a bit in the future. In order to do so, I felt it might be useful to add a simple, standalone implementation of your algorithm to your codebase, so people can more easily import it into their codebase and use it.
Here are my contributions, if you're interested:
mezo
packagemezo.update
: Perform a single MeZO update given the model, loss function, inputs, random seed, epsilon and learning rate.mezo.reconstruct_updates
: Reconstructs a sequence of MeZO updates given the model, random seeds and projected gradients of each stepmezo.average_of_updates
: Performs the average of multiple MeZO updates given the model, random seeds and projected gradients of each step or workermezo.distributed_update
: Distributed update, each worker communicates the projected grads (and random seed implicitly) to all other workers. Each worker ends up reconstructing the average update from all workers.mezo.distributed
mezo.update
,mezo.reconstruct_updates
,mezo.average_of_updates
,mezo.distributed_update
)If you'd like to add these changes to your repo, could you please just make sure that I didn't miss anything in my re-implementation of the algorithm (perhaps by reading through the
mezo.update
andmezo.distributed_update
functions, if possible).Thanks and congratulations on this great work!