Speeding up decoding
Every request to your assistant starts with the same 3,000-token system prompt, and the server reads it from scratch every time. Every answer is written one token per pass over the weights, even when the next ten words are obvious. Four techniques fix waste like this, and none of them changes what the model would produce.
In this lesson you'll learn to
- Explain speculative decoding, and when it speeds things up.
- Explain prefix caching, and how to structure prompts so it hits.
- Explain how paged attention stores the KV cache, and why that raises capacity.
- Explain what FlashAttention changes, and why its results are exact.
Create a free account to open this lesson
It's free. You'll get every free lesson, quizzes that save your progress, daily flashcards and streaks.