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

单卡lora微调需要多少显存? #63

Open
CCzzzzzzz opened this issue May 8, 2023 · 4 comments
Open

单卡lora微调需要多少显存? #63

CCzzzzzzz opened this issue May 8, 2023 · 4 comments

Comments

@CCzzzzzzz
Copy link

超参数如下:
--batch_size 1 --max_source_seq_len 250 --max_target_seq_len 150
第一个epoch可以正常微调,到第二个epoch就爆显存,是否存在什么bug?max_source_seq_len和--max_target_seq_len已经设置很多次,到第二个epoch时每次都报相同的错误:
OutOfMemoryError: CUDA out of memory. Tried to allocate 128.00 MiB (GPU 0; 23.99 GiB total capacity; 22.95 GiB already allocated; 0 bytes free; 23.00 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

@shangzhensen
Copy link

你是微调的原模型,还是量化后的模型

@CCzzzzzzz
Copy link
Author

你是微调的原型,还是量化后的模型

原型

@starphantom666
Copy link

能不能出个量化后的模型微调

@hsauod
Copy link

hsauod commented Jun 8, 2023

同样的问题,第二个epochs,出现out of memory,请问大佬解决了吗?

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

4 participants