BLOGLLM Logo
Guest
Not signed in
All BlogsCoursesPracticeSeriesTagsBookmarksPricing
Log in
All BlogsCoursesPracticeTagsBookmarksPricing
BlogsCourses
Practice
Practice / Tracks
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

  1. 1Write scaled dot-product attention with a causal maskAttention and transformers · Medium
  2. 2Rotate a vector by its position (RoPE)Attention and transformers · Hard
  3. 3Normalize activations with RMSNormNormalization · Easy
  4. 4Share keys and values across heads with grouped-query attentionEfficient architectures · Medium
  5. 5Limit attention to a sliding window of recent tokensEfficient architectures · Easy
  6. 6Route each token to its top 2 experts in a mixture of expertsEfficient architectures · Medium
  7. 7Generate one token at a time with a KV cacheLLM inference and serving · Medium
  8. 8Work out how many tokens fit in GPU memory for the KV cacheLLM inference and serving · Easy
  9. 9Allocate KV cache memory in pages, like vLLMLLM inference and serving · Medium
  10. 10Verify a draft model's guesses in speculative decodingLLM inference and serving · Medium
  11. 11Quantize weights to int8 and measure the errorQuantization · Medium

Want it paced? Follow LLM internals in 3 weeks, which pairs these problems with the explainers.

© BlogLLM, Bengaluru, IndiaAboutTermsPrivacyRefundsDMCAContactRSS