AI Hardware & Software Stack

For an LLM with N parameters, roughly how many operations does generating one token take in inference (excluding attention)?

  1. AAbout 2N
  2. BAbout 6N
  3. 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 GPU, but decode must read the weights (about 14 GB in FP16) 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.