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

[COMMENT] AdamW including bias + Clip grad norm closer to pytorch performances #1623

Open
thegodone opened this issue Nov 25, 2024 · 0 comments

Comments

@thegodone
Copy link

thegodone commented Nov 25, 2024

Comment:

Using the AdamW with bias correction (not the one in mlx) combine with clip_grad_norm allows to be similar to pytorch performances.

One possible explanation is that pytorch also has a trick to avoid gradient explosion.

Another one explanation, more logical, is that the initialisation has a big impact on gradient stability.

The fact that the LR changes at each iteration instead of each epoch can be the last one.

Suggestion feature : Having LR scheduler with a option to do it per batch or per epoch would be a great feature to evaluate.

Here a view of 10 time runs using the same initialization (loading identical saved weights for each run) & same data split (mv = validation, mt = test)

image
.
we can see the real deviation of RMSE over the runs.

Desktop (please complete the following information):

  • OS Version: [e.g. MacOS 15.1.1]
  • Version [e.g. 0.21.0]
@thegodone thegodone changed the title [COMMENT] AdamW including bias + Clip grad norm closer to pytorch results [COMMENT] AdamW including bias + Clip grad norm closer to pytorch performances Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant