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

Anyone already working on including this in transformers? #2

Open
l4b4r4b4b4 opened this issue Jun 22, 2024 · 12 comments
Open

Anyone already working on including this in transformers? #2

l4b4r4b4b4 opened this issue Jun 22, 2024 · 12 comments

Comments

@l4b4r4b4b4
Copy link

Ill try my best, but thought to check if there is anyone else wanting to try this in context of transformers trainer.

@ironjr
Copy link
Owner

ironjr commented Jun 22, 2024

Although it is a fairly small one, the main algorithmic data experiments are done with a 2-layer Transformer with 400k parameters. I'll leave this issue open so people can share their thoughts.

@l4b4r4b4b4
Copy link
Author

worked the approach into a fork of HF transformer trainer.
Runs without errors using trl ORPO trainer and unsloth. Will do some testing and report over the coming week.
Since I did not follow a single best practice from the transformer library no PR yet but for anyone who wants to try it out: https://github.com/l4b4r4b4b4/transformers/blob/main/src/transformers/trainer.py

@phalexo
Copy link

phalexo commented Jun 27, 2024

Is there the expectation that all weights within a network are trainable or can it be used for fine-tuning when only some layers are trainable, @ironjr ?

I tried to insert the code into the Trainer inner training step as well but I get an error about NoneType.

@lucasjinreal
Copy link

@l4b4r4b4b4 hows the result going

@HydrogenBombaklot
Copy link

@l4b4r4b4b4 any update?

@l4b4r4b4b4
Copy link
Author

Had everything implemented in a transformers fork. I think @ehartford https://github.com/cognitivecomputations/grokadamw took it a bit further.

@ehartford
Copy link

I got creative, my implementation is inspired by the paper rather than a direct implementation of it

@phalexo
Copy link

phalexo commented Aug 20, 2024 via email

@ehartford
Copy link

Mine so far I'm seeing only marginal divergence vs adamw-fused

An improvement but not an obvious slam dunk.

Maybe I need to improve the default grokking functions

image-8.png

@phalexo
Copy link

phalexo commented Aug 20, 2024 via email

@ehartford
Copy link

Well, I suppose you know best.

Here is how they started.

image

@BradKML
Copy link

BradKML commented Oct 14, 2024

Are there open data models that can test the efficiency of GrokFast? Only GPT-NeoX and the other one came to mind atm https://github.com/EleutherAI/gpt-neox https://github.com/openlm-research/open_llama

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

7 participants