Skip to main content

Exercises — Computational complexity of LLMs

Self-check questions, exercises, and worked answers

← Back to the lesson: Computational complexity of LLMs

Check your understanding

  1. Dense attention is quadratic: why can it still be computed in parallel? Interactions between positions are parallelizable matrix operations; total work and sequential depth are different.
  2. Why is standard generation still sequential? The next token depends on the token just selected.
  3. Does FlashAttention make attention linear? No: it retains quadratic work while reducing memory movement and intermediates.
  4. Is a recurrent model with linear work in \(T\) fully parallel? No: a naïve recurrence depends on the previous state, although some structures enable parallel scans.
  5. Does an MoE with few active experts store only those experts? No: all expert weights must be hosted or accessible.

Language: Français · English