Chapter 6 · Part 4

Where inference runs

Here's the punchline: almost every time you touch AI, you're triggering inference. Training happened once, in a lab, months ago. Inference is happening right now, on your phone and in data centers, for you and millions of others. This closing tour points it out in the wild.

Chatbot replies — cloud LLM inference, token by token, in a data center.

scroll

Cloud vs edge — where does the forward pass happen?

A big practical question is where the model runs, and it's a tradeoff:

  • Cloud inference — the model lives on powerful servers. Best for large models (LLMs, image generation) that can't fit on a device. Costs a round-trip of latency and network, and someone pays per request.
  • On-device / edge inference — the model runs locally on your phone, laptop, camera or car. Fast, private, works offline — but limited to models small enough to fit, which is exactly what the optimizations from the last chapter make possible.

The same trained weights can be served either way; the deployment choice is all about latency, privacy, cost and model size.

That's the course

Zoom out and inference is one simple idea seen from every angle:

So next time an app answers you in an instant, you'll know what just happened: a frozen model ran a forward pass — one of billions — and that, not the training, is what AI mostly is in daily life.

If you enjoyed this, the other courses cover what's being run — how ChatGPT works, how images are generated, and the chips that make inference fast.