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

[P0] Memory efficient version of LoReFT #26

Closed
frankaging opened this issue Mar 28, 2024 · 1 comment
Closed

[P0] Memory efficient version of LoReFT #26

frankaging opened this issue Mar 28, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@frankaging
Copy link
Collaborator

frankaging commented Mar 28, 2024

Descriptions:

When use LoReFT in practice, the orthogonalization process of torch takes up the majority of memory overhead during training. If we get rid of this constraint, then it is no longer a pure LoReFT - it makes it Non-linear Low-rank ReFT (NoReFT). There is some trade-off in memory efficiency and performance. One should feel free to explore ideas like NoReFT to see the trade-off if there is one.

Updates:

NoreftIntervention is now implemented and provided by default here: try it!
https://github.com/stanfordnlp/pyreft/blob/main/pyreft/interventions.py#L59

We did try it, it did not work out well comparing with LoreftIntervention. We may do an ablation experiment in our next paper revision to show the full picture.

@danikhan632
Copy link

I may trying writing a triton kernel for this similar to unsloth

@aryamanarora aryamanarora added the enhancement New feature or request label Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants