让大模型思考更短更准,提升推理效率与准确性。
Thinking Short and Right Over Thinking Long: Serving LLM Reasoning Efficiently and Accurately
- 通过早期停止和冗余采样,减少冗长思考。
- 动态剪枝低质量推理分支,内存占用降低40%以上。
- 适合高并发场景下的大模型推理服务部署。
近期测试时扩展的研究表明,大型语言模型(LLMs)可通过生成思维链(Chain-of-Thought)来提升能力,同时探索多个推理分支并集成可提高输出质量。然而,结合这两种扩展方式会显著降低系统效率:一是生成多个分支导致响应时间大幅增加,许多分支陷入过度思考;二是每请求生成多条分支大幅增加内存消耗,限制了批处理数量。为此,我们提出SART框架,实现高效且准确的LLM推理。核心思想是让思考更短更准而非更长。一方面,基于实证观察与理论分析设计冗余采样与早期停止策略,提升获取短思维响应的概率;另一方面,动态剪枝低质量分支,仅保留高质量路径,降低内存开销,支持更大批量请求。实验表明,SART在相同精度下,效率较现有方法最高提升28.2倍,平均提升15.7倍。
原文摘要 · Abstract (English)
Recent advances in test-time scaling suggest that Large Language Models (LLMs) can gain better capabilities by generating Chain-of-Thought reasoning (analogous to human thinking) to respond a given request, and meanwhile exploring more reasoning branches (i.e., generating multiple responses and ensembling them) can improve the final output quality. However, when incorporating the two scaling dimensions, we find that the system efficiency is dampened significantly for two reasons. Firstly, the time cost to generate the final output increases substantially as many reasoning branches would be trapped in the over-thinking dilemma, producing excessively long responses. Secondly, generating multiple reasoning branches for each request increases memory consumption, which is unsuitable for LLM serving since we can only batch a limited number of requests to process simultaneously. To address this, we present SART, a serving framework for efficient and accurate LLM reasoning. The essential idea is to manage the thinking to be short and right, rather than long. For one thing, we devise a redundant sampling with early stopping approach based on empirical observations and theoretic analysis, which increases the likelihood of obtaining short-thinking responses when sampling reasoning branches. For another, we propose to dynamically prune low-quality branches so that only right-thinking branches are maintained, reducing the memory consumption and allowing us to batch more requests. Experimental results demonstrate that SART not only improves the accuracy of LLM reasoning but also enhances the serving efficiency, outperforming existing methods by up to 28.2 times and on average 15.7 times in terms of efficiency when achieving the same level of accuracy.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。