Walk through one training step of a language model and where the memory goes
MediumConcept20 minMLEPro outline
The question
Take one optimisation step for a decoder-only language model with the Adam optimiser in mixed precision. Walk me through what happens from the batch of token ids to the updated weights.
Then tell me roughly how much GPU memory a 7 billion parameter model needs for training, and what fills it.
What the interviewer is looking for
- Describes forward, loss, backward and optimiser update in order
- Knows what is stored for the backward pass (activations)
- Gives a parameter, gradient and optimiser state memory estimate
- Names ways to cut memory: activation checkpointing, sharding, lower precision states
- Speaks precisely about mixed precision and master weights
Your answer
Saved in this browser only. Nobody else sees it.
Why this question
Reported in: aced.io, designgurus.io, customcareer.miami.edu
Practice question written by BlogLLM based on publicly reported interview formats. Not an official xAI question.