Skip to content

Add the Adagrad with Momentum optimizer. #269

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

Merged
merged 1 commit into from
Jun 10, 2025
Merged

Conversation

copybara-service[bot]
Copy link

@copybara-service copybara-service bot commented May 30, 2025

Add the Adagrad with Momentum optimizer.

This implementation matches the one described in Duchi et al., 2011 with the momentum integration discussed in Sutskever et al., 2013.

Features / Params in AdagradMomentumOptimizerSpec:

  • learning_rate: The base learning rate.
  • momentum: The momentum parameter (exponential decay for the momentum buffer).
  • beta2: The decay rate for the running average of squared gradients (accumulator).
  • epsilon: A small constant added for numerical stability.
  • exponent: The power to which the accumulator is raised (often referred to as k_power in some contexts, typically 0.5 for Adagrad).
  • use_nesterov: Boolean flag; if true, Nesterov momentum is used.

The optimizer maintains two slot variables for each trainable embedding parameter:

  • accumulator: Stores the running average of squared gradients.
  • momentum_buffer: Stores the first-order momentum term.

@copybara-service copybara-service bot force-pushed the test_765046416 branch 4 times, most recently from 9d061e1 to 50adf60 Compare May 30, 2025 22:51
@copybara-service copybara-service bot changed the title Add the Adagrad-Momentum optimizer. Add the Adagrad with Momentum optimizer. Jun 10, 2025
This implementation matches the one described in [Duchi et al., 2011](https://arxiv.org/abs/1103.4296) with the momentum integration discussed in [Sutskever et al., 2013](https://proceedings.mlr.press/v28/sutskever13.pdf).

Features / Params in `AdagradMomentumOptimizerSpec`:
- **learning_rate**: The base learning rate.
- **momentum**: The momentum parameter (exponential decay for the momentum buffer).
- **beta2**: The decay rate for the running average of squared gradients (accumulator).
- **epsilon**: A small constant added for numerical stability.
- **exponent**: The power to which the accumulator is raised (often referred to as `k_power` in some contexts, typically 0.5 for Adagrad).
- **use_nesterov**: Boolean flag; if true, Nesterov momentum is used.

The optimizer maintains two slot variables for each trainable embedding parameter:
- **accumulator**: Stores the running average of squared gradients.
- **momentum_buffer**: Stores the first-order momentum term.

PiperOrigin-RevId: 769858905
@copybara-service copybara-service bot merged commit 191e114 into main Jun 10, 2025
@copybara-service copybara-service bot deleted the test_765046416 branch June 10, 2025 23:51
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

Successfully merging this pull request may close these issues.

1 participant