# Cuda out of memory while using Trainer API

**URL:** <https://discuss.huggingface.co/t/cuda-out-of-memory-while-using-trainer-api/7138>\
**Category:** Beginners\
**Created:** [June 23, 2021, 4:26pm UTC](https://discuss.huggingface.co/t/cuda-out-of-memory-while-using-trainer-api/7138 "2021-06-23T16:26:56Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Emanuel](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/emanuel/32/20406_2.png) [@Emanuel](https://discuss.huggingface.co/u/Emanuel)\
**Post date:** [October 20, 2021, 1:29pm UTC](https://discuss.huggingface.co/t/cuda-out-of-memory-while-using-trainer-api/7138/2 "2021-10-20T13:29:11Z")

</div>

Could this be related to this [issue](https://discuss.huggingface.co/t/run-mlm-py-cuda-error-memory-after-resuming-a-training/5549/3)?

---

_[View the full topic](https://discuss.huggingface.co/t/cuda-out-of-memory-while-using-trainer-api/7138)._
