AI Hardware & Software Stack
For an LLM with N parameters, roughly how many operations does generating one token take in inference (excluding attention)?
- AAbout 2N
- BAbout 6N
- CAbout N²
Show answer and explanation
Answer: A. About 2N
The forward pass multiplies each weight by an input and adds the result once, about 2N operations per token: about 14 billion for a 7-billion-parameter model. That is small for a modern GPU, but decode must read 14 GB of weights in the meantime, so memory bandwidth, not computation, determines the time.
- A. Correct. One multiply and one add per parameter.
- B. 6N is per token in training.
- C. It does not scale with N squared.