Inference Scaling Laws: An Empirical Analysis of Compute-Optimal Inference for LLM Problem-Solving

Yangzhen Wu, Zhiqing Sun, Shanda Li, S. Welleck, Yiming Yang

arXiv:2408.00724 · 2026-07-27 공개 · arXiv · PDF

best-of-n majority-voting math-benchmark llm-problem-solving tree-search-algorithms model-size-trade-offs lemmamodel-7b lemmamodel-34b

Abstract

While the scaling laws of large language models (LLMs) training have been extensively studied, optimal inference configurations of LLMs remain underexplored. We study inference scaling laws (aka test-time scaling laws) and compute-optimal inference, focusing on the trade-offs between model sizes and generating additional tokens with different inference strategies. As a first step towards understanding and designing compute-optimal inference methods, we studied cost-performance trade-offs for inference strategies such as greedy search, majority voting, best-of-$n$, weighted voting, and two different tree search algorithms, using different model sizes and compute budgets. Our findings suggest that scaling inference compute with inference strategies can be more computationally efficient than scaling model parameters. Additionally, smaller models combined with advanced inference algorithms offer Pareto-optimal trade-offs in cost and performance. For example, the Llemma-7B model, when paired with our novel tree search algorithm, consistently outperforms the Llemma-34B model across all tested inference strategies on the MATH benchmark. We hope these insights contribute to a deeper understanding of inference scaling laws (test-time scaling laws) for LLMs.

한국어 요약

한 줄 요약

LLM 추론 성능을 최적화하기 위해 추론 전략과 모델 크기의 관계를 실증적으로 분석한 연구.

핵심 기여도

핵심 아이디어

기존 연구는 주로 모델 크기와 학습 계산량의 관계를 다루었으나, 이 연구는 추론 시 계산량과 추론 전략의 관계를 탐구한다. 추론 전략(예: best-of-n, weighted voting, tree search)을 사용하여 추가 토큰을 생성하고, 이를 통해 추론 성능을 향상시키는 방식이 모델 크기 확장보다 계산 효율적일 수 있다는 점이 핵심 통찰이다. 특히, Llemma-7B 모델과 REbase 알고리즘의 조합은 Llemma-34B 모델보다 MATH500 데이터셋에서 더 높은 정확도를 달성하면서 2배 적은 FLOPs를 사용한다. 이는 추론 알고리즘의 개선이 모델 크기 확장보다 더 효과적일 수 있음을 시사한다.

기술적 접근법

주요 결과

의의 및 한계

이 연구는 추론 시 계산량을 고려한 모델 선택과 추론 전략 설계의 중요성을 강조하며, 추론 알고리즘 개선이 모델 크기 확장보다 더 경제적일 수 있음을 실증적으로 보여준다. 특히, REbase 알고리즘은 기존 추론 전략보다 Pareto-optimal한 성능-비용 균형을 제공하며, 추론 알고리즘의 발전이 모델 성능 향상에 기여할 수 있음을 시사한다. 그러나 연구는 수학 추론 벤치마크에 초점을 맞추었기 때문에, 다른 태스크(예: 텍스트 생성, 대화)에 대한 일반화 가능성은 명시되지 않음.

실용적 활용

이 연구는 추론 시 계산 자원이 제한된 환경(예: 모바일, 클라우드)에서 작은 모델과 고급 추론 알고리즘을 결합하여 비용 효율적인 추론을 구현하는 데 활용될 수 있다. 특히, REbase 알고리즘은 추론 성능을 향상시키는 동시에 FLOPs를 절감할 수 있어, 산업 현장에서 모델 배포 전략에 중요한 참고 자료가 될 수 있다.