# How to quickly determine memory requirements for model

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-quickly-determine-memory-requirements-for-model%2F43426%3E%5C
**Category:** Beginners\
**Created:** [June 15, 2023, 10:25pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-quickly-determine-memory-requirements-for-model%2F43426 "2023-06-15T22:25:45Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![pvelosipednikov](https://avatars.discourse-cdn.com/v4/letter/p/90db22/32.png) [@pvelosipednikov](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fpvelosipednikov)%5C
**Post date:** [September 21, 2023, 6:07pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-quickly-determine-memory-requirements-for-model%2F43426%2F4 "2023-09-21T18:07:10Z")

</div>

How would I determine these requirements when I’m finetuning a model? I’m finetuning a 780 MB model with a 5 MB dataset. On my local machine this runs fine (16 GB ram) but when I use a GPU (Tesla T4 with 16 GB of GPU ram), I immediately get an OOM error when I launch `trainer.train()`.

---

_[View the full topic](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-quickly-determine-memory-requirements-for-model%2F43426)._
