2024-12-31 · 进阶 · 机器学习 · 自然语言处理

Efficiently Serving LLM Reasoning Programs with Certaindex

本文提出了一种名为Dynasor的系统,通过使用certaindex来动态分配计算资源,从而优化大型语言模型推理查询的推理时间计算。

更新于 2024-12-31。作者:Yichao Fu、Junda Chen、Siqi Zhu、Zheyu Fu、Zhongdongming Dai、Aurick Qiao、Hao Zhang。

中文摘要

大型语言模型(LLMs)的快速进化解锁了它们在高级推理任务中的能力,如数学问题求解、代码生成和法律分析。这一进步的核心是推理时间推理算法,通过探索多个解决方案路径来优化输出,但这也带来了计算需求和响应延迟的增加。现有的服务系统无法适应这些算法的扩展行为或查询难度的变化,导致资源使用效率低下和未达到的延迟目标。我们提出了Dynasor系统,该系统优化了LLM推理查询的推理时间计算。与传统的引擎不同,Dynasor跟踪和调度推理查询中的请求,并使用Certaindex代理来动态指导计算分配,Certaindex代理基于模型确定性来衡量统计推理进度。Dynasor与推理进度协同适应调度:它为困难查询分配更多计算资源,为简单查询减少计算资源,并提前终止无望的查询,平衡准确性、延迟和成本。在多样化的数据集和算法上,Dynasor在批量处理中减少了高达50%的计算量,并在在线服务中维持了3.3倍更高的查询率或4.7倍更紧的延迟服务目标。

英文摘要

The rapid evolution of large language models (LLMs) has unlocked their capabilities in advanced reasoning tasks like mathematical problem-solving, code generation, and legal analysis. Central to this progress are inference-time reasoning algorithms, which refine outputs by exploring multiple solution paths, at the cost of increasing compute demands and response latencies. Existing serving systems fail to adapt to the scaling behaviors of these algorithms or the varying difficulty of queries, leading to inefficient resource use and unmet latency targets. We present Dynasor, a system that optimizes inference-time compute for LLM reasoning queries. Unlike traditional engines, Dynasor tracks and schedules requests within reasoning queries and uses Certaindex, a proxy that measures statistical reasoning progress based on model certainty, to guide compute allocation dynamically. Dynasor co-adapts scheduling with reasoning progress: it allocates more compute to hard queries, reduces compute for simpler ones, and terminates unpromising queries early, balancing accuracy, latency, and cost. On diverse datasets and algorithms, Dynasor reduces compute by up to 50% in batch processing and sustaining 3.3x higher query rates or 4.7x tighter latency SLOs in online serving.

解读

一句话总结

本文提出了一种名为Dynasor的系统,通过使用certaindex来动态分配计算资源,从而优化大型语言模型推理查询的推理时间计算。

问题1:这篇论文想要解决什么具体问题?

• 问题背景:随着大型语言模型(LLM)在高级推理任务中的能力提升,推理时间计算需求增加,导致计算需求和响应延迟增加。 • 现有方案不足:现有的服务系统无法适应这些算法的扩展行为或查询难度的变化,导致资源使用效率低下和未达到的延迟目标。 • 研究目标:设计一个系统,能够根据推理进度动态分配计算资源,以优化LLM推理查询的推理时间计算。

问题2:论文的核心创新点是什么?

• 技术创新:提出了一种名为certaindex的统计推理进度代理,用于衡量LLM的确定性,并据此动态分配计算资源。 • 方法改进:设计了一种名为Dynasor的系统,该系统可以与现有的服务引擎兼容,并能够自适应地分配计算和调度推理请求。 • 优势:与现有方法相比,Dynasor在批量处理和在线服务中分别减少了高达50%的计算和提高了3.3倍或4.7倍的查询率。

问题3:实验结果如何验证了方法的有效性?

• 关键实验:在多个数据集和算法上进行了实验,包括SC、Rebase、MCTS和ICoT。 • 性能提升:在批量处理中, Dynasor减少了高达50%的计算,在在线服务中,提高了3.3倍的查询率或4.7倍的更严格的延迟SLO。 • 对比结果:与SGLang和Parrot等现有系统相比,Dynasor在保持相同准确率的情况下,减少了高达50%的令牌使用量。

问题4:这个研究的实际应用价值是什么?

• 应用场景:适用于需要高级推理任务的场景,如数学问题解决、代码生成和法律分析。 • 实施建议: Dynasor可以集成到现有的LLM服务系统中,以优化资源使用和减少延迟。 • 局限与展望:虽然Dynasor在许多方面都表现出色,但它仍然依赖于LLM的性能和准确性。未来的研究可以探索如何进一步提高系统的效率和准确性。

来源

机器可读索引:llms.txt