# Regarding CUDA OOM!

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fregarding-cuda-oom%2F31663%3E%5C
**Category:** Amazon SageMaker\
**Created:** [February 14, 2023, 1:47am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fregarding-cuda-oom%2F31663 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FRajd99)%5C
**Post date:** [February 14, 2023, 1:47am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fregarding-cuda-oom%2F31663%2F1 "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?
