Skip to content

Add Implementation of _Lion Optimizer (Evolved sign Momentum) #1437

@raghulchandramouli

Description

@raghulchandramouli

Summary

I'd like to contribute an Optax Implementation of Lion Optimizer, i.e a gradient transformation and a convenience Lion(...) a wrapper in contrib that composes decoupled weight decay and learning-rate scaling. It tracks a single momentum and uses sign(...) of an interpolation for updates as described in the paper https://arxiv.org/abs/2302.06675

What will I include:

  1. Implementation file in (Optax/contrib/_lion.py)
  2. Test file in (Optax/contrib/_lion_test.py)
  3. a quick Note about fp16 behaviour and suggestions for recommended dtype handling

Request

  1. Guidance on, Would maintaniers be open to this style of Contributions placed under Optax/contrib
  2. Any specific tests, coding style or helper utils
  3. I can open a PR + Implementations/tests,

Thanks - I'm happy to iterate quickly based on feedback

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions