Skip to main content
QUICK REVIEW

[Paper Review] Large Language Monkeys: Scaling Inference Compute with Repeated Sampling

Bradley Brown, Jordan Juravsky|arXiv (Cornell University)|Jul 31, 2024
Neural Networks and ApplicationsComputer Science9 citations
TL;DR

The paper investigates repeated sampling as a method to scale inference compute for LLMs, showing coverage gains across tasks and models and analyzing cost-effectiveness and verification challenges.

ABSTRACT

Scaling the amount of compute used to train language models has dramatically improved their capabilities. However, when it comes to inference, we often limit models to making only one attempt at a problem. Here, we explore inference compute as another axis for scaling, using the simple technique of repeatedly sampling candidate solutions from a model. Across multiple tasks and models, we observe that coverage -- the fraction of problems that are solved by any generated sample -- scales with the number of samples over four orders of magnitude. Interestingly, the relationship between coverage and the number of samples is often log-linear and can be modelled with an exponentiated power law, suggesting the existence of inference-time scaling laws. In domains like coding and formal proofs, where answers can be automatically verified, these increases in coverage directly translate into improved performance. When we apply repeated sampling to SWE-bench Lite, the fraction of issues solved with DeepSeek-Coder-V2-Instruct increases from 15.9% with one sample to 56% with 250 samples, outperforming the single-sample state-of-the-art of 43%. In domains without automatic verifiers, we find that common methods for picking from a sample collection (majority voting and reward models) plateau beyond several hundred samples and fail to fully scale with the sample budget.

Motivation & Objective

  • Motivate repeated sampling as a scalable axis for inference-time compute beyond single attempts.
  • Quantify how coverage (solved problems) improves with increasing sample budgets across multiple tasks and model families.
  • Assess cost implications and model-selection trade-offs when using many samples instead of a single, larger model.
  • Examine the limits of precision/verification methods in selecting correct samples and identify directions for improving verifiers.

Proposed method

  • Generate many candidate solutions per problem by sampling with positive temperature.
  • Use domain-specific verifiers (unit tests, proof checkers) to select final answers when possible.
  • Measure coverage (pass@k) as fraction of problems solved by any sample, using unbiased estimator for variance reduction.
  • Fit a log(coverage) vs. number of samples with an exponentiated power-law model c ≈ exp(a k^{-b}).
  • Compare cost-efficiency by translating FLOPs into an inference cost and comparing weaker models with many samples to stronger models with fewer samples.
Figure 1 : The repeated sampling procedure that we follow in this paper. 1) We generate many candidate solutions for a given problem by sampling from an LLM with a positive temperature. 2) We use a domain-specific verifier (ex. unit tests for code) to select a final answer from the generated samples
Figure 1 : The repeated sampling procedure that we follow in this paper. 1) We generate many candidate solutions for a given problem by sampling from an LLM with a positive temperature. 2) We use a domain-specific verifier (ex. unit tests for code) to select a final answer from the generated samples

Experimental results

Research questions

  • RQ1Does increasing the number of samples per problem reliably increase coverage across diverse tasks and model families?
  • RQ2How does repeated sampling interact with model size and data-domain (coding, proofs, math word problems) to affect coverage and cost?
  • RQ3Can verifiers (majority voting, reward models) keep up with increasing sample budgets, and where do they plateau?
  • RQ4What are practical limitations and failure modes (e.g., flaky tests, false negatives) in verification when enabling repeated sampling?
  • RQ5Do observed coverage curves follow a scaling law that can guide inference-time compute budgeting?

Key findings

  • Coverage increases with more samples across five tasks and multiple model families, with examples such as SWE-bench Lite reaching 56% solved with 250 samples using a weaker model.
  • On CodeContests, Gemma-2B’s pass@1 improves from 0.02% to 7.1% at 10k samples, a 300x gain over the baseline.
  • Coverage vs. sample budget often follows a log-linear or exponentiated power-law form, enabling prediction of gains as sampling scales.
  • Weaker models can outperform single-attempt stronger models when given many samples, and cost-effective trade-offs emerge (e.g., five-sample runs from DeepSeek can beat single-shot GPT-4o/Claude).
  • Precision methods like majority voting or reward-model scoring plateau around 100 samples, highlighting need for better verification when automatic verification is unavailable.
  • In math-word problems, coverage with Llama-3 grows to >95% at 10k samples, but common sample-selection methods plateau, revealing a gap between coverage and final answer accuracy.
Figure 2 : Across five tasks, we find that coverage (the fraction of problems solved by at least one generated sample) increases as we scale the number of samples. Notably, using repeated sampling, we are able to increase the solve rate of an open-source method from 15.9% to 56% on SWE-bench Lite.
Figure 2 : Across five tasks, we find that coverage (the fraction of problems solved by at least one generated sample) increases as we scale the number of samples. Notably, using repeated sampling, we are able to increase the solve rate of an open-source method from 15.9% to 56% on SWE-bench Lite.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.