-
-
Notifications
You must be signed in to change notification settings - Fork 972
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 CAME Optimizer #2385
base: main
Are you sure you want to change the base?
Add CAME Optimizer #2385
Conversation
We're doing a refactor of how we handle custom optimizers. See #2367 |
I will keep an eye on that. |
you could probably use optim_args:
betas: [0.999, 0.999, 0.999]
eps: 0.00000001 |
@@ -691,6 +691,22 @@ def build(self, total_num_steps): | |||
# Set default so transformers doesn't throw | |||
training_arguments_kwargs["optim"] = "adamw_hf" | |||
|
|||
if self.cfg.optimizer == "came_pytorch": | |||
from came_pytorch import CAME |
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.
should probably have a try/except ImportError with messaging to install it from pip.
The linked PR was merged. If you need an example on how to add optimizer's now, it's as simple as this: https://github.com/axolotl-ai-cloud/axolotl/pull/2367/files#diff-5edc13801ecfdd108e81872527bdc78c6d24a73833968147b0a9ecb8452996f4R693-R698 |
Description
PR set as a draft as I'm unsure how
betas (tuple[float, float, float])
andeps (tuple[float, float])
should be set. Everything works fine though, I just don't know how best to make those options editable.https://arxiv.org/abs/2307.02047
https://github.com/yangluo7/CAME
Requires you to
pip install came_pytorch
.Screenshots (if appropriate)
Axolotl Config