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

torch.cuda.OutOfMemoryError on HuhhingFace NVidia 4xA10G Large #151

Open
lkthomas opened this issue Feb 9, 2024 · 2 comments
Open

torch.cuda.OutOfMemoryError on HuhhingFace NVidia 4xA10G Large #151

lkthomas opened this issue Feb 9, 2024 · 2 comments

Comments

@lkthomas
Copy link

lkthomas commented Feb 9, 2024

torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 288.00 MiB. GPU 0 has a total capacty of 21.99 GiB of which 59.00 MiB is free. Process 42083 has 21.92 GiB memory in use. Of the allocated memory 21.59 GiB is allocated by PyTorch, and 47.14 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

I am trying to run StarCoder and still getting this error after using Nvidia 4xA10G Large, it doesn't seems utilize VRAM more than 1 GPU, how could I fix this ?

@loubnabnl
Copy link
Contributor

loubnabnl commented Feb 11, 2024

Can you try using the code in this section https://github.com/bigcode-project/starcoder?tab=readme-ov-file#inference-hardware-requirements this loads the model in ~16GB of RAM. Also the device_map="auto" is needed to dispatch the model on multiple GPUs.

@lkthomas
Copy link
Author

lkthomas commented Feb 11, 2024 via email

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