NielsRogge / Transformers-Tutorials

This repository contains demos I made with the Transformers library by HuggingFace.
MIT License
9.15k stars 1.42k forks source link

[TROCR] - Memory requirement for training #173

Open guybedo opened 2 years ago

guybedo commented 2 years ago

Hi,

i'm trying to fine tune trocr and i ran into memory issues. I have a GPU with 10Gb memory.

Is there's a way to know what are the memory requirements for the different models small, base and large ?

Is it possible to optimize this memory usage ? would it help to use multiple gpus ?

jonas-da commented 2 years ago

I guess one simple method to reduce the memory usage is to reduce the batch size... But if you have any ideas, to predict the memory usage before training, please let me know.