Where the compute actually goes. Feedforward, until long context.
Per token, per layer FLOPs inside one transformer block. The feedforward network is a fixed cost. Attention has a fixed projection cost plus a sequence term that grows with context length. Slide the context length and watch where the compute lives.
FLOPs per token per layer with d_model 8192 and d_ff 32768, counting a multiply add as two FLOPs. Attention projections equal 2 times (4 d_model squared). Sequence term equals 4 seq d_model. Feedforward equals 2 times (2 d_model d_ff). The sequence term meets the feedforward term near 32768 tokens, where attention share crosses roughly sixty percent.