# Regarding CUDA OOM!

**URL:** <https://discuss.huggingface.co/t/regarding-cuda-oom/31663>\
**Category:** Amazon SageMaker\
**Created:** [February 14, 2023, 1:47am UTC](https://discuss.huggingface.co/t/regarding-cuda-oom/31663 "2023-02-14T01:47:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rajd99](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@Rajd99](https://discuss.huggingface.co/u/Rajd99)\
**Post date:** [February 14, 2023, 1:47am UTC](https://discuss.huggingface.co/t/regarding-cuda-oom/31663/1 "2023-02-14T01:47:50Z")

</div>

@shamanez just wanted to know, I am using 4 GPUS with 24gb of memory each on AWS SageMaker. Still for batch size - 2 (Keeping batch size very low) after number of iterations it goes CUDA - OUT OF MEMORY! Can you suggest me how can I resolve this?  
Also, after every training epoch it checks the entire Validation set so the number of iterations gets multiplied ! Any hints to solve this as well?
