News for hackers. Stuff that matters.
Re:Are OpenAI and Anthropic Losing Money on Inference? by Voloskaya on Thursday August 28, 2025 @10:28AM (#45052604)
Not during prefill, i.e. the very first token generated in a new conversation. During this forward pass, all tokens in the context are all processed at the same time, and then attention's KV are cached, you still generate a single token, but you need to compute attention from all tokens to all tokens.

From that point on every subsequent tokens is processed sequentially in autoregressive way, but because we have the KV cache, this becomes O(N) (1 token query to all tokens) and not O(N^2)

Re:Are OpenAI and Anthropic Losing Money on Inference? by gpjanik on Thursday August 28, 2025 @11:22AM (#45053351)
I somehow missed the "decode phase" paragraph and hence was confused - it's essentially that separation I meant, you're obviously correct.