Skip to content
All paths
Understand AIBeginnerNo code8 chapters120 min

Understanding models

The kinds of models agents use, where they come from and how to compare them. Numbers, no code.

For anyone who wants to know what is inside the models behind AI tools. You see how text becomes tokens, how a model picks the next one, how models are made, how big they are and what their licences allow, then you choose a model for an agent. Examples pair closed models with open ones, and every figure comes from a dated snapshot.

Chapters

  1. Chapter 1Open

    Kinds of models

    Chat, reasoning, multimodal, embedding, reranking, speech, image, guard and small models do different jobs, and one agent often uses several.

  2. Chapter 2Locked

    Tokens

    Models read and write text as tokens, each family of models splits text its own way, and both prices and context limits are counted in tokens.

    14 min
  3. Chapter 3Locked

    Choosing the next token

    A model scores every possible next token, turns the scores into chances and picks one at random; temperature, top-k and top-p change the pick, and base, instruct and reasoning models are trained to write differently.

    14 min
  4. Chapter 4Locked

    Where models come from

    A model is made in stages, from data and pre-training to fine-tuning, feedback, distillation and quantisation, and for open models many stages leave a file you can inspect.

    15 min
  5. Chapter 5Locked

    Size and memory

    The memory a model needs comes from its parameters and the bits that store each one, plus room for its context; a mixture of experts uses a few of its parameters for each token but keeps them all in memory.

    15 min
  6. Chapter 6Locked

    Open and closed models

    Some models can only be used through their maker's service, some share their weights under licences from strict to permissive, and a few are open source, with their data and code.

    15 min
  7. Chapter 7Locked

    Comparing models

    Benchmarks and leaderboards help you compare models, but margins of error, effort settings, cost, leaked tests, maxed-out tests, the test program and who ran it all change what a score means.

    15 min
  8. Chapter 8Locked

    Choosing a model for an agent

    Choosing a model means removing the ones that fail a hard limit, then weighing capability, speed, price per task, context and reliability with tools for one agent's job.

    18 min