axolotl icon indicating copy to clipboard operation
axolotl copied to clipboard

Hyperparameter optimization CLI

Open casper-hansen opened this issue 1 year ago • 4 comments

⚠️ Please check that this feature request hasn't been suggested before.

  • [X] I searched previous Ideas in Discussions didn't find any similar feature requests.
  • [X] I searched previous Issues didn't find any similar feature requests.

🔖 Feature description

Create a new CLI that allows users to perform hyperparameter optimization to get the most optimized training runs.

✔️ Solution

Using Optuna could be a solution. https://github.com/optuna/optuna

❓ Alternatives

No response

📝 Additional Context

No response

Acknowledgements

  • [X] My issue title is concise, descriptive, and in title casing.
  • [X] I have searched the existing issues to make sure this feature has not been requested yet.
  • [X] I have provided enough information for the maintainers to understand and evaluate this request.

casper-hansen avatar Mar 02 '24 11:03 casper-hansen

what would this look like in axolotl, specifically? new module? arguments? what would the output look like?

ehartford avatar Mar 03 '24 02:03 ehartford

@ehartford you can sort of optimize three things in general:

  1. learning rate
  2. batch size
  3. scheduler

You should specify an axolotl config. Additionally, you need extra arguments to specify the search space you want to optimize within. For example, you could specify a range 0.0005 - 0.01 to optimize the learning rate.

A good reference: https://shengdinghu.notion.site/MiniCPM-Unveiling-the-Potential-of-End-side-Large-Language-Models-d4d3a8c426424654a4e80e42a711cb20

casper-hansen avatar Mar 03 '24 11:03 casper-hansen

Yes - I was asking how you imagine the feature fitting into axolotl's architecture and workflow

ehartford avatar Mar 03 '24 16:03 ehartford

Let's imagine that Axolotl had the feature.

What would the command / arguments be to invoke it? Would it happen in the course of training or as a separate manually launched event? Would it use arguments or a config file? What changes to the config file schema?

ehartford avatar Mar 03 '24 17:03 ehartford

Hi everybody, I guess there should be a balise 'use_optuna' If it is set to True, you could put a range for learning rate (and not int) and a list for learning rate scheduler. So everything is in just in the config file.

etiennebonnafoux avatar Mar 20 '24 07:03 etiennebonnafoux