Glossary · Memory, precision and compute
FLOPs per token
Also: 2N6Ncomputeinference cost
Read it at the depth you need: one sentence · a paragraph · the math · in the models here
1In one sentence
The arithmetic to process one token: about 2 FLOPs per (active) parameter for the matmuls, plus attention scores that grow with the context. Training is about 3 times that.
2In a paragraph
Every weight a token passes through costs one multiply and one add: 2 floating-point operations. So a forward pass costs about 2N FLOPs per token for N parameters (active parameters, for a mixture of experts), plus the attention scores, which grow with how many tokens are in context. Training also runs a backward pass, about twice the forward work, hence the 6N rule for training compute. When generating one token at a time, the GPU is usually waiting on memory rather than doing math, so speed tracks bytes read more than FLOPs.
3The math, shapes and parameters
FLOPs ≈ 2 × (Nactive − embedding + head) + 2 × L × T × H × (hqk + hv)
The embedding is a lookup, not a multiply, so it is left out; the output head is a multiply even when tied. The second term is attention for a token at position T. Training a model on D tokens costs about 6·N·D FLOPs.
4In the 96 models on this site
| Model | Active | 2N per token | At 4K context |
|---|---|---|---|
| Kimi K2 | 32.9B | 65.7 GFLOPs | 76.0 GFLOPs |
| Ling-1T | 51.1B | 102.1 GFLOPs | 112.8 GFLOPs |
| Inkling | 41.1B | 82.1 GFLOPs | 84.5 GFLOPs |
| GLM-5.2 | 41.3B | 82.5 GFLOPs | 103.4 GFLOPs |
| DeepSeek-V3.2 | 38.4B | 76.8 GFLOPs | 97.3 GFLOPs |
| Nemotron 3 Ultra 550B-A55B | 56.1B | 112.1 GFLOPs | 114.1 GFLOPs |
| Llama 3.1 405B | 406B | 811.7 GFLOPs | 845.5 GFLOPs |
| Llama 4 Maverick (17B-128E) | 17.2B | 34.4 GFLOPs | 38.4 GFLOPs |
| Qwen3.5 397B-A17B | 17.3B | 34.7 GFLOPs | 36.9 GFLOPs |
| GLM-4.5 | 33.6B | 67.3 GFLOPs | 85.8 GFLOPs |
Introduced in Kaplan et al., “Scaling Laws for Neural Language Models” (2020).
Related
Parameters · Mixture of experts (MoE) · Self-attention · every term