179 questions
No questions match those filters.
← All questions
LLM FoundationsVery Hard· Inference & Serving· Performance Optimization· Roofline Model
Walk me through the arithmetic intensity of a LayerNorm...
This is one of the questions in the full AI/ML interview bank. Pro unlocks all 1789 questions; Premium includes the same bank plus the highest daily Practice limit.
See plansThe roofline model highlights that LayerNorm is bandwidth-rooflined, characterized by low arithmetic intensity. Consequently, reducing memory accesses in these kernels leads to proportional improvements in wall time. In contrast, matrix multiplications at large batch sizes are compute-rooflined, meaning that reducing FLOPs in those operations results in a much smaller real-world speedup. Optimizing memory-bound kernels like normalization provides super-linear returns relative to their share of total FLOPs.