KernelFlume: 面向智能体长上下文解码的弹性核心注意力扩展
KernelFlume: Elastic Core-Attention Scaling for Agentic Long-Context Decoding
AI总结:
针对智能体长上下文解码中突发性长上下文需求超出部署容量的问题,提出KernelFlume架构,通过解耦投影/FFN路径与核心注意力计算,实现无权重注意力节点的弹性扩展,在降低延迟的同时显著降低输出成本。
摘要:
LLM服务日益受到来自智能体、推理模型和扩展对话的长且动态的解码工作负载主导。当突发性长上下文需求超出部署容量时,现有服务系统通常通过启动带有模型副本的额外服务实例来扩展。这种实例级弹性仅通过提供另一个完整的模型副本来增加KV容量,继承了启动延迟、内存开销和批处理碎片化问题。我们提出KernelFlume,一种以解码为中心的架构,将稳定的投影/FFN路径与核心注意力计算解耦:权重节点执行密集的投影/FFN内核,而无权重注意力节点存储令牌范围的KV分区,并随请求状态需求扩展。为了使这种分离具有弹性,KernelFlume维护一个路由表,将令牌范围映射到注意力节点端点。它在令牌边界更新路由,并使用主机可见的图信号在捕获的CUDA图之外驱动预注册的UCX端点通信。为了在解耦后保持低每令牌延迟,KernelFlume将查询优先的核心注意力调度与层间内核流水线结合,将远程注意力和通信与本地投影/FFN工作重叠。在真实GPU测试平台(节点内A6000和跨节点H100)上,在服务于Llama-3.1-8B的动态长上下文智能体工作负载下,KernelFlume在A6000上保持约74毫秒、在H100上保持约34毫秒的平坦p99 TPOT,同时相对于使用ServerlessLLM(一种最先进的实例启动方法)的全实例弹性扩展,每百万输出令牌成本分别降低高达32%和61%。在模拟中,以更大模型规模重放相同轨迹,相对于ServerlessLLM,成本降低56-66%,在使用更便宜的异构注意力节点硬件时扩大至80-85%,并持续到百万令牌上下文范围。
英文摘要:
LLM serving is increasingly dominated by long and dynamic decode workloads from agents, reasoning models, and extended conversations. When bursty long-context demand exceeds deployed capacity, existing serving systems typically scale out by launching additional serving instances with model replicas. This instance-level elasticity increases KV capacity only by provisioning another full copy of the model, inheriting startup latency, memory overhead, and batch fragmentation. We present KernelFlume, a decode-centric architecture that disaggregates the stable projection/FFN path from core-attention computation: weight nodes execute dense projection/FFN kernels, while weightless attention nodes store token-range KV partitions and scale with request-state demand. To make this separation elastic, KernelFlume maintains a routing table that maps token ranges to attention-node endpoints. It updates routes at token boundaries and uses host-visible graph signals to drive pre-registered UCX endpoint communication outside the captured CUDA Graph. To preserve low per-token latency after disaggregation, KernelFlume combines query-first core-attention dispatch with inter-layer kernel pipelining, overlapping remote attention and communication with local projection/FFN work. On real GPU testbeds (intra-node A6000 and cross-node H100), under a dynamic long-context agentic workload serving Llama-3.1-8B, KernelFlume sustains flat p99 TPOTs of ~74 ms on A6000 and ~34 ms on H100, while lowering cost per million output tokens by up to 32% and 61%, respectively, relative to full-instance elastic scaling with ServerlessLLM, a state-of-the-art instance-startup method. Replaying the same trace at larger model scale in simulation projects a 56--66% cost reduction over ServerlessLLM, widening to 80--85% with cheaper heterogeneous attention-node hardware and persisting into the million-token context range.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。