had the same problem, found the solution here: CUDA out of memory when using Trainer with compute_metrics - #13 by morenolq
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| CUDA out of memory when using Trainer with compute_metrics | 26 | 48331 | September 19, 2025 | |
| Cuda out of memory during evaluation but training is fine | 12 | 17767 | February 20, 2025 | |
| Cuda memory error even when passing the no_cuda argument | 0 | 639 | November 23, 2022 | |
| CUDA out of memory only during validation not training | 3 | 4669 | May 9, 2023 | |
| torch.cuda.OutOfMemoryError when evaluate while traning | 0 | 533 | October 8, 2023 |