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

Prodigy 8-bit version #21

Open
KonokoAz opened this issue Oct 18, 2024 · 2 comments
Open

Prodigy 8-bit version #21

KonokoAz opened this issue Oct 18, 2024 · 2 comments

Comments

@KonokoAz
Copy link

KonokoAz commented Oct 18, 2024

Hi!, I would like if is possible apply the 8 bit strategy to Prodigy to reduce the vram used. Or it could mess something necessary for make it works. I don't understand very well the paper and I'd really like know your thoughts. Thanks in advance.

@konstmish
Copy link
Owner

Hi @KonokoAz! We have added a hyperparameter called slice_p to reduce the memory needed to store Prodigy's extra vectors used to estimate the learning rate. With a value like slice_p = 11, it should reduce the memory consumption by about 45%.

8-bit version can still be added to additionally compress the vectors used in the algorithm. That would mean compressing momentum estimates too, so we'd need to store state['s'], state['p0'], state['exp_avg'], and state['exp_avg_sq'] in 8-bit format. We think it'd be a good addition to the main optimizer and we'd be happy to review a pull request if you have the time to implement it. It's best to make an implementation based on bitsandbytes.

If you don't have time to work on a PR, we might do it in the future ourselves, though we're not currently working on it. Let us know what you think.

@KonokoAz
Copy link
Author

Thank you so much for your answer!, I rlly would like make a PR indeed I did a try but few months ago. But I gave up after several tries because they was consuming more vram than the original one haha... I'm still learning about this world. So with this information, I'll try again to see if I can get something working (but don't wait for me ; u;)

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

2 participants