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

Model is too big to apply AdaRound #2698

Open
yanz0920 opened this issue Feb 2, 2024 · 2 comments
Open

Model is too big to apply AdaRound #2698

yanz0920 opened this issue Feb 2, 2024 · 2 comments

Comments

@yanz0920
Copy link

yanz0920 commented Feb 2, 2024

What to do when the model is too large to use adaround?

For example, when the model has 6B parameters and dtype is torch.float32, the storage requirements are as follows:
model: 24G
quantsim_model:24G

But there will be OOM when I runing AdaRound on Nvidia A100, which has 80G cuda memory...

@quic-mangal
Copy link
Contributor

@quic-hitameht could you help answer this?

@quic-hitameht
Copy link
Contributor

Hi @yanz0920 During Adaround optimization, we try to put all the cached intermediate activation data for a given layer on GPU for faster optimization whenever possible. In your case, you could disable this optimization by patching AdaroundOptimizer.enable_caching_acts_data method as shown in this unit test.

https://github.com/quic/aimet/blob/develop/TrainingExtensions/torch/test/python/test_adaround_weight.py#L889

Hope this helps. Please let us know if you have further questions.

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

3 participants