Test-time compute scaling is a major driver of performance in large reasoning models (LRMs), but current approaches are highly inefficient. The key question is shifting from how much compute to spend to where to allocate it. Researchers from Hugging Face formalize test-time reasoning as a constrained compute allocation problem over partial trajectories.
Existing paradigms fail to actively allocate compute to the most promising partial progress. Traditional parallel sampling treats traces independently and causes severe memory bottlenecks, while subtractive pruning starves hardware and fails to sufficiently shift the output distribution.
To address this, the team introduces Gambit, an inference algorithm that executes thought-level beam search. It periodically prunes unpromising trajectories and branches from high-quality prefixes, using a light-weight scorer that probes hidden states. This dynamically concentrates compute on the most promising reasoning traces while maintaining high hardware utilization.
Extensive evaluations show Gambit strictly dominates existing baselines. Under identical hardware constraints, it yields up to +6.7% absolute accuracy gain on HMMT-24 and +3.3% on AIME-25 over pruning baselines. It also delivers over 2x higher throughput on trace completion and reduces total token consumption by up to 68.5% relative to standard parallel sampling.