{"paper":{"title":"Attention Once Is All You Need: Efficient Streaming Inference with Stateful Transformers","license":"http://arxiv.org/licenses/nonexclusive-distrib/1.0/","headline":"Stateful sessions with persistent KV caches let streaming transformer queries run in time independent of context size.","cross_cats":[],"primary_cat":"cs.LG","authors_text":"Victor Norgren","submitted_at":"2026-05-13T17:06:15Z","abstract_excerpt":"Conventional transformer inference engines are request-driven, paying an O(n) prefill cost on every query. In streaming workloads, where data arrives continuously and queries probe an ever-growing context, this cost is prohibitive. We introduce a data-driven computational model centred on stateful sessions: a persistent KV cache advanced incrementally as new data arrives, so prefill is moved off the critical path and query latency becomes O(|q|), independent of accumulated context size. Building on this, Flash Queries reclaim idle GPU cycles between data arrivals to pre-evaluate registered que"},"claims":{"count":4,"items":[{"kind":"strongest_claim","text":"On streaming market-data benchmarks the reference implementation achieves up to 5.9x speedup over conventional inference engines (vLLM, SGLang, TensorRT-LLM, llama.cpp), holding query latency constant as accumulated context grows.","source":"verdict.strongest_claim","status":"machine_extracted","claim_id":"C1","attestation":"unclaimed"},{"kind":"weakest_assumption","text":"That a multi-tenant continuous-batching scheduler with cell-budget admission and prefix-aware grouped prefill can maintain full quadratic self-attention across dozens of stateful sessions without correctness loss or prohibitive overhead.","source":"verdict.weakest_assumption","status":"machine_extracted","claim_id":"C2","attestation":"unclaimed"},{"kind":"one_line_summary","text":"Stateful sessions with incremental KV cache and flash queries allow O(|q|) latency in streaming transformer inference, delivering up to 5.9x speedup over conventional engines while preserving full attention.","source":"verdict.one_line_summary","status":"machine_extracted","claim_id":"C3","attestation":"unclaimed"},{"kind":"headline","text":"Stateful sessions with persistent KV caches let streaming transformer queries run in time independent of context size.","source":"verdict.pith_extraction.headline","status":"machine_extracted","claim_id":"C4","attestation":"unclaimed"}],"snapshot_sha256":"207dd651ac10f9a3c9b729cc7b456f8ba4fe592ec44a60c35d50ea43a45c49ba"},"source":{"id":"2605.13784","kind":"arxiv","version":1},"verdict":{"id":"381654ce-1b87-4538-bc9b-f0672729f336","model_set":{"reader":"grok-4.3"},"created_at":"2026-05-14T19:16:51.175879Z","strongest_claim":"On streaming market-data benchmarks the reference implementation achieves up to 5.9x speedup over conventional inference engines (vLLM, SGLang, TensorRT-LLM, llama.cpp), holding query latency constant as accumulated context grows.","one_line_summary":"Stateful sessions with incremental KV cache and flash queries allow O(|q|) latency in streaming transformer inference, delivering up to 5.9x speedup over conventional engines while preserving full attention.","pipeline_version":"pith-pipeline@v0.9.0","weakest_assumption":"That a multi-tenant continuous-batching scheduler with cell-budget admission and prefix-aware grouped prefill can maintain full quadratic self-attention across dozens of stateful sessions without correctness loss or prohibitive overhead.","pith_extraction_headline":"Stateful sessions with persistent KV caches let streaming transformer queries run in time independent of context size."},"references":{"count":20,"sample":[{"doi":"","year":2023,"title":"Lopez-Lira, A. and Tang, Y. Can ChatGPT Forecast Stock Price Movements? Return Predictability and Large Language Models. SSRN, 2023","work_id":"7e8454c1-04ca-4350-8143-7510902ea219","ref_index":1,"cited_arxiv_id":"","is_internal_anchor":false},{"doi":"","year":2023,"title":"BloombergGPT: A Large Language Model for Finance","work_id":"04e9adc6-bece-4ff4-a0f6-e836d88414a7","ref_index":2,"cited_arxiv_id":"2303.17564","is_internal_anchor":true},{"doi":"","year":2024,"title":"Lost in the Middle: How Language Models Use Long Contexts","work_id":"1616dd1e-4de8-4717-a816-b131cad65926","ref_index":3,"cited_arxiv_id":"","is_internal_anchor":false},{"doi":"","year":2024,"title":"Prompt Caching","work_id":"278a7fa4-e0b4-4ec6-9bc3-fe1ff8995197","ref_index":4,"cited_arxiv_id":"","is_internal_anchor":false},{"doi":"","year":2004,"title":"Longformer: The Long-Document Transformer","work_id":"abea7a44-6668-4de7-aab6-f53a6e5aa088","ref_index":5,"cited_arxiv_id":"2004.05150","is_internal_anchor":true}],"resolved_work":20,"snapshot_sha256":"75e2bae35ff0b2d4f867ea960d54ddc78285ef194f5d5e5f29272cacaff5755d","internal_anchors":8},"formal_canon":{"evidence_count":0,"snapshot_sha256":"258153158e38e3291e3d48162225fcdb2d5a3ed65a07baac614ab91432fd4f57"},"author_claims":{"count":0,"strong_count":0,"snapshot_sha256":"258153158e38e3291e3d48162225fcdb2d5a3ed65a07baac614ab91432fd4f57"},"builder_version":"pith-number-builder-2026-05-17-v1"}