arXiv:2604.16395cs.LGcs.CL2026-04中稿 · MLSys 2026

让大模型推理更快出结果,通过动态流式处理上下文提升响应速度。

Stream2LLM: Overlap Context Streaming and Prefill for Reduced Time-to-First-Token (TTFT)

论文配图:Stream2LLM: Overlap Context Streaming and Prefill for Reduced Time-to-First-Token (TTFT)
图 1 · 摘自论文原文
  • 分阶段调度+动态抢占,按需处理新增或更新的上下文
  • 实测首令牌延迟降低最高11倍,吞吐量与传统方式相当
  • 适合高并发、上下文动态变化的实时问答系统

大模型推理中的上下文检索系统面临核心挑战:等待完整上下文导致首令牌延迟高,而提前开始又降低质量。流式增量加载上下文可缓解该问题,但多请求并发时会引发显存和算力竞争,且调度需适应动态上下文到达。本文提出 Stream2LLM,一种面向并发预填充-解码分离部署的流式感知服务系统。它针对追加式(渐进积累)和更新式(缓存失效迭代优化)两种检索模式,引入自适应调度与抢占机制。通过解耦调度与资源分配,支持基于硬件成本模型的灵活抢占策略,并采用最长公共前缀匹配减少输入动态变化带来的重复计算。我们基于网络爬取和近似最近邻搜索构建了两个大规模真实流式工作负载进行评估。结果表明,流式架构可实现最高11倍的首令牌延迟改善,在内存压力下,成本感知调度带来关键优势,同时保持与非流式基线相当的吞吐量。

原文摘要 · Abstract (English)

Context retrieval systems for LLM inference face a critical challenge: high retrieval latency creates a fundamental tension between waiting for complete context (poor time-to-first-token) and proceeding without it (reduced quality). Streaming context incrementally--overlapping retrieval with inference--can mitigate this latency, but doing so with concurrent requests introduces new challenges: requests contend for GPU compute and memory, and scheduling must adapt to dynamic context arrivals. We present Stream2LLM, a streaming-aware LLM serving system for concurrent prefill-decode disaggregated deployments. Stream2LLM introduces adaptive scheduling and preemption for two distinct retrieval patterns: append-mode (progressive context accumulation) and update-mode (iterative refinement with cache invalidation). It decouples scheduling decisions from resource acquisition, enabling flexible preemption strategies guided by hardware-specific cost models, and uses longest common prefix matching to minimize redundant computation when input changes dynamically. To evaluate Stream2LLM, we collect two large-scale, real-world streaming workloads based on web crawling and approximate nearest neighbor search. Our evaluation demonstrates that streaming architecture delivers up to 11x TTFT improvements, with cost-aware scheduling providing critical benefits under memory pressure, all while maintaining throughput parity with non-streaming baselines. Code: https://github.com/rajveerb/stream2llm/tree/mlsys_artifact

大模型推理流式处理低延迟调度优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。