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

CUDA out of memory #6

Open
simba0626 opened this issue May 8, 2023 · 0 comments
Open

CUDA out of memory #6

simba0626 opened this issue May 8, 2023 · 0 comments

Comments

@simba0626
Copy link

Hi authors,

MEMIT is an interesting work.
When I run: python -m experiments.evaluate --alg_name=MEMIT --model_name=EleutherAI/gpt-j-6B --hparams_fname=EleutherAI_gpt-j-6B.json --num_edits=10 --use_cache

There is error about CUDA out of memory:
File "\memit-main\memit\memit_main.py", line 97, in
weights_copy = {k: v.detach().clone() for k, v in weights.items()}
RuntimeError: CUDA out of memory. Tried to allocate 256.00 MiB (GPU 0; 24.00 GiB total capacity; 23.15 GiB already allocated; 0 bytes free; 23.16 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

My local is 24GB 3090 GPU.
Would you help me how to run the MEMIT code ? How to revise the configure file (EleutherAI_gpt-j-6B.json) , in order to reduce memory?

Thank you very much.
MEMIT is very nice.

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

1 participant