# Cuda memory error on unchanged workshop 1 notebooks

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcuda-memory-error-on-unchanged-workshop-1-notebooks%2F12329%3E%5C
**Category:** Amazon SageMaker\
**Created:** [November 27, 2021, 2:44am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcuda-memory-error-on-unchanged-workshop-1-notebooks%2F12329 "2021-11-27T02:44:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kjackson](https://avatars.discourse-cdn.com/v4/letter/k/b9e5f3/32.png) [@kjackson](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fkjackson)%5C
**Post date:** [November 27, 2021, 2:44am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcuda-memory-error-on-unchanged-workshop-1-notebooks%2F12329%2F1 "2021-11-27T02:44:59Z")

</div>

I am running notebooks 1 and 3 unchanged from [https://github.com/philschmid/huggingface-sagemaker-workshop-series/tree/main/workshop\_1\_getting\_started\_with\_amazon\_sagemaker](https://github.com/philschmid/huggingface-sagemaker-workshop-series/tree/main/workshop_1_getting_started_with_amazon_sagemaker)

And I get the following error:

> RuntimeError: CUDA out of memory. Tried to allocate 192.00 MiB (GPU 0; 15.78 GiB total capacity; 14.80 GiB already allocated; 44.75 MiB free; 14.83 GiB reserved in total by PyTorch)

I am trying with different batch sizes and learning rates, but can someone help me understand why not everyone got the same error if we’re all using the same AWS resources?

---

<div class="post-metadata">

**Author:** ![philschmid](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/philschmid/32/38022_2.png) [@philschmid](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fphilschmid)%5C
**Post date:** [December 1, 2021, 9:24am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcuda-memory-error-on-unchanged-workshop-1-notebooks%2F12329%2F2 "2021-12-01T09:24:07Z")

</div>

Hello @kjackson,

I run the [notebook](https://github.com/philschmid/huggingface-sagemaker-workshop-series/blob/main/workshop_1_getting_started_with_amazon_sagemaker/lab_1_default_training.ipynb) now twice as it on “main” and never got any error.

```bash
2021-12-01 08:46:23 Uploading - Uploading generated training model
2021-12-01 08:48:23 Completed - Training job completed
ProfilerReport-1638347816: NoIssuesFound
Training seconds: 490
Billable seconds: 490

```
