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

连续推理出现 OOM #102

Open
YingLaiLin opened this issue Aug 9, 2023 · 0 comments
Open

连续推理出现 OOM #102

YingLaiLin opened this issue Aug 9, 2023 · 0 comments

Comments

@YingLaiLin
Copy link

YingLaiLin commented Aug 9, 2023

参照推理的 tutorial ,基于PIQA 数据集进行推理,连续执行 44 次后,出现 OOM:
代码参考;
for data in data_list:
inference_results = beam_search.generate([data], max_length=100, repetition_penalty=1.1)
for res in inference_results:
print(res)
=== ========报错信息==============
RuntimeError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 39.45 GiB total capacity; 37.68 GiB already allocated; 20.25 MiB free; 38.26 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

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

1 participant