Guide

What inference is

Training and inference

Training is how a model learns. It is slow, done once, and runs on many GPUs: chips that do huge numbers of sums at once. Inference is using the finished model to answer requests. Nothing new is learned while it answers.

Weights

What a model learned is stored as weights (also called parameters): billions of numbers in a big file. "7B" means 7 billion weights. At 2 bytes each, that is about 14 GB. To run the model, all the weights must fit in the GPU's own memory.

The path of a request

Your text reaches the server and is cut into tokens, small pieces of words. The model makes the answer one token at a time. Each token is sent back as soon as it is made. This is streaming, and it is why answers appear word by word.

The cost of inference

Training is paid once. Inference is paid again for every request and every output token. For a model that millions of people use, inference can end up costing far more than training did. So a small saving per answer adds up to a lot.

The inference engineer's job

An inference engineer makes answers fast, cheap and reliable. They watch:

  • Latency: how long one user waits.
  • Throughput: total work per second across all users, like tokens per second.
  • Memory: whether the model and its work fit on the GPU.
  • Cost: money spent per answer.
  • Uptime: how much of the time the service works.

These pull against each other, so the job is mostly choosing good trade-offs.

Remember

  • Training learns the weights once; inference uses them for every request.
  • Weights are numbers: 7B weights × 2 bytes = 14 GB.
  • Answers are made one token at a time and streamed.
  • Inference cost repeats for every answer.
  • Fast, cheap and reliable: latency, throughput, memory, cost, uptime.