07-20-2023 09:28 AM
I am trying out the new Meta LLama2 model.
Following the databricks provided notebook example: https://github.com/databricks/databricks-ml-examples/blob/master/llm-models/llamav2/llamav2-13b/01_l...
I keep getting CUDA out of memory. My GPU cluster runtime is
Error message:
CUDA out of memory. Tried to allocate 314.00 MiB (GPU 0; 14.76 GiB total capacity; 13.50 GiB already allocated; 313.75 MiB free; 13.51 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
What would be a good way to solve this issue?
07-21-2023 07:41 AM - edited 07-21-2023 07:41 AM
Hi @gary7135,
Thank you for posting the question in the Databricks community.
Kindly update the configuration by setting fp16=True instead of its current value of false. For further information regarding the CUDA error related to this, please refer to this documentation
07-21-2023 10:54 AM
Thank you. Can you provide example of how to set this argument in notebooks?
07-21-2023 11:32 AM
Hello @gary7135,
Thank you for the response.
According to GitHub (you shared above), you should have a configuration file where you need to make this settings. Please refer to the image below for more details:
07-21-2023 01:25 PM
Thank you. I am running this python file directly in Databricks notebook https://github.com/databricks/databricks-ml-examples/blob/master/llm-models/llamav2/llamav2-7b/01_lo...
The file does not seem to reference the config json file?
07-24-2023 12:44 AM
Hi @gary7135,
If you are now following the same as GitHub.You may somehow work on how to point out the configuration fp16=True to your file,
07-22-2023 09:43 PM
Hi @Kumaran
Hope you are well. Just wanted to see if you were able to find an answer to your question and would you like to mark an answer as best? It would be really helpful for the other members too.
Cheers!
Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.
If there isn’t a group near you, start one and help create a community that brings people together.
Request a New Group