AdvancedAbout 20 min

    AI Accelerators

    Read the full article on Substack

    7 min read.

    Find out which ceiling you are actually under. Walk the roofline from prefill to decode, climb the three-level memory hierarchy, and compute a real model's bandwidth utilization to see why quantization speeds up generation without doing less arithmetic.

    Think of it this way: A kitchen. A CPU is one brilliant chef who can cook anything in sequence; a GPU is a thousand line cooks who can only chop, but all at once. Neither matters if the pantry is down the hall — most of the time the kitchen is not waiting on knives, it is waiting on ingredients.

    CPU: a few powerful cores

    Up to about 64 on a high-end consumer machine. Built for fast single threads: the operating system, I/O, anything that must happen in order.

    GPU: thousands of small cores

    Built for parallel work. Most ML is matrix multiplication, which splits into many small independent pieces, so many weak cores win.

    Check your understanding

    Answer from memory before you scroll back up. Pulling an idea out of your head is what makes it stay there.

    Which number is the bottleneck?

    Sort

    Sort each workload by what limits it on the accelerator.

    Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.

    Compute-bound (FLOPS)

    Drop items here

    Memory-bandwidth-bound

    Drop items here
    6 pieces left to place

    Quiz

    20 questions
    Question 1 of 20
    Score: 0

    A GPU beats a CPU on ML workloads mainly because:

    Done with this lesson?

    Sign in free to keep your progress, streak and quiz scores.

    Keep going