How much memory overhead does Adam add per parameter compared to vanilla SGD?

Quick Overview

Asks how much extra memory the Adam optimizer needs per parameter compared with vanilla SGD and SGD with momentum. Tests whether you can count optimizer state in bytes under fp32 and mixed-precision training and name the common ways to reduce it.

How much memory overhead does Adam add per parameter compared to vanilla SGD?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

How much memory overhead does `Adam` add per parameter compared to vanilla `SGD`? ```hint What persists between steps List every tensor each optimizer has to keep from one update to the next, then multiply by the bytes per element. ``` ### What a Strong Answer Covers - Names the extra state tensors Adam keeps and why its update rule needs them - Gives per-parameter byte counts for vanilla SGD, SGD with momentum and Adam in fp32, with weights and gradients included - Explains how the accounting changes under mixed-precision training - Scales the per-parameter number to a concrete model size - Names ways to shrink or spread the optimizer state ### Follow-up Questions - How do ZeRO stages 1, 2 and 3 split the per-parameter memory across data-parallel GPUs? - 8-bit Adam stores the moments in 8 bits. What has to be done to keep training stable? - Adafactor stores a factored second moment. What does it give up compared with Adam? - Besides optimizer state, what else takes GPU memory during training, and how would you reduce it?

Overview: Asks how much extra memory the Adam optimizer needs per parameter compared with vanilla SGD and SGD with momentum. Tests whether you can count optimizer state in bytes under fp32 and mixed-precision training and name the common ways to reduce it.

General logo
General
Nov 25, 2026
easyMachine Learning EngineerOtherMachine Learning
0
0

How much memory overhead does Adam add per parameter compared to vanilla SGD?

What a Strong Answer Covers Guidance

  • Names the extra state tensors Adam keeps and why its update rule needs them
  • Gives per-parameter byte counts for vanilla SGD, SGD with momentum and Adam in fp32, with weights and gradients included
  • Explains how the accounting changes under mixed-precision training
  • Scales the per-parameter number to a concrete model size
  • Names ways to shrink or spread the optimizer state

Follow-up Questions Guidance

  • How do ZeRO stages 1, 2 and 3 split the per-parameter memory across data-parallel GPUs?
  • 8-bit Adam stores the moments in 8 bits. What has to be done to keep training stable?
  • Adafactor stores a factored second moment. What does it give up compared with Adam?
  • Besides optimizer state, what else takes GPU memory during training, and how would you reduce it?