hello·ai

Phase 2 of 4

The model

What is actually happening inside, and what does that cost?

A transformer is a fixed amount of arithmetic per token. Once you can count that arithmetic, latency, memory and price stop being mysterious.

Topics in this phase

  1. Parameters & layers

    6 minUnread

    A model is a fixed pile of numbers arranged in repeated blocks, and its size tells you its memory footprint and its latency floor directly.

    After Embeddings

  2. Attention

    7 minUnread

    A soft lookup where every token asks every earlier token how relevant it is, and the answer is a set of weights the model learned rather than a rule anyone wrote.

    After Parameters & layers

  3. Training vs inference

    6 minUnread

    Training is a write path you will almost certainly never run; inference is a stateless read path, and conflating the two is the source of most bad architecture decisions here.

    After Parameters & layers

  4. Prefill & decode

    7 minUnread

    One request is two different workloads with two different bottlenecks, and every latency number you care about belongs to one or the other.

    After Parameters & layers, Attention

  5. KV cache

    6 minUnread

    Per-request memory that turns quadratic regeneration into linear growth, and then becomes the thing that runs out first.

    After Attention, Prefill & decode

  6. Quantization

    6 minUnread

    Storing weights in fewer bits to cut memory and bandwidth, which usually makes generation faster as well as smaller — and moves quality loss into the cases you are least likely to test.

    After Parameters & layers

Examples that open after this phase

Problem statements that make sense once these topics are done. They unlock at the same 80% mark the next phase does.