Skip to main content
QUICK REVIEW

[논문 리뷰] Inference Scaling Laws: An Empirical Analysis of Compute-Optimal Inference for Problem-Solving with Language Models

Yangzhen Wu, Zhiqing Sun|arXiv (Cornell University)|2024. 08. 01.
Natural Language Processing Techniques인용 수 4
한 줄 요약

이 논문은 수학 추론에서 언어 모델의 계산 최적화 추론을 조사하며, 탐색과 정제를 균형 있게 조절하는 새로운 트리 탐색 알고리즘인 REBASE를 제안한다. 이는 정확도를 향상시키면서도 FLOPs를 감소시킨다. 특히 계산 자원이 제한된 환경에서 Llemma-7B와 같은 소형 모델이 REBASE와 조합될 경우, Llemma-34B와 같은 대형 모델의 성능을 반으로 줄인 FLOPs로도 따라잡을 수 있음을 입증한다.

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을 통한 문제 해결에서 추론 계산(FLOPs)과 정확도 사이의 최적 균형을 규명하는 것.
  • 고정된 계산 예산 하에서 다양한 추론 전략—탐욕적 탐색, 다수결 투표, Best-of-N, 가중 투표, 트리 탐색 변종—의 효율성을 평가하고 비교하는 것.
  • 성능을 향상시키면서도 계산 비용을 최소화하는 새로운 트리 탐색 알고리즘인 REBASE를 설계하고 검증하는 것.
  • 소형 모델이 고도로 발전된 추론 전략을 사용할 경우, 계산 자원이 제한된 환경에서 대형 모델을 능가할 수 있음을 입증하는 것.

제안 방법

  • 수학 추론 벤치마크(GSM8K 및 MATH500)에서 여러 추론 전략(탐욕적, 다수결 투표, Best-of-N, 가중 투표, 트리 탐색 변종)을 경험적으로 평가한다.
  • 토큰 생성 수를 통한 추론 계산 제어를 수행하고, 보상 모델을 사용해 후보 해법을 평가 및 순위 매긴다.
  • 노드 품질 기반 보상 기반의 보상 구조를 사용해 탐색과 정제를 균형 있게 조절하는 새로운 트리 탐색 알고리즘인 REBASE를 제안한다.
  • REBASE를 가중 투표와 통합하여 해법 품질을 향상시키고, 불완전하거나 저품질 후보에 대한 의존도를 줄인다.
  • 정확도와 FLOPs를 성능 측정 지표로 삼아, 다양한 모델 크기와 추론 전략 간의 파레토 최적 균형을 설정한다.
  • REBASE를 표준 샘플링 기반 방법과 MCTS와 비교하며, 포화점과 계산 효율성에 중점을 둔다.
Figure 1 : The inference computation scaling laws of Pythia exhibited in error rate on the GSM8K test set. We evaluate Pythia model using various sizes and various numbers of sampled solutions for majority voting. The left panel shows the error rate for each model size decreases steadily when the co
Figure 1 : The inference computation scaling laws of Pythia exhibited in error rate on the GSM8K test set. We evaluate Pythia model using various sizes and various numbers of sampled solutions for majority voting. The left panel shows the error rate for each model size decreases steadily when the co

실험 결과

연구 질문

  • RQ1수학 추론 과제에서 다양한 계산 예산에 따라 최적의 모델 크기는 어떻게 달라지는가?
  • RQ2탐욕적 탐색, 다수결 투표, Best-of-N, 가중 투표, 또는 트리 탐색 중 어떤 추론 전략이 정확도 대비 FLOPs 비용에서 가장 우수한가?
  • RQ3고도로 발전된 디코딩 전략인 REBASE를 갖춘 소형 언어 모델이 동일한 계산 예산 하에서 대형 모델을 능가할 수 있는가?
  • RQ4REBASE는 표준 샘플링 및 MCTS 대비 정확도와 계산 효율성 측면에서 어떻게 비교되는가?
  • RQ5고도로 발전된 추론 전략의 성능 향상 효과는 모델 크기별로 다르게 작용하는가? 특히 약한 모델에서 그러한 차이가 어떻게 나타나는가?

주요 결과

  • Llemma-7B와 같은 소형 모델은 동일한 추론 전략 하에서 대형 모델(Llemma-34B 등)과 경쟁 가능한 정확도를 달성하면서도 약 50% 정도의 FLOPs만을 소비한다.
  • MATH500 벤치마크에서 Llemma-7B에 REBASE를 적용한 결과, $148.0 \times 10^{12}$ FLOPs로 46.8%의 정확도를 달성했으며, 이는 Llemma-34B가 $176.8 \times 10^{12}$ FLOPs를 소비해 달성한 43.6%의 정확도와 유사한 성능이다.
  • REBASE는 샘플링 기반 방법과 MCTS보다 높은 정확도를 기록했으며, Mistral-7B에선 MATH에서 5.3%의 성능 향상을, Llemma-34B에선 2.6%의 향상을 기록했다.
  • REBASE는 샘플링 방법보다 포화점이 늦게 나타나, 특히 MATH와 같은 어려운 과제에서 증가하는 계산 자원에 대해 지속적인 성능 향상을 보였다.
  • 약한 모델(낮은 탐욕적 정확도를 가진 모델)은 트리 탐색에서 더 큰 이점을 얻는다: REBASE의 성능 향상 폭은 기초 탐욕적 정확도와 반비례한다.
  • 추론에 최적화된 모델 크기는 계산 예산에 따라 달라진다. 저수준에서 중간 수준의 FLOP 수준에서는 소형 모델이 대형 모델보다 더 뛰어난 성능을 보이며, 계산 최적화 설정의 중요성을 강조한다.
Figure 2 : Illustration of compute-optimal scaling laws in training and inference. The Chinchilla scaling law (Hoffmann et al., 2022 ) shows how to choose a model size and number of training tokens under a training-compute budget, while our work shows how to choose a model size and an inference stra
Figure 2 : Illustration of compute-optimal scaling laws in training and inference. The Chinchilla scaling law (Hoffmann et al., 2022 ) shows how to choose a model size and number of training tokens under a training-compute budget, while our work shows how to choose a model size and an inference stra

더 나은 연구,지금 바로 시작하세요

논문 읽기부터 검토까지, 연구 시간을 획기적으로 줄여보세요.

카드 등록 없음 · 무료 플랜 제공

이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.