Learn why exact attention can be faster by changing memory access patterns rather than approximating attention scores.
Implementation check: compare naive attention memory use with PyTorch's scaled dot-product attention on increasing sequence lengths.
Read this as a hardware-aware sequel: the attention math stays exact, while Hopper-specific asynchrony, warp specialization, Tensor Memory Accelerator movement, and FP8 paths change the kernel bottleneck.
Implementation check: write a short compatibility note that separates algorithmic invariants from hardware requirements such as H100/H800-class GPUs, CUDA support, dtype, head dimension, dropout, and variable-length behavior.
Learn the production-facing API surface for attention: masks, dropout, causal mode, grouped-query attention support, and backend selection behavior.
Implementation check: replace a handwritten attention function with F.scaled_dot_product_attention and keep tests identical.
Read GQA after multi-query attention: MQA shares one K/V head to reduce incremental-decoding memory bandwidth, while GQA keeps an intermediate number of K/V heads to recover more quality while preserving much of the serving win.
Implementation check: compute KV cache bytes for MHA, MQA, and GQA, then write the shape test that repeats compact K/V heads to match query heads only inside attention.
Learn why KV cache memory management determines serving throughput for variable-length requests and how block-based cache paging reduces waste.
Implementation check: estimate KV cache bytes and sketch a continuous batching admission rule.
Read this after PagedAttention: prefill and decode stress different resources, so a serving system can scale and schedule them separately when TTFT and time-per-output-token SLOs conflict. Pair it with vLLM disaggregated prefilling and Ray Serve prefill/decode disaggregation to see the production version of the idea.
Implementation check: replay one mixed workload and report TTFT, TPOT/ITL, KV-transfer time, and the fallback condition where one pooled deployment is still better.
Read speculative decoding as a latency method, not a new model objective: a cheaper drafter proposes several tokens, the target model verifies them in parallel, and the acceptance rule preserves the target distribution when its assumptions hold. Pair the paper with Hugging Face assisted decoding and vLLM speculative decoding to see how the idea turns into serving knobs such as assistant models, n-gram proposals, speculation length, and rollback profiles.
Implementation check: benchmark baseline decoding against one speculative profile while holding the target model, prompt set, sampling parameters, max tokens, and output-quality checks constant.