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

Lion Optimizer With Triton Kernel #1356

Closed
lapp0 opened this issue Sep 13, 2024 · 1 comment
Closed

Lion Optimizer With Triton Kernel #1356

lapp0 opened this issue Sep 13, 2024 · 1 comment

Comments

@lapp0
Copy link

lapp0 commented Sep 13, 2024

Feature request

lion-pytorch implements a triton kernel https://github.com/lucidrains/lion-pytorch/blob/master/lion_pytorch/triton.py

It's implemented pretty simply in Lion.__init__, might be easy to integrate?

        if use_triton:
            from lion_pytorch.triton import update_fn as triton_update_fn
            self.update_fn = triton_update_fn

Motivation

Improve optimizer.step() performance.

Your contribution

With guidance on whether or not there is some complexity I'm missing, I'd be able to test and integrate this.

@lapp0
Copy link
Author

lapp0 commented Sep 13, 2024

Monkeypatched and benchmarked performance. Performance increase is below the margin of error.

@lapp0 lapp0 closed this as completed Sep 13, 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