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

ModelActive2N per tokenAt 4K context
Kimi K232.9B65.7 GFLOPs76.0 GFLOPs
Ling-1T51.1B102.1 GFLOPs112.8 GFLOPs
Inkling41.1B82.1 GFLOPs84.5 GFLOPs
GLM-5.241.3B82.5 GFLOPs103.4 GFLOPs
DeepSeek-V3.238.4B76.8 GFLOPs97.3 GFLOPs
Nemotron 3 Ultra 550B-A55B56.1B112.1 GFLOPs114.1 GFLOPs
Llama 3.1 405B406B811.7 GFLOPs845.5 GFLOPs
Llama 4 Maverick (17B-128E)17.2B34.4 GFLOPs38.4 GFLOPs
Qwen3.5 397B-A17B17.3B34.7 GFLOPs36.9 GFLOPs
GLM-4.533.6B67.3 GFLOPs85.8 GFLOPs

Introduced in Kaplan et al., “Scaling Laws for Neural Language Models” (2020).

Related

Parameters · Mixture of experts (MoE) · Self-attention · every term