<p>You already solved your problem. That's great. I would like to point out a different approach and address a few questions.</p>
<blockquote>
<p>Will my model size limit essentially be sum of all available GPU
memory? (35GB?)</p>
</blockquote>
<p>This depends on the training technique you use. The standard data parallelism replicates the model, gradients and optimiser states to each of the GPUs. <strong>So each GPU must have enough memory to hold all these.</strong> The data is splitted across the GPUs. However, the bottleneck is usually the optimiser states and the model not the data.</p>
<p>The state-of-the-art approach in training is <strong>ZeRO</strong>. Not only the dataset, but also the model parameters, the gradients and the optimizer states are splitted across the GPUs. This allows you to train huge models without hitting OOM. See the nice illustration below from the paper. The baseline is the standard case that I mentioned. They gradually split optimizer states, gradients and model parameter accross the GPU's and compare the memory usage per GPU.</p>
<p><a href="https://i.stack.imgur.com/Xlnmm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Xlnmm.png" alt="enter image description here" /></a></p>
<p>The authors of the paper created a library called DeepSpeed and it is very easy to integrate it with huggingface. With that I was able to increase my model size from 260 Million to 11 Billion :)</p>
<p>If you want to understand in detail how it works, here is the paper:
<a href="https://arxiv.org/pdf/1910.02054.pdf" rel="nofollow noreferrer">https://arxiv.org/pdf/1910.02054.pdf</a></p>
<p>More information on integrating DeepSpeed with Huggingface can be found here:
<a href="https://huggingface.co/docs/transformers/main_classes/deepspeed" rel="nofollow noreferrer">https://huggingface.co/docs/transformers/main_classes/deepspeed</a></p>
<p>PS: There is a the model parallelism technique in which each GPU trains different layers of the model but it lost its popularity and is not being actively used.</p>
Multi GPU training for Transformers with different GPUs
<p>I want to fine tune a GPT-2 model using Huggingface’s Transformers. Preferably the medium model but large if possible. Currently, I have a RTX 2080 Ti with 11GB of memory and I can train the small model just fine.</p>

<p>My question is: will I run into any issues if I added an old Tesla K80 (24GB) to my machine and distributed the training? I cannot find information about using different capacity GPUs during training and issues I could run into.</p>

<p>Will my model size limit essentially be sum of all available GPU memory? (35GB?)</p>

<p>I’m not interested in doing this in AWS.</p>