Research Papers 论文研究 4h ago Updated 2h ago 更新于 2小时前 49

Beyond Accuracy and Cost: Latency-Aware LLM Query Routing for Dynamic Workloads 超越准确性和成本:面向动态工作负载的延迟感知LLM查询路由

Current LLM query routers optimize for accuracy and cost but ignore latency, relying on naive load-balancing policies like round-robin. The authors introduce a lightweight latency estimator that simulates autoregressive token batch processing to predict Time-To-First-Token (TTFT). A new latency-aware router jointly optimizes latency, accuracy, and cost when assigning queries to model instances. Experimental results show up to a 40% improvement in accuracy-cost utility while maintaining latency l 现有LLM查询路由主要平衡准确率与成本,但往往忽略推理延迟,导致实际用户体验不佳。 提出了一种轻量级延迟估计器,通过模拟自回归token批处理来预测首字延迟(TTFT),解决了延迟受提示长度、负载及调度策略影响的难题。 设计了感知延迟的路由器,联合优化延迟、准确率和成本,在保持标准负载均衡延迟水平的同时,实现了高达40%的准确率-成本效用提升。

65
Hot 热度
75
Quality 质量
70
Impact 影响力

Analysis 深度分析

TL;DR

  • Current LLM query routers optimize for accuracy and cost but ignore latency, relying on naive load-balancing policies like round-robin.
  • The authors introduce a lightweight latency estimator that simulates autoregressive token batch processing to predict Time-To-First-Token (TTFT).
  • A new latency-aware router jointly optimizes latency, accuracy, and cost when assigning queries to model instances.
  • Experimental results show up to a 40% improvement in accuracy-cost utility while maintaining latency levels comparable to standard load-balancing approaches.

Why It Matters

This research addresses a critical gap in production LLM deployments where user experience is heavily influenced by response time, not just cost or quality. By integrating latency estimation into the routing decision process, practitioners can achieve better performance trade-offs without sacrificing speed, making it essential for real-time applications requiring high throughput and low delay.

Technical Details

  • Problem Identification: Existing routers are latency-agnostic, treating latency as a secondary effect of load-balancing rather than a primary optimization variable dependent on prompt length, prefill/decode workload, and serving framework policies.
  • Latency Estimator Design: A lightweight simulator is developed to model autoregressive token batch processing within the serving framework, specifically estimating the Time-To-First-Token (TTFT) for incoming queries.
  • Joint Optimization Router: The estimator is integrated into a routing mechanism that simultaneously considers three metrics: latency, accuracy, and monetary cost, allowing for dynamic assignment based on current system state.
  • Performance Metrics: The approach was evaluated against standard load-balancing policies, demonstrating significant gains in the accuracy-cost utility metric while keeping latency constraints satisfied.

Industry Insight

  • Holistic Routing Strategies: AI infrastructure teams should move beyond simple cost/accuracy trade-offs and implement latency-aware routing to enhance user satisfaction, particularly in interactive applications.
  • Serving Framework Integration: Effective routing requires deep integration with the underlying serving engine’s batching and scheduling policies; abstracting away these details limits optimization potential.
  • Utility Maximization: The 40% improvement in accuracy-cost utility suggests that ignoring latency leads to suboptimal resource allocation, and accounting for it can significantly reduce operational costs for the same quality of service.

TL;DR

  • 现有LLM查询路由主要平衡准确率与成本,但往往忽略推理延迟,导致实际用户体验不佳。
  • 提出了一种轻量级延迟估计器,通过模拟自回归token批处理来预测首字延迟(TTFT),解决了延迟受提示长度、负载及调度策略影响的难题。
  • 设计了感知延迟的路由器,联合优化延迟、准确率和成本,在保持标准负载均衡延迟水平的同时,实现了高达40%的准确率-成本效用提升。

为什么值得看

对于构建大规模LLM应用系统的工程师而言,单纯的成本和准确率优化已不足以应对动态工作负载下的用户体验挑战。本文提供的延迟感知路由方案为平衡系统性能指标提供了新的技术路径,有助于降低端到端响应时间并提升资源利用效率。

技术解析

  • 问题定义:指出当前路由机制多为“延迟无关”,而实际延迟取决于提示长度、实例当前的预填充(prefill)和解码(decode)工作量以及服务框架的调度批处理策略。
  • 核心组件:设计了一个轻量级的延迟估计器,能够模拟服务框架中的自回归token批处理过程,从而准确估算查询的首字延迟(Time-to-First-Token, TTFT)。
  • 联合优化:将延迟估计器集成到路由器中,使其在分配查询时能同时权衡延迟、模型准确率和推理成本,而非仅依赖轮询或最短队列等简单负载均衡策略。
  • 实验结果:在动态工作负载下,该联合优化方法在维持与标准负载均衡相同延迟水平的前提下,显著提升了准确率-成本的综合效用(最高达40%)。

行业启示

  • 多维优化成为必然:LLM基础设施优化需从单一的成本或精度导向,转向包含延迟在内的多维QoS(服务质量)联合优化,以适配实时性要求高的应用场景。
  • 细粒度负载感知的重要性:服务框架内部的调度细节(如批处理大小、预填充与解码阶段的状态)对延迟有决定性影响,路由层需具备对这些底层状态的细粒度感知能力。
  • 动态工作负载适应性:随着LLM部署规模的扩大,静态路由策略失效,具备实时负载评估和自适应调整能力的智能路由系统将成为企业级AI部署的标准配置。

Disclaimer: The above content is generated by AI and is for reference only. 免责声明:以上内容由 AI 生成,仅供参考。

LLM 大模型 Inference 推理 Research 科学研究