SCIR-HI / Med-ChatGLM

Repo for Chinese Medical ChatGLM 基于中文医学知识的ChatGLM指令微调
Apache License 2.0
961 stars 153 forks source link

OutOfMemoryError: CUDA out of memory #11

Closed hyb1234hi closed 1 year ago

hyb1234hi commented 1 year ago

显存不够,根据网上的方案也无法解决这个问题,请问有什么别的方法可以解决下面的问题 OutOfMemoryError: CUDA out of memory. Tried to allocate 128.00 MiB (GPU 0; 39.56 GiB total capacity; 37.88 GiB already allocated; 32.56 MiB free; 38.21 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

caseylai commented 1 year ago

同样的问题,8卡V100 32G也都不够,批次调到1都不行,求教解决办法

cweihua commented 1 year ago

我的也一样,不知道有没有量化方法或者量化模型

caseylai commented 1 year ago

@cweihua 用官方的ptuning方法吧,显存消耗没这么大。

s65b40 commented 1 year ago

建议尝试ptuning或者lora微调,当前全量微调需要的显存较大