# How to quickly determine memory requirements for model

**URL:** <https://discuss.huggingface.co/t/how-to-quickly-determine-memory-requirements-for-model/43426>\
**Category:** Beginners\
**Created:** [June 15, 2023, 10:25pm UTC](https://discuss.huggingface.co/t/how-to-quickly-determine-memory-requirements-for-model/43426 "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](https://discuss.huggingface.co/u/pvelosipednikov)\
**Post date:** [September 21, 2023, 6:07pm UTC](https://discuss.huggingface.co/t/how-to-quickly-determine-memory-requirements-for-model/43426/4 "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](https://discuss.huggingface.co/t/how-to-quickly-determine-memory-requirements-for-model/43426)._
