What is the difference between inference and training in AI?
Training is how an AI model learns, slowly and at huge cost. Inference is using the finished model to answer, once per question.
Rung 1 Explain like I'm 6
Think about learning to ride a bike. At first you wobble, fall, get up and try again, many times over many days. Each fall teaches your body a little. That is training.
Once you know how, you just hop on and ride to your friend's house. You are not learning anymore; you are using what you learned. That is inference.
AI works the same way. Training is the long, tiring practice where the AI learns from mountains of examples. Inference is every time you ask it something afterwards and it answers using what it already knows.
Rung 2 High-school level
A neural network is a big set of adjustable numbers called weights.
Training finds good values for those weights. The model sees an example, makes a guess, measures how wrong it was (the loss), and nudges every weight to be a bit less wrong. That nudging step is called backpropagation. Repeat over trillions of words and you get a language model. It happens once (plus occasional fine-tuning), takes weeks on thousands of chips, and costs a lot.
Inference uses the finished weights without changing them. Your question goes in, flows forward through the network, and an answer comes out. For a chatbot, inference happens every time anyone sends a message, one token (a word piece) at a time.
So:
- Training: forward pass + backward pass + weight update, done once, very expensive.
- Inference: forward pass only, done millions of times, cheap each time but adds up.
This is why there are different chips: big data-centre GPUs and TPUs for training, and inference chips, including the NPUs in phones and laptops, tuned for answering fast with little power.
Check yourself: Does a chatbot change its weights when you chat with it?
No. Chatting is inference; the weights stay fixed. Only training changes them.
Rung 3 Undergraduate level
A useful rule of thumb from Kaplan et al. (2020): for a transformer with N parameters, a forward pass costs about 2N floating-point operations (FLOPs) per token, because each weight does one multiply and one add. Training costs about 6N per token, since the backward pass is roughly twice the forward pass [1].
Worked example, a 7-billion-parameter model:
- Inference: 2 × 7×10⁹ = 1.4×10¹⁰ FLOPs ≈ 14 GFLOPs per generated token.
- Training: 6 × 7×10⁹ = 42 GFLOPs per training token.
- Training on 1 trillion tokens: 6 × 7×10⁹ × 10¹² = 4.2×10²² FLOPs.
Memory differs even more. Inference needs the weights (14 GB at 16-bit for 7B) plus a cache of past tokens. Training with the Adam optimiser in mixed precision also stores gradients, a full-precision master copy and two optimiser moments, roughly 16 bytes per parameter, about 112 GB for 7B before counting activations.
Inference has two phases. Prefill processes your whole prompt at once and is compute-heavy. Decode generates one token at a time and is limited by how fast weights can be read from memory, which is why memory bandwidth and quantization matter so much for inference.
Rung 4 Graduate level
Compute budgets. Chinchilla (2022) argued that for a fixed training budget, model size and training tokens should be scaled equally, so many earlier models were too big for their data [2]. But training cost is paid once and inference cost is paid per token forever, so labs often train smaller models on more tokens than "compute-optimal" to make serving cheaper.
A real training bill. DeepSeek reported that DeepSeek-V3 (671B total parameters, 37B active per token) was pretrained on 14.8 trillion tokens and needed 2.788 million H800 GPU hours for full training (2024) [4].
Different bottlenecks. - Training is throughput-bound: huge batches, all chips busy, measured in tokens per second across a cluster. Communication between chips is a major cost. - Inference is latency-bound: users wait for the first token and for each next one. Decode is limited by memory bandwidth; batching many users together raises utilisation but adds delay.
Precision. Training needs enough precision for small gradient updates, traditionally 16-bit with 32-bit master weights. Inference tolerates far lower precision; 8-bit and 4-bit weights are common.
Test-time compute. Spending more at inference can substitute for a bigger model. Snell et al. (2024) found that allocating test-time compute adaptively was over 4× more efficient than best-of-N sampling, and in FLOPs-matched tests could beat a 14× larger model on problems where the smaller model had some success [3].
Check yourself: Why is token-by-token decoding usually limited by memory bandwidth rather than compute?
Each new token needs all the weights read from memory but does relatively little maths with them.
Rung 5 PhD level
The 2N/6N accounting [1] hides where the real constraints are. For training, the limits are interconnect bandwidth, fault tolerance across thousands of accelerators and numerical stability. For inference, they are memory capacity and bandwidth for weights and the KV cache, scheduling of variable-length requests, and tail latency.
Open questions:
- Optimal split of compute. Classic scaling laws optimise training loss for a fixed training budget [2]. Including lifetime inference demand shifts the optimum towards smaller, longer-trained models, but the right trade depends on usage that is hard to predict.
- Test-time scaling laws. How accuracy scales with inference compute (longer reasoning, search, verification) is less settled than training scaling, and appears to depend strongly on task difficulty [3].
- Blurring the boundary. Reinforcement learning on model-generated reasoning makes inference part of training: the model generates long rollouts, which are scored and used for updates [5]. Rollout generation can dominate RL training cost.
- Low precision for training. Inference tolerates 4-bit weights; training in 4-bit requires careful handling of gradients and outliers [6]. Whether training can follow inference down in precision without hidden quality loss is open.
- Continual learning. Deployed models do not learn from use. Updating weights during inference safely and cheaply remains unsolved.
Rung 6 State of the art: what experts work on now
Last checked 18 November 2026.
As of 2026-11-18.
Inference became a scaling axis. Following work showing test-time compute can substitute for model size [3], reasoning models now spend many tokens "thinking" before answering. DeepSeek-R1 (January 2025) showed reasoning can be improved through pure reinforcement learning without human-labelled reasoning traces, with models learning to use longer reasoning [5]. The practical result is that serving costs depend on how long a model thinks, not just its size.
Training is getting cheaper per token, and lower precision. DeepSeek-V3 reported 2.788M H800 GPU hours for training a 671B mixture-of-experts model on 14.8T tokens [4]. In September 2025 NVIDIA reported pretraining a 12B model on 10 trillion tokens in 4-bit NVFP4 with loss and accuracy matching an FP8 baseline [6], bringing training precision closer to what inference uses.
The line is blurring. RL fine-tuning generates long model outputs as training data, so large parts of modern training runs are themselves inference [5].
Sources
- Kaplan et al., Scaling Laws for Neural Language Models (2020)
- Hoffmann et al., Training Compute-Optimal Large Language Models (Chinchilla) (2022)
- Snell et al., Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameters (2024)
- DeepSeek-AI, DeepSeek-V3 Technical Report (2024)
- DeepSeek-AI, DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning (2025)
- NVIDIA, Pretraining Large Language Models with NVFP4 (2025)