Pro
Advanced track: LLM architecture from the inside
Write the parts that make a modern LLM fast and small, one function at a time: attention and its variants, position encoding, normalization, mixture of experts, KV cache memory, paging, speculative decoding and quantization.
Every problem runs Python and NumPy in your browser, checks your function against tests, and opens a worked solution after your first run.
0 of 11 solved on this device
- 1Write scaled dot-product attention with a causal mask
- 2Rotate a vector by its position (RoPE)
- 3Normalize activations with RMSNorm
- 4Share keys and values across heads with grouped-query attention
- 5Limit attention to a sliding window of recent tokens
- 6Route each token to its top 2 experts in a mixture of experts
- 7Generate one token at a time with a KV cache
- 8Work out how many tokens fit in GPU memory for the KV cache
- 9Allocate KV cache memory in pages, like vLLM
- 10Verify a draft model's guesses in speculative decoding
- 11Quantize weights to int8 and measure the error
Want it paced? Follow LLM internals in 3 weeks, which pairs these problems with the explainers.