attention
AI infra interview questions tagged attention, across every topic.
8 questions · 4 unlocked for you
Concepts behind "attention"
Review the concepts used in these questions.
Foundational
The KV CacheThe KV cache saves attention keys and values from processed tokens. Follow one decode step, calculate its memory cost, and see why longer conversations reduce the number of requests a GPU can hold.🚀 Inference & Serving
Foundational
Multi-Head Latent Attention and Sparse IndexersLatent attention changes what is stored; sparse indexing changes which positions receive expensive attention; recurrent layers summarize history in state. Learn to budget each mechanism separately, including indexer work, cache replication and hybrid prefix snapshots.🧮 Open Weights & Serving Engines
Core
Attention Variants: MHA, GQA, MQA and MLACompare MHA, GQA, MQA and compressed MLA by the state each retains. Derive cache payload in consistent units, distinguish storage capacity from serving throughput, and account for hybrid layers and rank replication.🚀 Inference & ServingSign in
Core
Arithmetic Intensity by OperationCount the FLOPs and memory transfers of a projection, attention and a residual add. Learn where the batch-size shortcut works, where it breaks, and which hardware roof applies.🧮 Napkin Math & CapacitySign in
Advanced
FlashAttention InternalsFlashAttention computes exact attention in tiles without storing the full score or probability matrix in device memory. Follow the running softmax state, understand why inputs can still be reread, and distinguish the mechanisms introduced in the first three papers.⚡ Kernels & Compilers🔒 Premium
Advanced
Inside a Transformer BlockTrace one token through attention, a residual connection, normalization and a feed-forward network. See which operations mix token positions, which transform features, and why model layers and GPU execution units are different things.🚀 Inference & Serving🔒 Premium
