MeZO icon indicating copy to clipboard operation
MeZO copied to clipboard

How to use MeZO in training a simple CIFAR-10 model

Open Cascol-Chen opened this issue 1 year ago • 3 comments

Hi, thanks you for sharing such an amazing work. To use MeZO more easily, could you provide a minimum demo to show how can we use MeZO as an optimizer to train a CIFAR model?

Cascol-Chen avatar Jan 03 '24 11:01 Cascol-Chen

Hi,

Please refer to the section "How to add MeZO to my own code?" here. You can find our highlighted MeZO code in this file and it should be fairly easy to copy it to whatever training code that you are using. The logic of MeZO is quite simple.

gaotianyu1350 avatar Jan 04 '24 18:01 gaotianyu1350

Hi,

Sorry for the late reply. Although there are comments to highlight MeZO code, the trainer.py comprises thousand lines of code with complicated dependancy and it's hard to make modification. Therefore, I sincerely recommend a minimum demo on CIFAR to make the great work easier to be followed.

Cascol-Chen avatar Jan 10 '24 05:01 Cascol-Chen

Hi,

If you search "MeZO added" in the file you will find all the related code in trainer.py.

gaotianyu1350 avatar Jan 12 '24 13:01 gaotianyu1350