serhii.net

In the middle of the desert you can say anything you want

02 Sep 2025

GPU memory requirements rules of thumb

Long overdue, will update this page as I find better options.

Tutorials

  • LLaMA 7B GPU Memory Requirement - 🤗Transformers - Hugging Face Forums
    • 7B full precision => $7*4=28gb$ of GPU RAM
      • quantization: torch_dtype=torch.float16 etc. to use half the memory
      • this is for inference, training requires a bit more.
    • Why *4? storing weights+gradient, better explanation at that link.
    • based on optimizer, might be *8 etc.
  • HF: GPU, more about training but less about mental models

Calculators

Nel mezzo del deserto posso dire tutto quello che voglio.
comments powered by Disqus