Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 08 · AI · Serve the GPT you built · with code: Python · about 12 min to read

Watch: Attention in production: KV cache, MQA, GQA and MLA
▶ VideoPlay it as a journeyTutor comes with a plan

Speculative Decoding: The Bigram Drafts, the GPT Checks

Inference at Scale
Inference at Scale · Open board

The Inference at Scale board draws the counter where the model’s weights are wheeled past once for every character. This lesson builds the trick that gets more than one character out of each trip. Stage 5 of the serving series, after Build Your Own Inference Engine.

Before you start. The Prefix Cache: Computed Once made the start of a request cheaper. This stage attacks the other end, the long run of one-character steps that follows. You need the cache from Serve 01: The KV Cache, because a step here feeds new characters into a cache that already holds the past. You need the bigram from The Bigram Model, a table that guesses the next character from the last one alone. Sampling and What Scale Buys gave the GPT that picks the characters. Inference at Scale (why an LLM is fast, and cheap) told this story without code.

Lesson 75 of 83 in AI

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • November 2022: a Google paper notices that most words are easy
  • What decides the speedup is acceptance
  • What the run shows
  • What the toy cannot show
  • Eight guesses, one visit
  • Cutting her notes back after the miss
  • All of it in code

Terms it explains: draft, verification pass, rollback, acceptance rate.

Related paper

Review AI