Skip to content

Implement SOAP optimizer (#1580)#1617

Open
jinukuntlaakhilakumargoud-web wants to merge 2 commits intogoogle-deepmind:mainfrom
jinukuntlaakhilakumargoud-web:implement-soap-1580
Open

Implement SOAP optimizer (#1580)#1617
jinukuntlaakhilakumargoud-web wants to merge 2 commits intogoogle-deepmind:mainfrom
jinukuntlaakhilakumargoud-web:implement-soap-1580

Conversation

@jinukuntlaakhilakumargoud-web

Resolves #1580

Add SOAP (Second-order Optimization with Alternating Projections) optimizer to optax.contrib. SOAP improves upon Shampoo by running Adam steps in the preconditioner's eigenbasis, achieving faster convergence.

  • Add scale_by_soap gradient transformation and soap wrapper function
  • Add SoapState NamedTuple with Preconditioner for type-safe tree operations
  • Add helper functions for preconditioning, projection, and eigendecomposition
  • Add unit tests for initialization, convergence, mixed tensors, and qr_dtype
  • Register SOAP in contrib init.py and _common_test.py
  • Add SOAP hyperparams to uninjectable_hparam list for inject_hyperparams

Reference: Vyas et al., SOAP: Improving and Stabilizing Shampoo using Adam, 2024

Add SOAP (Second-order Optimization with Alternating Projections) optimizer
to optax.contrib. SOAP improves upon Shampoo by running Adam steps in the
preconditioner's eigenbasis, achieving faster convergence.

- Add scale_by_soap gradient transformation and soap wrapper function
- Add SoapState NamedTuple with Preconditioner for type-safe tree operations
- Add helper functions for preconditioning, projection, and eigendecomposition
- Add unit tests for initialization, convergence, mixed tensors, and qr_dtype
- Register SOAP in contrib __init__.py and _common_test.py
- Add SOAP hyperparams to uninjectable_hparam list for inject_hyperparams

Reference: Vyas et al., SOAP: Improving and Stabilizing Shampoo using Adam, 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

Successfully merging this pull request may close these issues.

Implement SOAP optimizer

1 participant