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

Adafactor: Update Clipping vs Gradient Clipping #408

Open
dlwh opened this issue Aug 30, 2022 · 1 comment
Open

Adafactor: Update Clipping vs Gradient Clipping #408

dlwh opened this issue Aug 30, 2022 · 1 comment
Assignees

Comments

@dlwh
Copy link

dlwh commented Aug 30, 2022

The Adafactor paper (section 6) suggests "update clipping" instead of the usual "gradient clipping".

image

"Update clipping" here means clipping the update after all the fancy moment stuff has been applied (line 9 above)

However, the alias defined in alias.py clips the initial gradients:

https://github.com/deepmind/optax/blob/master/optax/_src/alias.py#L132-L140

Is this deliberate? FWIW, t5x's adafactor implements update clipping: https://github.com/google-research/t5x/blob/03dfc44be7f9a93d34c1d7fd6f896d1c364a7d4d/t5x/adafactor.py#L470-L476

@hbq1
Copy link
Collaborator

hbq1 commented Oct 20, 2022

Thanks for the question!

@mtthss could you comment on this, since you're the one who ported Adafactor from Flax?

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

3 participants