The quadratic complexity of attention score calculation (Q*K^T) dominates for long sequences, memory bandwidth limits fetching cached keys/values to GPUs, and non-contiguous memory access patterns cause frequent cache misses slowing down processing.
Open the full topic