NVIDIA-NeMo / NVIDIA-NeMo/Automodel

Add memory calculator to estimate GPU memory requirements for a given model configuration

Open
#1,592 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
963
Forks
318
Avg merge
3d 20h
Merged PRs (30d)
141

Description

It would be useful to have a utility that estimates GPU memory usage for a given model + training configuration before launching a job. This would help users right-size their parallelism strategy and cluster allocation without trial-and-error.

See Megatron Memory Estimator for a similar tool and helpful ideas on what to account for.

Motivation

Currently, the only way to know if a configuration fits in memory is to run it and see if it OOMs. A memory estimator would save GPU hours and iteration time, especially when exploring large model configurations.

Challenges / Open Questions

  • Building a general-purpose memory calculator is hard to maintain if the underlying framework (e.g. PyTorch, FSDP, Megatron) doesn't expose memory accounting APIs. Estimates can drift as framework internals change.
  • Activation memory depends heavily on which optimizations are enabled (activation checkpointing, offloading, mixed precision, etc.), making precise estimates difficult.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the linked Megatron Memory Estimator and the memory factors named in the issue, including model configuration, parallelism, checkpointing, offloading, and mixed precision. Done means providing a utility that estimates GPU memory requirements before a job launches, while the supported configuration scope and accuracy expectations are defined.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
distributed-systems, machine-learning, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.