AI Hardware & Software Stack
For a Transformer with N parameters trained on D tokens, which approximation is commonly used for the number of training operations?
- AAbout 2ND
- BAbout N + D
- CAbout 6ND
Show answer and explanation
Answer: C. About 6ND
A forward pass for one token needs a multiply and an add per parameter, about 2N operations. Backpropagation takes about twice that, 4N, so training costs about 6N per token and about 6ND for D tokens. Training a 7-billion-parameter model on 1 trillion tokens, for example, takes about 4.2 × 10²² operations. Dividing this by the GPUs' effective performance gives a rough training time.
- A. 2ND is the forward pass (inference) alone.
- B. Operations scale multiplicatively.
- C. Correct. 2ND forward plus 4ND backward.