Journeys

Follow one concrete thing through a system, one boundary at a time. Each step opens the concept behind it.

Workbench · Studying

One request through an LLM

Follow one chat message from typed text to streamed reply, then trace how the model’s weights reached GPU memory before it arrived.

  1. One chat message
  2. Turn input into tensors

    Follow one message as its text becomes integers.

    Studying
  3. Look up embeddings

    Follow each token ID as it selects a row of the model's table.

    Planned
  4. Run one pass through the model

    Follow the vectors through the layers to a score for every vocabulary entry.

    Planned
  5. Choose the next token

    Follow the scores as they become one chosen ID.

    Planned
  6. Repeat for each new token

    Follow the chosen token back to the input and around again.

    Planned
  7. Reuse earlier work

    Follow the state the model keeps so each cycle does not start over.

    Planned
  8. Know when to stop

    Follow the two ways a reply ends.

    Planned
  9. Turn IDs back into text

    Follow generated IDs back into characters and out to the user.

    Planned
  10. How the weights get to the GPU
  11. Load the model weights

    Follow the learned parameters from files on disk into a running server.

    Planned
  12. Stage data through host memory

    Follow bytes through ordinary CPU-side memory on their way to an accelerator.

    Planned
  13. Fill GPU memory

    Follow weights and input tensors into the memory GPU computation reads from.

    Planned
  14. More than one GPU
  15. Cross GPU boundaries

    Follow tensors and synchronization when one GPU is not enough.

    Planned