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

finetuning - Out of Memory Error #208

Open
Xiaoshan-jun opened this issue Mar 15, 2023 · 2 comments
Open

finetuning - Out of Memory Error #208

Xiaoshan-jun opened this issue Mar 15, 2023 · 2 comments

Comments

@Xiaoshan-jun
Copy link

I tried to run the finetuning by

$ python train.py config/finetune_shakespeare.py

Seems like finetune requires a lot of memory. Is there anyway to lower the memory requirement.
The batch size is already 1.

torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 100.00 MiB (GPU 0; 23.68 GiB total capacity; 21.67 GiB already allocated; 85.06 MiB free; 21.92 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

@judyhappy
Copy link

Your GPU memory is too small, suggest to switch to CPU.

@ramiil
Copy link

ramiil commented Mar 20, 2023

For test, you may use smaller model (gpt2-large).

gkielian added a commit to gkielian/ReaLLMASIC_nanogpt that referenced this issue Aug 3, 2024
gkielian added a commit to gkielian/ReaLLMASIC_nanogpt that referenced this issue Sep 5, 2024
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

3 participants