MLGuerrillaStart M1 →
Free module·intermediate·M3·10 min read·Prereq: None.

How LLMs Actually Run Things

The capability

What is an LLM, and how does it run things?

A large language model, or LLM, is basically a program that's been trained on a huge amount of text to do one thing, and that's to guess what text comes next. It takes text as input, and it picks a likely next piece and adds that piece to the end, then does the same thing again and again until it decides to stop. GPT and Claude work this way, and so do the open models you can download and run on your own machine.

Everything an LLM product does comes back to that one thing. When a chatbot answers your question, what the model's doing is predicting the text of an answer. When an agent looks up an order, the model has predicted a piece of text that asks for the lookup, and some other code went and did the lookup. So when people say an LLM runs something, what's running is the model plus the code around it, and this module is about figuring out where one stops and the other starts.

Now you might be asking why an engineer needs to know about that split. Well, because a lot of the bugs you'll chase in an AI product come from mixing those two up. People blame the model for forgetting something your code never sent it, or they blame your code for an answer the model made up. If you know which side did what, you know where to look.

Where it shows up

Every product that's built on a model works like this, whether it's a chat window or a coding assistant that edits files in your repository. The names change from one provider to the next, but the pieces are the same, so what you learn here carries over to whichever model you end up using.

Keep reading

The rest of this lesson is free with an account

Create a free account to read the remaining 12 sections. It takes about twenty seconds and there's nothing to pay. The same account opens the slide decks and CV reviews.

  1. 02The model does less than you think
  2. 03The strawberry problem
  3. 04Why models work in tokens
  4. 05One token at a time
  5. 06Reasoning
  6. and 7 more

That's the last one written so far

Pick your next module from the board.

All modules →