Inference-time alignment methods, such as Best-of-N (BoN), improve language model outputs by generating multiple candidates per prompt and selecting among them using a reward model. Much of this cost is wasted: a fixed budget is applied to every prompt, although the computation required by prompts varies widely. Adaptive methods halt once sampled answers appear settled, but their thresholds are tuned heuristics with no statistical control over early-stopping errors. We instead seek an anytime-valid stopping rule that takes an error tolerance α as input and halts only once an answer is certified to hold a majority (θa>1/2) under the generator's distribution. We aggregate candidates by final answer with a reward-weighted self-consistency (RWSC) score and treat stopping as a sequential test over the resulting clusters. Applying Wald's sequential probability ratio test to these clusters yields SPRT-RWSC, which performs well empirically, but its guarantee fails because the leading answer shifts during sampling, and the run is continuously monitored. Our main contribution, e-RWSC, replaces Wald's test with a betting supermartingale (an e-process) for every answer the policy produces, bounding the probability of ever certifying a non-dominant answer by α, uniformly over time and across all answers. The RWSC scores drive the bets, so they affect only how quickly a dominant answer a⋆ is certified, not validity; certification takes O(log(1/α)/dKL(θa⋆∥1/2)) samples. Experiments across several language models, datasets, and reward models confirm the predicted 1/dKL scaling of cost and show that accuracy improves over baselines at substantially lower token cost.
Figures & tables
Figure 1: Comprehensive comparison of all selection methods across GSM8K, MATH500, MMLU and CruxEval for Qwen2.5-3B-Instruct using ArmoRM reward model, with allowed maximum budget as 24. For E-Process methods, we use α=0.1 , p†=0.5 , and c=0.8 . For SPRT we use α=0.1,β=0.2 .
Table 2: Cross-RM Sensitivity Analysis on MATH500 (Qwen2.5-3B, N=24 ).
Figure 2: Stopping reliability and token footprint analysis on MATH500 ( Nmax=512 ) for Qwen2.5-3B with ArmoRM. (a) e-RWSC achieves 94.5% accuracy on certified early stops ( τ<512 ). (b) Decision reliability on early stops plotted against overall token expenditure ( k -tokens)
Figure 3: Ablation Studies on MATH500. (a) E-RWSC stopping distribution for Nmax=512 . (b) Sensitivity to Type-I error boundary α ( Nmax=64 ). (c) Sensitivity to the prior alignment threshold p† ( Nmax=64 ).
Figure 4: Empirical validation of E-RWSC theoretical bounds. (Top) Realized error rate respects the Type-I error ( α ) threshold. (Bottom) The inverse of signal strength versus stopping step shows a linear relationship.
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
GSM8K
MATH500
MMLU
CruxEval
Method
Acc
Budget
Acc
Budget
Acc
Budget
Acc
Budget
Oracle@24 (Hard Ceiling)
96.5%
24.00
90.2%
24.00
93.4%
24.00
76.5%
24.00
Full Budget Baselines
Base Policy ( πref )
81.1%
24.00
63.6%
24.00
65.8%
24.00
44.0%
24.00
Vanilla BoN
91.2%
24.00
71.0%
24.00
74.6%
24.00
48.6%
24.00
Soft BoN
89.1%
24.00
69.4%
24.00
70.0%
24.00
46.8%
24.00
Appendix
Table 4: Comprehensive comparison of all selection methods across GSM8K, MATH500, MMLU and CruxEval for Qwen2.5-3B-Instruct using ArmoRM reward model, with allowed maximum budget as 24. For E-Process methods, we use α=0.1 , p†=0.5 , and c=0.8 . For SPRT we use α=0.1,β=0.2 .
Pipeline Component
Hardware Device
Complexity
Latency / Candidate
LLM Candidate Generation (Qwen2.5-3B)
GPU (RTX 6000 Ada)
O(L⋅dmodel)
7,084.50 ms ( ≈7.08 s )
RM Scoring (ArmoRM-8B forward pass)
GPU (RTX 6000 Ada)
O(L⋅dmodel)
59.76 ms
Answer Extraction & Normalization
CPU (Host)
O(1) regex
≈0.20 ms
e-RWSC E-Process Update & Kelly Bet
CPU (Host)
O(∣A∣) scalar
0.014 ms ( 13.96μs )
Total GPU Compute per Candidate
GPU
—
7,144.26 ms ( ≈7.14 s )
Algorithmic Overhead Ratio
Host CPU / GPU
—
≈0.00020%
Appendix
Table 5: Hardware Latency Breakdown per Candidate on MATH500 using Qwen2.5-3B-Instruct (avg 500.7 tokens/candidate) and ArmoRM-8B on an NVIDIA RTX 6000 Ada GPU and AMD host CPU.
Method
Avg Steps
Generated
GPU Compute
Algorithmic Check
Algorithmic
Overall
Certified
Nˉ
Tokens ( k )
Time (s / query)
Latency ( μ s / step)
Overhead (ms / query)
Acc (%)
Acc (%)
Fixed-Budget Baselines
Vanilla BoN
512.0
256.3
3657.7 ( ≈61.0 min)
—
0.000
69.8%
—
Self-Consistency
512.0
256.3
3657.7 ( ≈61.0 min)
—
0.000
77.4%
—
Adaptive Sequential Baselines
AdaBoN
380.4
202.6
2717.9 ( ≈45.3 min)
0.02 μ s
0.008
69.4%
76.4%
Appendix
Table 6: End-to-End Computational Profile and Algorithmic Overhead on MATH500 ( Nmax=512 ) for Qwen2.5-3B-Instruct with ArmoRM-8B. GPU generation and RM scoring latency measured on an NVIDIA RTX 6000 Ada GPU; algorithmic stopping-check overhead measured on the host CPU. Algorithmic overhead is under 0.0002% of generation time for e-RWSC , while saving 61.7% of total GPU compute time relative to fixed-budget BoN.
Inference-time language model alignment steers or selects outputs during generation to better meet safety, preference, and task goals without retraining.