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

Out Of Memory Error #879

Open
bianxuxuxu opened this issue Sep 12, 2024 · 2 comments
Open

Out Of Memory Error #879

bianxuxuxu opened this issue Sep 12, 2024 · 2 comments

Comments

@bianxuxuxu
Copy link

When I use quantize_ function and run the model, then comment it out in next running time, the original model will appear OOM, and it seems that the pytorch GPU memory automatic reuse function is no longer available. As the running continues the memory to grow until OOM.(My model contains a stack of some modules)

mymodel = MyModel().eval().cuda().half()
quantize_(mymodel, int4_weight_only()) #then comment it in next running

#gen random input
input_ = torch.rand ...
#run model forward
output_ = mymodel(input_)
print(output_)

Is there any cache config be saved in the torchao quantize process and it couldn't be clear?

@bianxuxuxu bianxuxuxu changed the title Out Of Memory Error When next running Out Of Memory Error Sep 12, 2024
@jerryzh168
Copy link
Contributor

Hi @bianxuxuxu can you give a repro so we can debug the issue?

@bianxuxuxu
Copy link
Author

Hi, @jerryzh168
There may be something wrong with my environment, I'll check again. Thank you

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