Skip to content

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

Description

@lkthomas

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 ?

Activity

  1. loubnabnl commented on Feb 11, 2024

    @loubnabnl
    Contributor

    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.

  2. lkthomas commented on Feb 11, 2024

    @lkthomas
    Author
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions