Manuscript Offprint
arXiv:2611.07453Latency-Aware Adaptive Best-of-
ABSTRACT
Test-time compute (TTC) improves language model responses by spending additional computation at inference time, and the right amount of compute depends on the prompt. Adaptive TTC methods dynamically allocate compute based on signals of response quality such as observed rewards, often by stopping once the signal exceeds a fixed threshold; for Best-of- sampling, a widely used test-time compute method, with reward as the signal, this is the same as stopping once the expected reward improvement falls below a fixed cost. Adaptive TTC generally measures cost by the number of generations or tokens, which suits fixed offline workloads. But in online serving, latency is also a cost, and can vary significantly: it grows with server load and is affected by prompt and response lengths, so a method using a fixed threshold spends too little compute when generation is fast and too much when it is slow. We propose a two-stage adaptive Best-of- algorithm that draws an initial batch of responses, then uses the observed rewards and the time taken to generate and score them to decide whether to draw a second batch and at what size by comparing expected improvement in reward against predicted cost: it draws a second batch when the first batch's best reward is below a threshold that decreases with the first batch's latency, so it is less likely to draw one when the first was slow, and more likely when it was fast, with no need to explicitly measure server load. We map each reward to its value under the cumulative distribution function (CDF) of the prompt's reward distribution, so that the same tradeoff parameters can be reused across tasks without returning; a regression fitted offline on other prompts predicts a distribution for the CDF value of the first batch's best reward, from which the expected improvement follows in closed form. We evaluate the method by simulation on a preference-based alignment benchmark, measuring cost as generations-equivalent cost – the number of generations plus the latency, converted to generations. The method reaches Best-of-'s reward at lower generations-equivalent cost, and conditioning on the measured first-batch latency saves at least as much of that cost as fixed-threshold (latency-unaware) baselines, and saves more when latency is highly variable, when latency grows with batch size, and when the second batch's latency is highly predictable from the first's.
1 INTRODUCTION
Test-time compute (TTC) methods improve the quality of language model (LM) outputs by spending additional computation at inference time (Welleck et al., 2024; Snell et al., 2025). A central challenge is to decide how much compute to spend per prompt: too little produces lower-quality responses, while too much wastes compute. The right amount of compute depends on the prompt: easy prompts, such as simple fact lookups, need very little compute, while hard prompts, such as complex mathematics problems or problems with high response quality requirements, continue to benefit from additional compute.
A line of recent work proposes adaptive test-time compute algorithms, which allocate less compute to easier prompts and more to harder ones. Many of them work by using signals of response quality such as observed rewards, curtailing generation when additional response generations or thinking tokens are unlikely to improve the final response; a common way of doing this is by stopping generation

(a)

(b)
Figure 1: (a) Our policy draws a second batch after a fast first batch and stops after a slow one. (b) It draws a second batch, of adaptively chosen size, when the first batch's CDF-transformed best reward is below a threshold that falls with the first batch's latency ; the latency-unaware policy's threshold is fixed (Appendix B.2). Grey: the distribution of . Settings (Section 4.1): known, , , , , .
once a quality signal, such as reward, exceeds a fixed threshold. Such policies are usually heuristics, setting the threshold ad-hoc or by optimizing on a fixed validation dataset.
These methods almost universally evaluate cost by the number of tokens or generations used, which is appropriate for fixed offline workloads. But test-time compute, notably in reasoning models, is also widely deployed in online serving (Xiang et al., 2026; Zhang et al., 2026), where many requests are being processed concurrently and the latency it takes to serve each request needs to be taken into account in order to ensure consistent system throughput and overall user satisfaction. Furthermore, in these scenarios the latency varies significantly: it grows with system load, and is also affected by prompt and output lengths (Section 2.2). A method that stops at a fixed threshold therefore spends too little compute when generation is fast (continuing would be cheap) and too much when it is slow (continuing is expensive).
We focus on Best-of- sampling, a widely used TTC method: given a prompt, generate responses independently from the LM, score each with a reward model, and return the highest-scoring response (Section 2.1). One way to make Best-of- adaptive is to generate responses, or batches of responses, sequentially until the reward exceeds a threshold, or equivalently until the expected reward improvement from continuing falls below a fixed cost; when the reward distribution is known, the threshold is fixed and this threshold policy is optimal for a cost-penalized reward objective, which some adaptive Best-of- works (Kalayci et al., 2025; Wan et al., 2026) explicitly model and optimize. Because the responses are independent, all can be generated in parallel if capacity allows, so generating one response at a time, although optimal for saving generations, is far from optimal when latency is taken into account.
We propose a two-stage adaptive Best-of- policy, novel among adaptive Best-of- methods even disregarding latency awareness; we show that significant cost savings can be achieved even with this two-batch limitation, and argue that more batches would incur too much latency in online serving. We first generate a batch of responses and observe their rewards together with the latency taken to generate and score them. Next, we draw a second batch, and choose its size , only when the expected reward improvement from generating the second batch exceeds its predicted cost – which depends on both its latency and batch size . The key insight is that is an informative predictor of : whatever makes the first batch slow – server load, scheduling, prompt length and response lengths – largely persists over the short interval before the second batch is submitted. The policy is less likely to generate a second batch when generation is slow, whatever the cause, with no explicit load monitoring required; it is also a threshold-based stopping policy, where the threshold decreases with (Figure 1). Tang et al. (2026) also reduce a threshold when load is high, for chain-of-thought and based on measured load, but to our knowledge, no prior adaptive TTC method conditions its compute decisions on real-time measured latency. We use a reward transformation based on the prompt-conditional cumulative distribution function (CDF). Because reward distributions have arbitrarily different scales across prompts, language models, and reward models, the transformation makes the tradeoff parameters scale-free: the same values can be reused across tasks without per-task retuning. To predict the expected CDF-transformed reward improvement from the first-batch rewards, we combine simple parametric estimation with a regression model fitted offline on other prompts' rewards that predicts a Beta distribution for the CDF value of the first batch's maximum reward, yielding a closed-form expected improvement requiring no Monte Carlo estimation. Empirically, measuring cost as generations-equivalent cost – the number of generations plus the latency, converted to generations – our policy reaches Best-of-'s reward at lower cost, more so with adaptive batch sizes, and conditioning on saves at least as much of that cost as fixed-threshold (latency-unaware) baselines, saving more when latency is highly variable, when it grows with batch size, and when the second batch's latency is highly correlated with – and thus highly predictable from – the first's.
Adaptive Best-of-. Several recent methods are specifically tailored to Best-of-. Kalayci et al. (2025) cast inference-time alignment as an infinite-horizon Pandora's Box problem (Weitzman, 1979), generating responses one at a time and stopping once a reward exceeds an estimated Gittins index. Their main experiments are sequential, impractical in parallel serving stacks, where doubling per-request latency to halve compute is rarely worthwhile. Similar to ours, they use a reward transformation that makes reward scales comparable across prompts: a heuristic "acceptance probability", from a Bradley–Terry surrogate, which is less principled than our CDF transformation (Section 2.3). BEACON (Wan et al., 2026) places a conjugate Normal prior on a prompt's rewards and stops when a Bayesian index falls below a fixed per-sample cost, in its parallel variant updating the posterior after each fixed-size batch; LAND (Oostermeijer & Jones, 2026) instead fits a mixture of reward distributions on calibration prompts and stops when the expected improvement of another response falls below a cost set to meet a target average number of generations; and Manvi et al. (2024) resample in geometrically growing batches until a fine-tuned self-evaluation's win-or-tie probability – equivalently a predicted CDF value of the response's reward up to a tie tolerance, similar to our CDF transformation – exceeds a fixed threshold. Each of these four draws responses or batches until its signal exceeds a threshold, as our latency-unaware baseline does, but is not capped at two batches; the threshold is fixed offline in Manvi et al.'s method, and in the other three is recomputed from a fixed cost and the updated reward distribution estimate. These problems can be modeled as a batched Pandora's Box problem with a known per-batch setup cost as considered in Dughmi et al. (2026); with a known reward distribution and unlimited batches, the optimal policy draws batches of a fixed size until the maximum reward exceeds a fixed threshold. Capped at two batches, the optimal second batch size depends on the first batch (our adaptive batch size policy).
Speculative Rejection (Sun et al., 2024) prunes low-reward responses mid-generation from extrapolated partial scores, and ST-BoN (Wang et al., 2025) keeps the generation whose early hidden states agree most with the others'. Both reject candidates before decoding completes rather than allocating from the rewards of completed ones; both could compose with our rule.
Damani et al. (2024) make Best-of- allocation input-adaptive by training an auxiliary model to predict each prompt's marginal reward gain from additional samples, then distributing a fixed total budget across a batch of prompts by those predictions; the model must be retrained for each new domain, LM, decoding strategy, or budget. AdaBoN (Raman et al., 2025) retains the input-adaptive idea but needs no auxiliary training: as we do, it draws two batches, sizing the second from the first batch's rewards. In both, however, adaptivity comes from amortizing a budget across many prompts in a fixed offline workload; for a single prompt, the relevant case in online serving, AdaBoN always draws the second batch at the maximum budget, matching Best-of-'s generations at twice the latency, and so is strictly dominated by it.
Load- and latency-aware test-time compute. Fu et al. (2025) integrate adaptive test-time compute with an online serving stack. Their certainindex, a reasoning-progress signal defined separately for each TTC algorithm – self-consistency, Monte Carlo tree search (MCTS) (Hao et al., 2023; Wan et al., 2024), chain-of-thought, and Rebase (Wu et al., 2025) – is the signal of a fixed-threshold stopping rule within a fixed compute cap, and their Dynasor system schedules the workloads on SGLang (Zheng et al., 2024). The threshold is set offline by validation-accuracy profiling, not derived from a quality–cost objective, so it must be re-tuned for each (algorithm, dataset) pair. Dynasor is load-aware in scheduling but not in stopping. For Best-of-, their structure amounts to our latency-unaware, fixed batch size variant (Section 3). Huang et al. (2025) maximize, as we do, a quality measure (accuracy) minus penalties on token count and latency. Their adaptivity lies in a trained probe that predicts accuracy from the prompt embedding and strategy features, used to choose a TTC strategy and budget per query before generation rather than mid-generation; the costs are each strategy’s average token count and wall-clock time, precomputed on the training set, so they do not respond to load at request time. The only method we know of whose compute choice does is LASER (Tang et al., 2026), which ties the chain-of-thought early-exit threshold of DEER (Yang et al., 2026) to the number of active requests on an edge server through a hand-tuned map; ours instead follows from a reward–latency objective and responds to the request’s own measured latency, with no access to server internals, and is applied to Best-of- rather than chain-of-thought.
2 PRELIMINARIES
2.1 LANGUAGE MODELS, REWARD MODELS, AND BEST-OF- SAMPLING
Let denote the space of prompts and denote the space of responses. A language model (LM) is a mapping from prompts to distributions over responses. A reward model is a function that maps a prompt and a response to a real number, with the property that for a fixed prompt, responses with higher reward values are preferable to responses with lower reward values. The reward model may capture human preferences for alignment (Ouyang et al., 2022; Stiennon et al., 2020), or measure correctness for math and coding tasks (Cobbe et al., 2021). Given a prompt , an LM , and a reward model , denote by the distribution over rewards when . We will write for the CDF of when the LM and reward model are fixed and clear from context.
Best-of- sampling draws responses , evaluates rewards , and returns the response with . Additional generations have diminishing marginal returns (Raman et al., 2025). Best-of- therefore induces a fundamental reward–compute tradeoff: larger yields higher expected reward at the price of additional generation cost.
2.2 LLM SERVING AND RESPONSE LATENCY
We consider Best-of- running on a serving system that hosts and and processes many concurrent requests, as in some deployed applications (Irvine et al., 2023; Zeng et al., 2023); we take that stack as given. We measure cost by two quantities the client observes: the number of generations drawn, a proxy for the client’s token cost and the system’s compute cost, and the response latency , the wall-clock time between submitting a request and receiving its scored outputs.
Unlike the number of generations, latency is not a function of the algorithm’s compute demand alone. We submit the responses of a draw together, as a single batch, and observe one wall-clock latency for the batch to be generated and scored. Serving systems interleave concurrent requests (Kwon et al., 2023; Yu et al., 2022), so depends on the server state – the other requests in flight – as well as on . Load raises latency in two ways: more sequences decoded together can lengthen each decoding step, raising the time per output token; and when the server is full, new requests wait to begin decoding, raising the time to first token (Mitzenmacher & Shahout, 2025). Larger batches can take longer for three reasons: when the server cannot decode all responses at once, some wait to begin decoding, and latency approaches the sum of their decoding times rather than the longest; when they are decoded in parallel, the batch completes only when its longest response does, which is longer in expectation for larger ; and its sequences add to those decoded together, raising the time per output token, though negligibly when is small relative to the number of sequences the server is decoding. Our method allows latency to depend on batch size, and the experiments of Section 4 vary how much it does (Section 4.1).
We assume that requests from adaptive policies such as ours are a small share of the server's load, the rest being, for example, single-response or fixed Best-of-N requests. Their stopping decisions then do not materially change the load that other clients face, so we may optimize a single client's objective rather than an equilibrium among clients; if most requests came from adaptive policies, their stopping decisions would jointly set the load. Beyond this, we treat the form of latency as unknown to the client and rely on only two structural facts: that one batch's latency is informative about that of later batches submitted to the same server in the near future, and that the first batch's latency is measured before the second batch must be decided.
2.3 THE CDF REWARD TRANSFORMATION
Preference reward models are trained via the Bradley-Terry objective, which captures only relative preferences within a prompt; raw scores are therefore not comparable across prompts, LMs, or reward functions, making it unclear what it means to subtract a latency cost from a raw reward. The CDF transformation maps each reward to its prompt-conditional CDF value – equivalently, the probability that a fresh draw from the LM would score lower, i.e., a win rate. This yields two benefits: (i) scale-free parameters – the same applies across tasks without returning, because regardless of reward scale; and (ii) a closed-form expected improvement – since for , the quantity derived in Section 3.1 has an analytic expression requiring no Monte Carlo estimation. For outcome-based reward models (e.g., math or coding accuracy), whose rewards are comparable across prompts, the CDF transform remains valid but optimizes per-prompt relative performance; the identity transformation, with EI computed by Monte Carlo, optimizes mean accuracy instead. Additionally, the closed form for requires a continuous reward distribution , so that ; for discrete rewards, such as binary pass/fail, EI must be computed from the discrete distribution.
3 LATENCY-AWARE TWO-STAGE BEST-OF-N
Assume we are given parameters , which control the tradeoff between obtaining a response with high final reward and incurring low generation cost and latency, and finite sets of batch sizes to choose from in the first and second batches (our proposed adaptive batch size policy (Section 3.2) sets ). Throughout, we apply the CDF transformation to rewards (Section 2.3).
When a new prompt (request) is received, an initial batch of responses is requested at once, generated and scored with a reward model, resulting in rewards and giving a maximum reward of . Generating and scoring the batch is measured to take seconds and incurs a cost of .
Next, the policy picks an action from the following:
-
Generate another batch of a chosen size of new responses, giving rewards and a maximum reward of for the batch. Generating and scoring it is measured to take seconds and incurs a cost of , and the highest-reward response is chosen with a final utility of .
-
Stop generation () and output the response with highest reward observed so far, collecting a final utility of .
The action is chosen based on the state , which includes the rewards observed in the first batch and the latency the first batch took. We want to choose the policy that maximizes the profit , defined as the expected net utility:
where is the number of batches, and is the expectation under policy .
3.1 THE LATENCY-AWARE POLICY
Here we describe the optimal policy that maximizes (1), which we call the latency-aware policy.
Second-stage decision. We will start with deriving the optimal decision of whether to generate the second batch, and if so at what size . Denote as the Q-function of taking action in state ; clearly , and
where is the expected latency of the second batch given everything observed after the first. In practice it may be estimated by regression from server logs, and we use its exact value in our simulation-based experiments (Section 4.1). Now, define . We can compute it as:
where . The optimal policy for the second batch, which we call the latency-aware policy, is as follows:
-
Find
-
If , then generate a second batch of size . Otherwise, stop.
Due to the CDF transformation resulting in uniform reward distributions , the expected reward improvement term in can be computed in closed form as follows:
where is defined for as follows (the third term vanishes when u < 0):
In practice, the CDF is unknown, so must be estimated (Section 3.3). We call the policies that use the true the oracle policies.
Selection of . For both the latency-aware and latency-unaware policies (Section 3.2), the first batch size is pre-set to maximize the profit:
where is the profit-to-go of policy from the empty initial state with initial batch size . By the Bellman equation,
where is the expected latency of a first batch of size , estimable in practice from historical latency logs. We estimate using numerical integration and Monte Carlo sampling, assuming the oracle policy is followed; details are given in Appendix A.
3.2 BASELINES: LATENCY-UNAWARE AND FIXED BATCH SIZE POLICIES
For baseline comparison, we compare to a latency-unaware policy, which does not have access to the latency measurement and therefore proceeds the same as the latency-aware policy but replaces with in , using instead:
Like existing adaptive Best-of-N methods, the latency-unaware policy stops once its signal, here , exceeds a fixed threshold; in contrast, the latency-aware policy's threshold decreases with (Appendix B.2 and Figure 1b).
We propose an adaptive batch size policy, which uses for some chosen finite set of allowed batch sizes; this allows the second batch size to be adaptively chosen. We compare it to its fixed batch size baseline counterpart, meant to resemble the fixed-threshold rules of prior works Fu et al. (2025); Manvi et al. (2024); Wan et al. (2026), which pre-commit to the second batch size: it sets and , where and are jointly selected from the same set to maximize the profit in advance:
3.3 ESTIMATING EI WITH SHIFTED EXPONENTIAL AND PREDICTED BETA
We estimate from the first batch's rewards by an estimated CDF , fitting a shifted-exponential model to the exponentiated first-batch rewards above their empirical -quantile, for a tail level (we use ), following the approach used by Kalayci et al. (2025). Because this model is fitted to , it is not invariant to the scale of the reward, and reward models differ in scale by orders of magnitude; we therefore first rescale rewards to unit median within-prompt standard deviation, using one constant estimated offline. Appendix D.1 defines the estimator and compares it with five alternatives, and Appendix D.2 treats the rescaling.
A plug-in approach uses . This falls short in two ways. First, overestimates (Appendix D.1), so the plug-in underestimates and the policy draws a second batch less often than it should. Second, removing this bias of is not enough: is convex in , so by Jensen's inequality
and the debiased plug-in is still too low.
We therefore predict directly, by predicting a Beta distribution for . Since is a polynomial in and , its expectation follows in closed form from the Beta's moments:
which the policy uses in place of , for every at once. We call this estimate the predicted Beta. Its parameters and are matched to a mean and a variance of predicted by gradient-boosted trees, which take as inputs, besides and , a few other CDF estimates (the shifted-exponential estimator at other tail levels ) and the first batch's reward quantiles; the conditioning above then includes these inputs too. The trees are fitted offline on first batches drawn from other prompts with many scored responses each, with the normalized rank of among a prompt's responses (Appendix C) standing in for . Online, the prediction takes negligible time compared to generating a batch. Most of the improvement over the plug-in comes from debiasing and from the additional inputs; predicting the whole Beta distribution rather than only its mean adds a smaller one. Appendix E gives the details and compares the predicted Beta with the plug-in and with estimates that only debias or only add inputs.
4 EXPERIMENTS
We evaluate our method by simulation. Section 4.1 describes the experimental setup, including the latency model and definition of generations-equivalent cost; Section 4.2 varies the cost of latency at one latency model setting, comparing our policy with the latency-unaware policy, with fixed batch sizes, and with Best-of-; and Section 4.3 varies the latency model.
4.1 EXPERIMENTAL SETUP
Every experiment below is run on 24 configurations, each a combination of a language model, a reward model and a prompt dataset: four instruction-tuned language models, Llama-3.1-8B-Instruct,
Gemma-2-9B-it, Mistral-7B-Instruct-v0.3 and Qwen2.5-7B-Instruct (Llama, Gemma, Mistral and Qwen for short); three reward models, FsfairX-LLaMA3-RM-v0.1, RM-Mistral-7B and ArmoRM-Llama3-8B-v0.1 (FsfairX, RM-Mistral and ArmoRM); and 100 prompts from each of two prompt datasets, AlpacaFarm (Dubois et al., 2023) and HH-RLHF (Bai et al., 2022). Appendix I gives the sources and licenses of the models and datasets. Every figure and table in this section reports the average over the 24 configurations, so that no result rests on a single reward-distribution shape. Appendix F.2 reports each configuration individually; Appendix G discusses why one (, ) pair is meaningful across all of them. In both datasets, each prompt , has a precomputed pool of 960 rewards sampled from . For evaluation, since the true CDFs are unknown, we approximate by the normalized rank of within , defined as where is the rank of in , an unbiased estimate of (Appendix C).
All policies choose their batch sizes from ; the choice of 320 allows two batches to fit in a prompt's pool of 960 and covers typical batch sizes considered in batched adaptive Best-of- works (Raman et al., 2025; Sun et al., 2024). For each (, ) pair and policy, we run Monte Carlo trials per prompt . Trial draws latencies and using the latency model described below, and a Stage 1 set of rewards without replacement from ; if the policy continues with more, the second batch is drawn without replacement from .
Latency model. Given the batch sizes and , batch takes , where the base latencies are drawn independently of the rewards from
We fix the mean at s and vary the coefficient of variation ; these relate to the log-normal parameters by and . The factor splits a batch's latency into a share that does not depend on its size and a share proportional to it: is latency independent of batch size, as when a batch's responses are decoded in parallel, and latency proportional to it, as when a full server decodes them in turn (Section 2.2). is the correlation of and . The latency-aware policy predicts with , which is at , and the latency-unaware policy predicts .
Policies. Our policy is the adaptive batch size, latency-aware policy, estimating EI using the predicted Beta (Section 3.3), where in each configuration, the regressors are fitted on half of its prompts and applied to the other half, and vice versa. We compare it with the latency-unaware policy, with the fixed batch size variants of both (Section 3.2), and with Best-of- (which has expected latency ). Each configuration's Best-of- reference is computed on its own reward pool. When is small, the that maximizes Best-of-'s can exceed 320, and the comparison would then be decided by the batch limit rather than by the policies; we therefore take 31 geometrically spaced values of , where this is at most 320 at every and : at , Best-of-'s latency does not depend on , so this depends on alone and is at most 318, its value at ; at , the latency grows with , so a positive only lowers this . Appendix F.4 shows our policy's mean number of generations, mean latency and mean normalized reward rank over these values of and a grid of values of .
We also compare our policies with their oracle counterparts, approximating it by replacing in by the normalized rank . The gap between the policies using estimated EI and their oracle counterparts shows the realized cost of estimating .
Generations-equivalent cost. The objective of Section 3 is mean reward minus cost: , where and are a policy's mean maximum CDF-transformed reward, total number of generations, and latency. With , this is , and we call the policy's generations-equivalent cost. is in units of generations per second, so is the latency expressed in generations. solves : it is the number of generations that, with no latency, would cost the same. We fix , sweep along the ray with , and plot each policy's mean normalized reward rank against its generations-equivalent cost. Best-of-'s curve is its mean normalized reward rank against , which

Figure 2: Top: mean normalized reward rank against generations-equivalent cost (mean generations , mean latency ). Bottom: proportion of generations-equivalent cost saved at equal mean normalized reward rank against Best-of-'s generations-equivalent cost . -axis in log scale. Lines are along a ray for and (columns), all at , , , batch sizes , averaged over the 24 configurations. Colour is the policy (red: ours); dash-dot with plus signs: predicted Beta (ours); dashed with circles: oracle. Leftmost column shows , where the latency-aware and latency-unaware policies coincide; Best-of-'s theoretical reward in dashed gold, fully sequential bound (Appendix B.1) in dashed green (mean reward , proportion saved ). Results for , in Appendix F.1; per-configuration results in Appendix F.2.
Table 1: Proportion (%) of generations-equivalent cost saved at the reward of Best-of- with , by the adaptive batch size policies with batch sizes , at and , averaged over the 24 configurations. At the two latency rules are one policy and does not apply.
| predicted Beta (ours) | oracle | ||||
|---|---|---|---|---|---|
| latency-unaware | latency-aware | latency-unaware | latency-aware | ||
| - | 0 | 10.1 | 10.1 | 25.0 | 25.0 |
| 0 | -0.3 | 0.5 | 1.8 | 4.1 | |
| 0 | 0.0 | 0.0 | 0.0 | 0.1 | |
| 0.5 | -0.5 | 2.6 | 7.8 | 11.3 | |
| 0.5 | -0.1 | 2.6 | 1.3 | 6.5 | |
| 1 | 10.3 | 14.0 | 24.9 | 28.2 | |
| 1 | 9.9 | 28.2 | 24.7 | 39.6 | |
increases in . We compare a policy with Best-of- at Best-of-'s reward: if Best-of- reaches a mean normalized reward rank at generations-equivalent cost and the policy reaches it at , the proportion of generations-equivalent cost saved is , reported in percent throughout.
We report means of normalized reward rank, latency and generations over all prompts and trials, as point estimates without error bars, which are hard to compute correctly for draws without replacement; all policies and pairs share the same seeded draws, so comparisons are paired (Appendix H).
4.2 LATENCY AWARENESS AND ADAPTIVE BATCH SIZES AT VARYING LATENCY COST
Figure 2 fixes the latency model at , and . Results for are shown here because we expect a typical server to exhibit a dependence of latency on batch size somewhere in between the extremes of and . At every reward level, our policy reaches Best-of-'s reward with less generations-equivalent cost , and saves at least as much as its latency-unaware counterpart. Depending on and , the policies' savings generally either grow with , or are the

Figure 3: The proportion of generations-equivalent cost (mean generations , mean latency ) saved, at equal mean normalized reward rank, against Best-of-'s generations-equivalent cost (log scale), at and (rows) and , 0.5 and 1 (columns), adaptive batch sizes , averaged over the 24 configurations. Our policy (red) is shown at and 2 with , and at with . Since it never sees , the latency-unaware policy (purple) behaves the same at every and so only needs one line.
same across . As grows, the latency-unaware policy's saving disappears: at and , with the predicted Beta, it is close to Best-of- along the whole curve. The adaptive batch size policies save slightly more than their fixed batch size counterparts, differing mainly when , or when (see Appendix F.1).
At there is no latency cost and the generations-equivalent cost is the number of generations. As shown in Table 1, at our policy uses 10.1% less generations-equivalent cost than Best-of-, compared to the oracle 25.0% and the fully sequential bound of 48.75% ( at ).
4.3 HOW THE BENEFIT DEPENDS ON THE LATENCY MODEL
Figure 3 plots the adaptive batch size policies at various latency model settings and shows that the latency-aware policy's advantage over the latency-unaware policy is higher when latency grows more with batch size (high ), is highly variable (high ), and is highly correlated between batches (high ). Appendix F.3 sweeps and compares with a misspecified latency predictor that assumes .
Table 1 shows the same results at Best-of-40's reward. For both the latency-unaware and latency-aware policies, the saving generally increases with increasing . Furthermore, comparing absolute differences in proportional savings, the saving of the latency-aware policy over the latency-unaware policy generally increases with increasing for the same , and more so for higher .
5 CONCLUSION
We introduced a two-stage adaptive Best-of- algorithm that uses the first batch's observed rewards and its latency , an informative predictor of the second batch's latency, to decide whether to draw a second batch and at what size. A CDF transformation of the rewards yields scale-free tradeoff parameters that require no per-task returning, and a regression fitted offline on other prompts predicts a distribution for the CDF value of the first batch's best reward, from which the expected improvement follows in closed form. Empirically, our method reaches Best-of-'s reward at lower generations-equivalent cost, and conditioning on saves at least as much of that cost as fixed-threshold (latency-unaware) baselines, and more when latency is highly variable, when it grows with batch size, and when the second batch's latency is highly predictable from the first's. Our experiments are simulation-based. An evaluation on a live serving stack with continuous batching (vLLM; Kwon et al., 2023) would show how well the latency assumptions of Section 2.2 hold – that one batch's latency predicts the next's, how much latency grows with batch size, and that adaptive requests like ours are too small a share of the load to shift what others face – and identify the regimes in which our method helps. Fully sequential stopping, outcome-based reward models, and conditioning stopping decisions on measured latency in other test-time compute methods, such as chain-of-thought, are also future work.
AI USE STATEMENT
In this work, we used generative AI tools (large language model coding and writing assistants) extensively. For software, most of the simulation code, analysis scripts, and figure and table scripts were written by AI under our direction; we did not review all of it line by line. For writing, AI drafted and revised most of the manuscript text, including the related work and appendices, and we edited it. AI also assisted in locating related work and preparing bibliography entries, which we checked, with AI assistance, for existence and correct authors, title, and venue.
The research question was developed with AI assistance; the idea of latency adaptivity, the algorithm, and the main-text experiments are the authors' own. The derivations in the appendix were mostly ours, but some of the proofs were conceived by AI, and some of the appendix studies were designed with or by AI. We did not use generative AI to generate or alter experimental data. We take responsibility for the final content of this work.
ETHICS STATEMENT
This work is a simulation study that reuses publicly released prompts, model generations, and reward-model scores from the AlpacaFarm and HH-RLHF datasets (Appendix I); it involves no human subjects, no new data collection, and no release of new model weights or generations. The method allocates inference-time compute and does not change what a language model is able to produce, so it does not introduce new capability risks. Two considerations are worth naming. First, the algorithm optimizes a reward model, and Best-of-N selection inherits whatever biases that reward model carries; our contribution is orthogonal to reward-model quality and does not mitigate such biases. Second, by conditioning on server load, the method makes the amount of compute a request receives depend on when it arrives, so response quality can vary across users for reasons unrelated to their request; a deployment that cares about equal treatment should account for this. The externality of one request's continuation decision on other users' latency is assumed negligible when such requests are a small share of the server's load (Section 2.2); testing this on a live serving stack is future work (Section 5).
REPRODUCIBILITY STATEMENT
All of our results are simulations over precomputed reward pools, and are fully reproducible on CPU. The algorithm and the closed-form quantities it uses are specified in Sections 3 and 3.3, with the derivation of the Q-functions and the optimal policy in Section 3.1. The CDF estimator and its baselines are specified in Appendix D.1. The experimental setup – datasets, language models, reward models, prompt and pool sizes, the (, ) grid, the number of Monte Carlo trials, and the latency model – is given in Section 4.1, and the per-configuration results behind the averages reported in the main text are in Appendix F.2. The datasets and the released reward scores we build on are documented in Appendix I; compute requirements are in Appendix J.
REFERENCES
Pranjal Aggarwal, Aman Madaan, Yiming Yang, and Mausam. Let's sample step by step: Adaptive-consistency for efficient reasoning and coding with LLMs. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pp. 12375–12396, 2023.
Mohammad Ali Alomrani, Yingxue Zhang, Derek Li, Qianyi Sun, Soumyasundar Pal, Zhanguang Zhang, Yaochen Hu, Rohan Deepak Ajwani, Antonios Valkanas, Raika Karimi, Peng Cheng, Yunzhou Wang, Pengyi Liao, Hanrui Huang, Bin Wang, Jianye Hao, and Mark Coates. Reasoning on a budget: A survey of adaptive and controllable test-time compute in llms. CoRR, abs/2507.02076, 2025. doi: 10.48550/ARXIV.2507.02076. URL https://doi.org/10.48550/arXiv.2507.02076.
Yuntao Bai, Andy Jones, Kamal Ndousse, Amanda Askell, Anna Chen, Nova DasSarma, Dawn Drain, Stanislav Fort, Deep Ganguli, Tom Henighan, Nicholas Joseph, Saurav Kadavath, Jackson Kernion, Tom Conerly, Sheer El Showk, Nelson Elhage, Zac Hatfield-Dodds, Danny Hernandez, Tristan Hume, Scott Johnston, Shauna Kravec, Liane Lovitt, Neel Nanda, Catherine Olsson, Dario Amodei, Tom B. Brown, Jack Clark, Sam McCandlish, Chris Olah, Benjamin Mann, and Jared Kaplan. Training a helpful and harmless assistant with reinforcement learning from human feedback. CoRR, abs/2204.05862, 2022. doi: 10.48550/ARXIV.2204.05862. URL https://doi.org/10.48550/arXiv.2204.05862.
Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, Christopher Hesse, and John Schulman. Training verifiers to solve math word problems. CoRR, abs/2110.14168, 2021. URL https://arxiv.org/abs/2110.14168.
Mehul Damani, Idan Shenfeld, Andi Peng, Andreea Bobu, and Jacob Andreas. Learning how hard to think: Input-adaptive allocation of lm computation. arXiv preprint arXiv:2410.04707, 2024.
Yann Dubois, Chen Xuechen Li, Rohan Taori, Tianyi Zhang, Ishaan Gulrajani, Jimmy Ba, Carlos Guestrin, Percy S Liang, and Tatsunori B Hashimoto. Alpacafarm: A simulation framework for methods that learn from human feedback. Advances in Neural Information Processing Systems, 36:30039–30069, 2023.
Shaddin Dughmi, Yusuf Hakan Kalayci, Vasilis Livanos, and Aditya Prasad. Batched pandora's box. arXiv preprint arXiv:2609.04059, 2026.
Yichao Fu, Junda Chen, Siqi Zhu, Zheyu Fu, Zhongdongming Dai, Yonghao Zhuang, Yian Ma, Aurick Qiao, Tajana Rosing, Ion Stoica, et al. Efficiently scaling LLM reasoning programs with certaindex. In The Thirty-ninth Annual Conference on Neural Information Processing Systems, 2025.
Shibo Hao, Yi Gu, Haodi Ma, Joshua Jiahua Hong, Zhen Wang, Daisy Zhe Wang, and Zhiting Hu. Reasoning with language model is planning with world model. In Houda Bouamor, Juan Pino, and Kalika Bali (eds.), Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, EMNLP 2023, Singapore, December 6-10, 2023, pp. 8154–8173. Association for Computational Linguistics, 2023. doi: 10.18653/V1/2023.EMNLP-MAIN.507. URL https://doi.org/10.18653/v1/2023.emnlp-main.507.
Jenny Y. Huang, Mehul Damani, Yousef El-Kurdi, Ramon Astudillo, and Wei Sun. Latency and token-aware test-time compute. arXiv preprint arXiv:2509.09864, 2025.
Robert Irvine, Douglas Boubert, Vyas Raina, Adian Liusie, Ziyi Zhu, Vineet Mudupalli, Aliaksei Korshuk, Zongyi Liu, Fritz Cremer, Valentin Assassi, Christie-Carol Beauchamp, Xiaoding Lu, Thomas Rialan, and William Beauchamp. Rewarding chatbots for real-world engagement with millions of users. arXiv preprint arXiv:2303.06135, 2023.
Yusuf Kalayci, Vinod Raman, and Shaddin Dughmi. Optimal stopping vs best-of-n for inference time optimization. arXiv preprint arXiv:2510.01394, 2025.
Woosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng, Lianmin Zheng, Cody Hao Yu, Joseph Gonzalez, Hao Zhang, and Ion Stoica. Efficient memory management for large language model serving with pagedattention. In Jason Flinn, Margo I. Seltzer, Peter Druschel, Antoine Kaufmann, and Jonathan Mace (eds.), Proceedings of the 29th Symposium on Operating Systems Principles, SOSP 2023, Koblenz, Germany, October 23-26, 2023, pp. 611–626. ACM, 2023. doi: 10.1145/3600006.3613165. URL https://doi.org/10.1145/3600006.3613165.
Yiwei Li, Peiwen Yuan, Shaoxiong Feng, Boyuan Pan, Xinglin Wang, Bin Sun, Heda Wang, and Kan Li. Escape sky-high cost: Early-stopping self-consistency for multi-step reasoning. In International Conference on Learning Representations, 2024.
Rohin Manvi, Anikait Singh, and Stefano Ermon. Adaptive inference-time compute: LLMs can predict if they can do better, even mid-generation. arXiv preprint arXiv:2410.02725, 2024.
Michael Mitzenmacher and Rana Shahout. Queueing, predictions, and large language models: Challenges and open problems. Stochastic Systems, 15(3):195–219, 2025.
Koen Oostermeijer and Teryn Jones. LAND: Learning an adaptive number of draws for Bayesian Best-of-N selection. In Proceedings of the Eleventh Conference on Machine Translation, pp. 520–529, 2026.
Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll L. Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, John Schulman, Jacob Hilton, Fraser Kelton, Luke Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul F. Christiano, Jan Leike, and Ryan Lowe. Training language models to follow instructions with human feedback. In Sanmi Koyejo, S. Mohamed, A. Agarwal, Danielle Belgrave, K. Cho, and A. Oh (eds.), Advances in Neural Information Processing Systems 35: Annual Conference on Neural Information Processing Systems 2022, NeurIPS 2022, New Orleans, LA, USA, November 28 - December 9, 2022, 2022. URL http://papers.nips.cc/paper_files/paper/2022/hash/blefde53be364a73914f58805a001731-Abstract-Conference.html.
Fabian Pedregosa, Gaël Varoquaux, Alexandre Gramfort, Vincent Michel, Bertrand Thirion, Olivier Grisel, Mathieu Blondel, Peter Prettenhofer, Ron Weiss, Vincent Dubourg, Jake Vanderplas, Alexandre Passos, David Cournapeau, Matthieu Brucher, Matthieu Perrot, and Édouard Duchesnay. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12:2825–2830, 2011.
Vinod Raman, Hilal Asi, and Satyen Kale. Abon: Adaptive best-of-n alignment. arXiv preprint arXiv:2505.12050, 2025.
Ziv Scully and Alexander Terenin. The Gittins index: A design principle for decision-making under uncertainty. arXiv preprint arXiv:2506.10872, 2025.
Charlie Victor Snell, Jaehoon Lee, Kelvin Xu, and Aviral Kumar. Scaling LLM test-time compute optimally can be more effective than scaling parameters for reasoning. In The Thirteenth International Conference on Learning Representations, ICLR 2025, Singapore, April 24-28, 2025. OpenReview.net, 2025. URL https://openreview.net/forum?id=4FWAwZtd2n.
Nisan Stiennon, Long Ouyang, Jeffrey Wu, Daniel M. Ziegler, Ryan Lowe, Chelsea Voss, Alec Radford, Dario Amodei, and Paul F. Christiano. Learning to summarize with human feedback. In Hugo Larochelle, Marc'Aurelio Ranzato, Raia Hadsell, Maria-Florina Balcan, and Hsuan-Tien Lin (eds.), Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, 2020. URL https://proceedings.neurips.cc/paper/2020/hash/1f89885d556929e98d3ef9b86448f951-Abstract.html.
Hanshi Sun, Momin Haider, Ruiqi Zhang, Huitao Yang, Jiahao Qiu, Ming Yin, Mengdi Wang, Peter Bartlett, and Andrea Zanette. Fast best-of-n decoding via speculative rejection. Advances in Neural Information Processing Systems, 37:32630–32652, 2024.
Zhiqing Tang, Size Li, Hanshuai Cui, Zilan Huang, Jianxiong Guo, Tian Wang, Yuan Wu, and Weijia Jia. LASER: Load-aware serving with early-exit for reasoning LLMs at the edge. In International Conference on Wireless Artificial Intelligent Computing Systems and Applications (WASA), 2026. arXiv:2606.31580.
Guangya Wan, Zixin Stephen Xu, Sasa Zorc, Manel Baucells, Mengxuan Hu, Hao Wang, and Sheng Li. BEACON: Bayesian optimal stopping for efficient LLM sampling. In Findings of the Association for Computational Linguistics: EMNLP 2026, pp. 2147–2172, 2026.
Ziyu Wan, Xidong Feng, Muning Wen, Stephen Marcus McAleer, Ying Wen, Weinan Zhang, and Jun Wang. Alphazero-like tree-search can guide large language model decoding and training. In Ruslan Salakhutdinov, Zico Kolter, Katherine A. Heller, Adrian Weller, Nuria Oliver, Jonathan Scarlett, and Felix Berkenkamp (eds.), Forty-first International Conference on Machine Learning,
ICML 2024, Vienna, Austria, July 21-27, 2024, volume 235 of Proceedings of Machine Learning Research, pp. 49890–49920. PMLR / OpenReview.net, 2024. URL https://proceedings.mlr.press/v235/wan24c.html.
Xuezhi Wang, Jason Wei, Dale Schuurmans, Quoc V. Le, Ed H. Chi, Sharan Narang, Aakanksha Chowdhery, and Denny Zhou. Self-consistency improves chain of thought reasoning in language models. In The Eleventh International Conference on Learning Representations, ICLR 2023, Kigali, Rwanda, May 1-5, 2023. OpenReview.net, 2023. URL https://openreview.net/forum?id=1PL1NIMMrw.
Yiming Wang, Pei Zhang, Siyuan Huang, Baosong Yang, Zhuosheng Zhang, Fei Huang, and Rui Wang. Sampling-efficient test-time scaling: Self-estimating the best-of-n sampling in early decoding. CoRR, abs/2503.01422, 2025. doi: 10.48550/ARXIV.2503.01422. URL https://doi.org/10.48550/arXiv.2503.01422.
Martin L. Weitzman. Optimal search for the best alternative. Econometrica, 47(3):641–654, 1979. doi: 10.2307/1910412.
Sean Welleck, Amanda Bertsch, Matthew Finlayson, Hailey Schoelkopf, Alex Xie, Graham Neubig, Ilia Kulikov, and Zaïd Harchaoui. From decoding to meta-generation: Inference-time algorithms for large language models. Trans. Mach. Learn. Res., 2024, 2024. URL https://openreview.net/forum?id=eskQMcIbMS.
Yangzhen Wu, Zhiqing Sun, Shanda Li, Sean Welleck, and Yiming Yang. Inference scaling laws: An empirical analysis of compute-optimal inference for LLM problem-solving. In The Thirteenth International Conference on Learning Representations, ICLR 2025, Singapore, April 24-28, 2025. OpenReview.net, 2025. URL https://openreview.net/forum?id=VNckp7JEHn.
Yuxing Xiang, Xue Li, Kun Qian, Yan Zhang, Wenyuan Yu, Ennan Zhai, Xin Jin, and Jingren Zhou. ServeGen: Workload characterization and generation of large language model serving in production. In 23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI 26), pp. 1845–1859, 2026.
Chenxu Yang, Qingyi Si, Yongjie Duan, Zheliang Zhu, Chenyu Zhu, Qiaowei Li, Minghui Chen, Zheng Lin, and Weiping Wang. Dynamic early exit in reasoning models. In International Conference on Learning Representations, 2026.
Gyeong-In Yu, Joo Seong Jeong, Geon-Woo Kim, Soojeong Kim, and Byung-Gon Chun. Orca: A distributed serving system for transformer-based generative models. In Marcos K. Aguilera and Hakim Weatherspoon (eds.), 16th USENIX Symposium on Operating Systems Design and Implementation, OSDI 2022, Carlsbad, CA, USA, July 11-13, 2022, pp. 521–538. USENIX Association, 2022. URL https://www.usenix.org/conference/osdi22/presentation/yu.
Jingying Zeng, Jaewon Yang, Waleed Malik, Xiao Yan, Richard Huang, and Qi He. Let AI entertain you: Increasing user engagement with generative AI and rejection sampling. arXiv preprint arXiv:2312.12457, 2023.
Tiancheng Zhang, Shaoyuan Huang, Mingyuan Wang, Yunfeng Zhao, Xiaofei Wang, and Wenyu Wang. Fineserve: A fine-grained dataset and characterization of global llm serving workloads. arXiv preprint arXiv:2607.19349, 2026.
Lianmin Zheng, Liangsheng Yin, Zhiqiang Xie, Chuyue Sun, Jeff Huang, Cody Hao Yu, Shiyi Cao, Christos Kozyrakis, Ion Stoica, Joseph E. Gonzalez, Clark Barrett, and Ying Sheng. SGLang: Efficient execution of structured language model programs. In A. Globerson, L. Mackey, D. Belgrave, A. Fan, U. Paquet, J. Tomczak, and C. Zhang (eds.), Advances in Neural Information Processing Systems, volume 37, pp. 62557–62583. Curran Associates, Inc., 2024. doi: 10.52202/079017-2000. URL https://proceedings.neurips.cc/paper_files/paper/2024/file/724be4472168f31ba1c9ac630f15dec8-Paper-Conference.pdf.
A OPTIMAL SELECTION
The optimal first batch size is . For the latency-aware policy :
where
For the latency-unaware policy :
where , defining for and .
Here is written in terms of the true : the policy is evaluated at the second-batch latency it actually incurs, though its decision uses . We show that agrees in expectation with under the following condition on the latency model:
Of the two independences in (4), that from holds when requests from adaptive policies are a small share of the server's load (Section 2.2): the first batch completes before the second is submitted, so it can affect only through the state it leaves the server in, and one batch does not perturb that state. That from the rewards is a separate condition, response length being correlated with both reward and latency; it still leaves free to depend on , which is the dependence the latency-aware policy uses. Both hold in our experiments, where, given , the second batch's latency is drawn independently of the rewards and of , and from the same distribution for every prompt.
Since and for , the law of total expectation, splitting on the value of , gives
Conditioning on is not the same as conditioning on the second batch having size : does not involve , so the event is a statement about the first-batch rewards, and conditioning on it reweights anything correlated with them. Condition (4) is what rules this out, holding as it does at every value of the rewards; averaging it over those values for which therefore returns the same value, which gives the last equality above:
The first equality is the definition of ; the second and third are the law of total expectation, the event being determined by the first-batch rewards; the fourth uses (4).
Under (4),
where ; the two policies' Q-functions ( and ) then have identical structure, differing only in whether the second-batch latency is (latency-aware) or (latency-unaware). Otherwise must be evaluated as written, with the true inside.
Computing and under the CDF transformation. These quantities are computed offline to determine the initial batch size , and for the fixed batch size policies the second batch size . Under the CDF transformation, and for the latency-unaware policy under (4), both policies admit the decomposition
where is the expected maximum of i.i.d. Unif[0,1] rewards, and
To compute these we specialize to the case simulated in Section 4, in which the second batch's expected latency depends on only through and , so that we may write it , and in which is independent of the first-batch rewards. Writing for the distribution of given , and since has density on ,
with the integrals over evaluated by quadrature and the expectation over by Monte Carlo over samples from .
If is not independent of the first-batch rewards, or if depends on through more than and , this factorization does not apply; one may then either model the distribution of given (the first-batch rewards together with ) and estimate by Monte Carlo over draws of , from which both and follow, or retain the factorization as an approximation. Dependence of this kind is plausible in deployment, since response length correlates with both reward and latency. Either way, only the offline choice of is affected: the online stopping rule is not affected.
B CONNECTION TO PANDORA'S BOX AND TO FIXED-THRESHOLD RULES
B.1 FULLY SEQUENTIAL MEAN REWARD UPPER BOUND
In the column of Figure 2, the dashed green curve is the optimal fully sequential (one-at-a-time) stopping policy on CDF-transformed rewards: in the top row its mean maximum reward against its expected number of generations , and in the bottom row the proportion of Best-of-'s generations it saves at Best-of-'s reward, derived below. This is the limiting case of the multi-stage extension of Section 3 in which for every stage and the horizon is unbounded - i.e. the Pandora's Box problem with infinitely many i.i.d. boxes considered by Kalayci et al. (2025). Since our two-stage Best-of- setting is a constrained version of this problem, no two-stage policy can exceed this curve.
For a fixed prompt , write for the CDF-transformed reward of generation . With per-generation cost , the optimal policy is the Gittins index policy (Weitzman, 1979; Scully & Terenin, 2025), which stops after generations, the first time the best value drawn exceeds the Gittins index of a further generation, the solution of , i.e. . We can easily find that, in general, the optimal profit equals the Gittins index,
and , so . Rearranging,
Let be the fully sequential policy's expected number of generations. Since it generates one generation at a time, we have . Substituting , this gives:
In the proportion-saved view, let be the used for Best-of-. The fully sequential policy reaches Best-of-'s mean reward when , which gives
This compares with Best-of-'s theoretical reward ; Figure 2 measures the policies against the empirical Best-of-, whose reward is slightly lower because of tied rewards (Appendix C).
We include this curve in the plots as a reward-only reference: it represents the most reward-adaptive policy possible – evaluating generations one at a time and deciding after each whether to continue – and so upper-bounds the mean reward attainable by any policy with the same expected number of generations , including any two-stage policy considered in this paper. This reference says nothing about latency: a fully sequential policy that draws generations one at a time incurs roughly times the latency of a single batch of size , which is precisely the regime our two-stage formulation is designed to avoid. The curve is therefore informative as a ceiling on the reward axis only, and the latency cost of actually attaining it is not reflected in the plot.
B.2 THE STOPPING RULE IS A THRESHOLD ON
Write for the latency-aware policy and for the latency-unaware policy, so that the continuation value of either is (Section 3). The function (defined in (2), Section 3.1) is continuous on and, since its derivative is for , with as in its definition, strictly decreasing on , from to . So, as , there is a unique with : the Gittins index (Weitzman, 1979; Scully & Terenin, 2025) of a box in the Pandora's Box problem with opening cost whose value is the maximum of independent draws, the CDF values of the second batch's rewards.
Proposition B.1. Either policy stops after the first batch if and only if .
Proof.
The third equivalence holds because is strictly decreasing on and equals at .
For the latency-unaware policy, depends only on , and , so the threshold is fixed before any request arrives: this is the fixed-threshold stopping rule of existing adaptive Best-of- methods (Section 1.1), applied to the CDF value of the best first-batch reward. Every threshold in is attained by some , so, up to the range and resolution of the grid, sweeping the tradeoff parameters as in Section 4.1 traces the latency-unaware policy over all fixed thresholds on this signal. For the latency-aware policy, , and with it , depends on through , so its threshold moves from request to request; with the predictor of Section 4.1, which increases with when , the threshold falls as grows.
C MEASURING RESPONSE QUALITY: THE NORMALIZED REWARD RANK
We score a returned response by its normalized reward rank within its prompt's pool. Let be the rank of among the rewards of , with tied rewards given their average rank; the normalized reward rank is . The oracle policies use this quantity in place of .
Without ties, the normalized reward rank is an unbiased estimate of the true CDF value . The pool is an i.i.d. sample from , so evaluated at its -th smallest reward is distributed as the -th order statistic of i.i.d. variables, whose mean is . For Best-of- and the oracle policies, which select by rank alone, the mean normalized reward rank is therefore an unbiased estimate of , the reward term of the objective ; for the policies using estimated EI, which also use reward values, it is unbiased to close approximation.
The empirical Best-of- curve in the figures and tables is computed exactly rather than by simulation. Sort a prompt's normalized reward ranks as . Best-of- draws of the responses without replacement and returns the best, and the best is the response of rank in this order; exactly when the draw contains response and of the responses below it. Its mean normalized reward rank is therefore
averaged over the prompts; tied rewards are simply equal entries of the sorted list.
The Best-of- theory curve follows directly. Without ties , so the sum is , and : the mean normalized reward rank is exactly , for any pool size . The rewards, however, are stored at bfloat16 precision, so a prompt's pool holds only 6–40% distinct values on average, depending on the configuration. Average ranks are the mean of the scores over all tie-breaks, each of which gives ; since the maximum is convex in the scores, ties can only lower Best-of-'s expected normalized reward rank. The effect is small: for the empirical Best-of- curve lies below by about 0.001 at most in any configuration, and by at most 0.0003 in the average over the 24 configurations plotted in the figures.
D ESTIMATING PRIOR TO REGRESSION
Our method estimates the CDF value of the first batch's best reward and uses the estimate as an input to a regressor that predicts the expected improvement in reward (Section 3.3 and Appendix E). Appendix D.1 compares estimators of for that role. Appendix D.2 describes our reward rescaling method for the shifted exponential estimator, a minor detail.
D.1 COMPARING ESTIMATION METHODS
Here we compare estimators of used as input to the regressor. For an informative comparison of their usefulness as regression inputs, we note that all of these estimators are biased, so we compare them both as they are and after regression-based debiasing (as described in Appendix E). The regressor learns the mean of given its inputs, which removes their bias, so what matters is the accuracy in estimating once its bias is removed: the RMSE after debiasing is a proxy for how useful an estimator is as an input for predicting the expected improvement, whose accuracy Appendix E measures directly. We evaluate six candidate estimators of . Each fits a CDF to the Stage-1 rewards and evaluates it at :
- Shifted exponential (ours). The estimator our method uses (Section 3.3), fitted to the upper tail of the exponentiated Stage-1 rewards following Kalayci et al. (2025). Concretely, fix a tail level (we use ), let be the reward scale of Appendix D.2, let denote the empirical -quantile of the rescaled rewards , and let . Among the rewards above , we fit to an exponential distribution shifted to start at , with mean parameter fitted by maximum likelihood:
and define the estimator
-
In-sample KDE. Gaussian kernel density estimator with bandwidth (Scott's rule), where is the sample standard deviation of the Stage-1 rewards, evaluated using the same sample that defined the bandwidth and the kernel centers. Following Raman et al. (2025), we treat the in-sample KDE variant as the canonical KDE baseline.
-
Leave-one-out (LOO) KDE, and . Same as in-sample KDE, but the term corresponding to itself (which contributes a fixed ) is dropped from the sum and the denominator becomes . The two variants differ in the bandwidth multiplier ( and ), and we set .
-
Normal. , where is the sample mean of the Stage-1 rewards.
-
GMM-2. A two-component Gaussian mixture model (GMM) is fit to all Stage 1 rewards by maximum likelihood using the expectation-maximization (EM) algorithm. EM is initialised by splitting the sorted sample at its median: each half's mean and standard deviation start one component, with equal weights. It then runs a fixed 30 iterations, alternating between computing each reward's posterior probability of belonging to each component (E-step) and re-estimating the weights , means , and standard deviations from those probabilities (M-step). The fitted mixture CDF is evaluated at the maximum, . Unlike the Normal fit, the mixture can represent skewed or bimodal reward distributions.
Evaluation setup. We run this evaluation separately in each of the 24 configurations of Section 4.1, each with 100 prompts, and average the results over the 24. For each prompt , we partition the 960 precomputed rewards into a Stage-1 training pool of size 480 and a held-out pool of size 480. For each estimator and each value of , we run independent Monte Carlo trials. In trial , we draw a Stage-1 set of size without replacement from the training pool of each prompt, compute the per-prompt Stage-1 maximum , evaluate the estimator , and compare it to the held-out empirical CDF value
where is the held-out reward pool for prompt . Splitting the rewards into disjoint training and held-out pools ensures that the held-out empirical CDF is an independent ground-truth estimate; in particular, a Stage-1 set of size drawn from the 480-reward training pool would be deterministic, eliminating the possibility of MC variation, which is why we cap the value at 240. Each estimator is also evaluated after debiasing: for each estimator and each , the binned-means map of Appendix E (the mean of in each of 25 equal-count bins of the estimate, interpolated linearly) is fitted on half of the configuration's prompts and applied to the other half, and vice versa.
Figure 4 reports, against , each estimator's RMSE (left), its RMSE after debiasing divided by that of the debiased shifted exponential (middle), and its bias (right), as point estimates without confidence bands, for the same reason as in Section 4.1; Table 2 reports the debiased RMSE and the bias. Both are averaged over the 24 configurations.
Every estimator is biased, overestimating or underestimating depending on the estimator and on (Table 2). Once debiased, the estimators differ less, and the shifted exponential has the lowest RMSE at every up to 120 and at is within of the lowest. We therefore use the shifted exponential as the regressor's main input, also for its single closed form and its having no fitting procedure that can fail to converge.
Across language models, reward models, and datasets. Table 3 repeats the comparison of debiased RMSE in each of the 24 configurations of Section 4.1, as the ratio of the shifted exponential's to that of the best competing estimator. The shifted exponential has the lowest debiased RMSE in all 24 configurations at and 30, in 22 at , in 16 at and in 9 at , where the leave-one-out KDE with the narrower bandwidth and the Gaussian mixture are most often ahead.
Table 2: RMSE of each estimator of after debiasing, and bias of the estimate itself, against the held-out empirical CDF value, for the six estimators considered, as a function of , averaged over the 24 configurations of Section 4.1. Held-out rewards tied with count as half. Positive bias: the estimator overstates . Averaged over 100 prompts, Monte Carlo trials, and the 24 configurations; lowest debiased RMSE per column in bold, both entries where two tie at the printed precision. Each estimator is debiased by binned means fitted on the other half of the configuration's prompts. Per-configuration values are in Table 3.
| RMSE of CDF, debiased () | 30 | 60 | 120 | 240 | |
|---|---|---|---|---|---|
| In-sample KDE | 5.40 | 2.85 | 1.50 | 0.82 | 0.47 |
| LOO KDE () | 5.42 | 2.86 | 1.50 | 0.82 | 0.46 |
| LOO KDE () | 5.40 | 2.85 | 1.50 | 0.82 | 0.47 |
| Normal | 5.46 | 2.93 | 1.57 | 0.87 | 0.51 |
| GMM-2 | 5.64 | 2.96 | 1.52 | 0.81 | 0.46 |
| Shifted exponential (ours) | 5.27 | 2.71 | 1.42 | 0.78 | 0.47 |
| Bias of CDF () | 30 | 60 | 120 | 240 | |
| In-sample KDE | -2.43 | -2.00 | -1.37 | -0.84 | -0.48 |
| LOO KDE () | +3.74 | +1.75 | +0.82 | +0.39 | +0.19 |
| LOO KDE () | +0.52 | -0.46 | -0.57 | -0.43 | -0.27 |
| Normal | -0.38 | -1.40 | -1.67 | -1.60 | -1.40 |
| GMM-2 | +3.01 | +1.16 | +0.30 | -0.05 | -0.17 |
| Shifted exponential (ours) | +1.92 | +1.19 | +0.58 | +0.28 | +0.14 |

Figure 4: Six estimators of against the Stage-1 batch size (log scale), averaged over the 24 configurations of Section 4.1: RMSE of the estimate (left), RMSE after debiasing divided by that of the debiased shifted exponential (middle), and bias of the estimate (right). Dashed black: the shifted exponential after debiasing. The in-sample KDE's debiased curve coincides with the leave-one-out KDE's (): with the same bandwidth, the former is an increasing affine function of the latter, which the debiasing map undoes. The in-sample KDE is the canonical KDE baseline of Raman et al. (2025); the predicted Beta takes the shifted-exponential estimate as its main input (Appendix E).
Table 3: RMSE after debiasing of the shifted-exponential estimate of divided by that of the best of the five competing estimators after the same debiasing, in each of the 24 configurations of Section 4.1. Below one, ours is the most accurate; bold marks those entries. Averaged over 100 prompts and Monte Carlo trials. Debiased, our estimator has the lowest RMSE in 24, 24, 22, 16, 9 of the 24 configurations at respectively.
| dataset | RM | LM | 30 | 60 | 120 | 240 | |
|---|---|---|---|---|---|---|---|
| AlpacaFarm | FsfairX | Llama | 0.985 | 0.976 | 0.998 | 1.044 | 1.101 |
| Gemma | 0.977 | 0.962 | 0.965 | 0.999 | 1.104 | ||
| Mistral | 0.980 | 0.960 | 0.969 | 1.026 | 1.072 | ||
| Qwen | 0.968 | 0.936 | 0.928 | 0.959 | 1.008 | ||
| RM-Mistral | Llama | 0.972 | 0.946 | 0.948 | 0.979 | 1.002 | |
| Gemma | 0.958 | 0.931 | 0.930 | 0.958 | 1.008 | ||
| Mistral | 0.985 | 0.970 | 0.991 | 1.009 | 1.037 | ||
| Qwen | 0.964 | 0.939 | 0.921 | 0.957 | 0.997 | ||
| ArmoRM | Llama | 0.994 | 0.999 | 1.024 | 1.051 | 1.124 | |
| Gemma | 0.974 | 0.947 | 0.963 | 1.026 | 1.110 | ||
| Mistral | 0.988 | 0.972 | 0.973 | 0.973 | 1.008 | ||
| Qwen | 0.966 | 0.951 | 0.957 | 1.015 | 1.135 | ||
| HH-RLHF | FsfairX | Llama | 0.994 | 0.993 | 1.023 | 1.044 | 1.077 |
| Gemma | 0.963 | 0.931 | 0.924 | 0.966 | 1.039 | ||
| Mistral | 0.978 | 0.940 | 0.909 | 0.898 | 0.886 | ||
| Qwen | 0.967 | 0.933 | 0.915 | 0.922 | 1.015 | ||
| RM-Mistral | Llama | 0.979 | 0.949 | 0.929 | 0.947 | 0.997 | |
| Gemma | 0.960 | 0.919 | 0.909 | 0.964 | 1.000 | ||
| Mistral | 0.964 | 0.920 | 0.912 | 0.927 | 0.949 | ||
| Qwen | 0.978 | 0.932 | 0.894 | 0.874 | 0.925 | ||
| ArmoRM | Llama | 0.987 | 0.977 | 0.990 | 1.019 | 1.040 | |
| Gemma | 0.972 | 0.943 | 0.938 | 0.965 | 0.983 | ||
| Mistral | 0.977 | 0.953 | 0.944 | 0.957 | 1.000 | ||
| Qwen | 0.980 | 0.970 | 0.959 | 0.965 | 0.989 |
D.2 RESCALING REWARDS FOR THE SHIFTED-EXPONENTIAL ESTIMATOR
Before fitting the shifted-exponential estimator (5), we divide every reward by a single constant, the reward scale
so that the median within-prompt standard deviation is 1. The scale is estimated once offline, from a sample of prompts with several scored responses each: take each prompt's sample standard deviation, then the median across prompts. In our experiments each configuration uses the computed from its full pool of 100 prompts and 960 responses, listed in Table 4. Only the CDF estimate is affected – the reported reward and the oracle policy are rank transforms of the pool, which any rescaling leaves unchanged.
Why rescaling is needed. The estimator is fitted to the exponentiated reward, so without the rescaling ((5) applied to rather than ) its fitted tail shape depends on the units in which rewards are reported, and not only on the shape of the reward distribution. Writing a first-batch reward as with now the -quantile of the rewards and of order one, the quantity the unrescaled fit treats as exponential is . When this grows faster than linearly in , and the implied upper tail of decays doubly exponentially. When , and the fit degenerates to an exponential tail on itself, which is far heavier than the reward distributions we observe; is then biased low, is overstated, and the policy draws a second batch more often than it should. Dividing by replaces by , whatever the reward model's units.
Table 4 shows this in practice, for the estimate itself and after debiasing. In the 16 configurations that use FsfairX and RM-Mistral, lies between 0.63 and 0.97: their rewards already have a median within-prompt standard deviation close to 1, and rescaling raises the estimate's RMSE by at most and changes the debiased RMSE little. ArmoRM has between 0.0053 and 0.0099, and without rescaling its fit fails as described above: at the estimate's RMSE is more than one and a half times that of the estimate fitted to rescaled rewards, in every ArmoRM configuration.
Debiasing removes most of this difference. After debiasing, the RMSE without rescaling is within 8% of the RMSE with it in every configuration, ArmoRM's included; for ArmoRM, rescaling still lowers it at in every configuration. Since the regressor of the predicted Beta removes the bias of its inputs (Appendix D.1), rescaling matters much less for our method than for the estimate plugged in directly. We keep it, since it costs little (below) and lowers the debiased RMSE at small .
Choice of target spread. Targeting unit spread is a choice, and Table 5 sweeps a factor around it, replacing by in (5), so that the estimator is fitted to and is the rescaling above. The best drifts upward with , from 0.5 at to 1 at : a smaller gives a heavier fitted tail, which lowers and offsets its overestimate at small , while at large the overestimate is small (Table 2). No single value is best everywhere; is the best at , within of the best at , within at , and within at the smallest first batches, so we use throughout and introduce no tuned quantity. After debiasing, the RMSE varies with by less than 4% at every , so the choice matters even less for the input of the predicted Beta.
Cost of the rescaling. Estimating needs no training and no additional model, and uses the same kind of offline sample a practitioner already needs in order to choose (Appendix G). Only its rough magnitude matters, so a small sample suffices (Table 6). From 50 prompts with 20 responses each – a thousand generations, once – the estimate falls between 0.81 and 1.10 times its full-pool value 90% of the time. Dividing by such an estimate is equivalent to taking between roughly 0.9 and 1.2 in Table 5, which changes the RMSE by at most . Small samples understate , since the standard deviation of a few draws is biased low, but the bias is modest from on.
Scale-invariant alternatives. The scale dependence comes from fixing the exponent in rather than fitting it. A Gompertz upper tail, with survival with the reward minus the first batch's median and both parameters estimated by maximum likelihood, contains our estimator as the case and is exactly invariant to any affine rescaling of the reward; it is slightly more accurate than ours at large first batches but less accurate at small ones, since a handful of exceedances estimate two parameters poorly. A generalized-Pareto tail is likewise invariant and less accurate at every we tried. We therefore keep the one-parameter fit and set its scale from offline data.
Table 4: The reward scale of each of the 24 configurations of Section 4.1, and the RMSE () of the shifted-exponential estimate fitted to the raw rewards and to the rescaled rewards , as the estimate itself (est.) and after debiasing (deb.), at first-batch sizes and 80, measured as in Table 5. is the median within-prompt standard deviation over the full pool of 100 prompts and 960 responses. Debiasing is by binned means, each half of a configuration's prompts mapped by the map fitted on the other half.
| dataset | RM | LM | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| est., | est., | deb., | deb., | est., | est., | deb., | deb., | ||||
| AlpacaFarm | FsfairX | Llama | 0.968 | 4.24 | 4.26 | 3.95 | 3.95 | 1.13 | 1.13 | 1.01 | 1.01 |
| Gemma | 0.627 | 4.51 | 4.75 | 4.35 | 4.25 | 1.30 | 1.41 | 1.22 | 1.21 | ||
| Mistral | 0.840 | 4.21 | 4.34 | 3.82 | 3.79 | 1.04 | 1.12 | 0.95 | 0.95 | ||
| Qwen | 0.818 | 4.27 | 4.37 | 3.98 | 3.95 | 1.18 | 1.20 | 1.04 | 1.04 | ||
| RM-Mistral | Llama | 0.938 | 4.20 | 4.25 | 3.81 | 3.80 | 1.08 | 1.11 | 0.95 | 0.95 | |
| Gemma | 0.670 | 4.10 | 4.34 | 3.82 | 3.75 | 1.16 | 1.28 | 0.97 | 0.97 | ||
| Mistral | 0.832 | 4.30 | 4.44 | 3.84 | 3.82 | 1.09 | 1.19 | 0.95 | 0.96 | ||
| Qwen | 0.871 | 4.25 | 4.34 | 3.87 | 3.85 | 1.19 | 1.23 | 1.01 | 1.01 | ||
| ArmoRM | Llama | 0.00992 | 4.23 | 4.18 | 4.08 | 3.93 | 2.65 | 1.07 | 1.02 | 1.02 | |
| Gemma | 0.00666 | 4.55 | 4.57 | 4.48 | 4.18 | 2.73 | 1.57 | 1.25 | 1.18 | ||
| Mistral | 0.00924 | 4.22 | 4.22 | 4.10 | 3.90 | 2.49 | 1.07 | 1.00 | 0.98 | ||
| Qwen | 0.00838 | 4.29 | 4.24 | 4.16 | 3.94 | 2.63 | 1.26 | 1.07 | 1.03 | ||
| HH-RLHF | FsfairX | Llama | 0.801 | 4.16 | 4.27 | 3.98 | 3.96 | 1.21 | 1.16 | 0.99 | 0.99 |
| Gemma | 0.673 | 4.11 | 4.33 | 3.89 | 3.83 | 1.04 | 1.08 | 0.94 | 0.93 | ||
| Mistral | 0.803 | 4.20 | 4.37 | 3.78 | 3.74 | 0.99 | 1.12 | 0.90 | 0.90 | ||
| Qwen | 0.748 | 4.14 | 4.32 | 3.85 | 3.81 | 0.96 | 1.06 | 0.91 | 0.91 | ||
| RM-Mistral | Llama | 0.798 | 4.13 | 4.27 | 3.86 | 3.83 | 0.99 | 1.06 | 0.92 | 0.92 | |
| Gemma | 0.680 | 4.07 | 4.31 | 3.82 | 3.75 | 0.98 | 1.11 | 0.93 | 0.91 | ||
| Mistral | 0.739 | 4.21 | 4.46 | 3.77 | 3.71 | 0.98 | 1.18 | 0.87 | 0.86 | ||
| Qwen | 0.795 | 4.11 | 4.25 | 3.81 | 3.78 | 0.94 | 1.04 | 0.89 | 0.89 | ||
| ArmoRM | Llama | 0.00661 | 4.36 | 4.20 | 4.16 | 3.97 | 2.88 | 1.07 | 1.03 | 0.99 | |
| Gemma | 0.00533 | 4.27 | 4.18 | 4.12 | 3.87 | 2.79 | 1.09 | 1.03 | 0.98 | ||
| Mistral | 0.00654 | 4.33 | 4.26 | 4.16 | 3.93 | 2.87 | 1.08 | 1.05 | 0.97 | ||
| Qwen | 0.00654 | 4.31 | 4.18 | 4.11 | 3.97 | 2.79 | 1.13 | 1.02 | 1.02 | ||
Table 5: RMSE of the shifted-exponential estimate , and of the same estimate after debiasing, when rewards are scaled to times unit median within-prompt spread, averaged over the 24 configurations of Section 4.1. The paper uses . Averaged over 100 prompts and 300 Monte Carlo draws per prompt; best per column in bold. Stage-1 batches are drawn from the full pool and scored against the normalized reward rank of Appendix C, as in Table 7, not against the held-out empirical CDF of Table 2, so the values differ slightly from that table's. Debiasing is by binned means, each half of a configuration's prompts mapped by the map fitted on the other half.
| RMSE of CDF () | ||||||
|---|---|---|---|---|---|---|
| 20 | 40 | 80 | 160 | 240 | ||
| 0.5 | 8.27 | 4.04 | 2.05 | 1.23 | 0.92 | 0.81 |
| 0.7 | 8.37 | 4.12 | 2.04 | 1.11 | 0.74 | 0.62 |
| 0.85 | 8.45 | 4.21 | 2.09 | 1.11 | 0.69 | 0.56 |
| 1 | 8.53 | 4.31 | 2.17 | 1.15 | 0.69 | 0.54 |
| 1.2 | 8.65 | 4.45 | 2.30 | 1.23 | 0.72 | 0.55 |
| 1.5 | 8.83 | 4.67 | 2.49 | 1.35 | 0.77 | 0.57 |
| 2 | 9.11 | 5.00 | 2.75 | 1.50 | 0.84 | 0.60 |
| RMSE of CDF after debiasing () | ||||||
|---|---|---|---|---|---|---|
| 20 | 40 | 80 | 160 | 240 | ||
| 0.5 | 7.75 | 3.96 | 1.97 | 0.98 | 0.49 | 0.33 |
| 0.7 | 7.70 | 3.91 | 1.96 | 0.97 | 0.50 | 0.33 |
| 0.85 | 7.67 | 3.89 | 1.95 | 0.98 | 0.50 | 0.34 |
| 1 | 7.65 | 3.87 | 1.94 | 0.98 | 0.50 | 0.34 |
| 1.2 | 7.62 | 3.85 | 1.94 | 0.98 | 0.50 | 0.34 |
| 1.5 | 7.58 | 3.84 | 1.94 | 0.99 | 0.51 | 0.34 |
| 2 | 7.58 | 3.82 | 1.94 | 0.99 | 0.51 | 0.34 |
Table 6: Estimating offline from prompts with scored responses each: the estimate as a ratio to its value on the full pool of 100 prompts and 960 responses, as median [5th, 95th percentile] over 400 resamples, for Llama on AlpacaFarm scored by FsfairX.
| prompts | ||||
|---|---|---|---|---|
| 0.83 [0.55, 1.30] | 0.90 [0.64, 1.29] | 0.94 [0.65, 1.34] | 0.99 [0.71, 1.36] | |
| 0.82 [0.64, 1.06] | 0.89 [0.72, 1.17] | 0.92 [0.74, 1.21] | 0.98 [0.78, 1.20] | |
| 0.83 [0.69, 0.99] | 0.90 [0.75, 1.06] | 0.95 [0.81, 1.10] | 0.97 [0.84, 1.11] |
E ESTIMATING THE EXPECTED IMPROVEMENT VIA REGRESSION
Section 3.3 estimates the expected improvement by the predicted Beta. This appendix compares four estimates of the expected improvement , each differing from the one before in one respect:
-
Plug-in: , with the shifted exponential of Appendix D.1.
-
Debiased: , where estimates by binned means: for each , the mean of in each of 25 equal-count bins of , interpolated linearly between bins.
-
Debiased, more inputs: , with the conditional mean predicted by a gradient-boosted regressor from inputs that summarize the first batch: , shifted-exponential estimates of at three tail levels, and the positions of a few quantiles of the first batch's rewards (defined below).
-
Predicted Beta (ours): , computed in closed form from a Beta distribution predicted for , from the same inputs (Section 3.3).
The last three, the regression-based estimates, are each fitted offline on first batches from one half of a configuration's 100 prompts, the 50 fitting prompts, and applied to the other half, and vice versa, and each configuration has its own fits. is replaced by the normalized rank of among the prompt's responses (Appendix C), both as the target of the fits and in scoring them.
Visualizing the bias of . Figure 5 plots against in each configuration. Their conditional mean is increasing but flatter than the identity: when is high, it overestimates , so the plug-in underestimates the expected improvement. The orange curve is the map of the debiased estimate.
Fitting procedure of the debiased estimate with more inputs and the predicted Beta. Both estimates use the same fitted regressor for the mean of ; the predicted Beta adds a second regressor for its variance. The regressors are scikit-learn's histogram gradient boosting (Pedregosa et al., 2011). Online, a first batch needs the three shifted-exponential fits, its quantiles and the regressors' predictions, which take negligible time compared to generating a batch.
-
Offline data. For every , 400 first batches of responses are drawn without replacement from each fitting prompt's pool, each with its normalized rank . Each regressor is one fit over every , which is one of its inputs.
-
Target. The mean regressor predicts rather than . is the maximum of independent Unif values, so ; is close to an exponential distribution with mean 1 whatever is, whereas the mean of , , varies more than a hundredfold over the batch sizes. With as the target, the regressor has to learn only how the first batch's rewards move from this common reference, not the dependence on known in advance.
-
Inputs. The inputs of a first batch are:
-
, and whether is odd: the shifted exponential's bias alternates between odd and even , since a sample of odd size has a reward at its median;
-
for each tail level , the rescaled estimate (where is the shifted exponential estimator ((5) in Appendix D.1) estimated from the rewards above the empirical -quantile ); we also include a feature indicating whether it fell back to the constant , which it does when fewer than five rewards exceed the -quantile (always when at );
-
the positions of the first batch's 0, 0.1, 0.25, 0.75 and 0.9 quantiles and of its second-largest reward, relative to its median and its maximum .
also holds the squares of at and , which are functions of the inputs above.
-
The mean. estimates , with a regression model fitted on all 50 fitting prompts to the targets under the Poisson loss , the negative log-likelihood of a Poisson distribution with mean up to terms free of . For any nonnegative target , is minimized at , so this loss fits a conditional mean, and predictions of the form stay positive. The predicted mean of is , clipped to . The debiased estimate with more inputs puts it into the closed form: .
-
Limiting overfitting. In each regressor, each tree has at most 31 leaves of at least 200 first batches each, and trees are added with learning rate 0.05. The number of trees, at most 600, is chosen separately for each regressor by early stopping: the regressor is fitted on 40 of the 50 fitting prompts chosen at random, the number of trees minimizing the mean loss on the first batches of the other 10 is kept, and the regressor is refitted on all 50 with that number of trees.
Additional steps of the predicted Beta.
-
The variance. estimates , with fitted under the same loss on all 50 fitting prompts to the targets . So that the overfitting of the mean does not shrink these squared residuals, is computed out of fold: the fitting prompts are split at random into two sets of 25, and for the first batches of each set, is the prediction of a mean regressor fitted on the other set, with the number of trees chosen for .
-
The Beta. is the predicted variance of . Beta has mean and variance , so the Beta with mean and variance has , and . The sum sets how concentrated the Beta is around its mean. It is floored at , since no Beta has mean and variance , and is kept strictly inside . This Beta gives in closed form for every (Section 3.3).
Accuracy. Table 7 reports each estimate's RMSE and its relative bias , with expectations over first batches and prompts. The rows set . The relative bias of the debiased estimate with more inputs depends on and mainly through , and moves toward 0 as grows (Appendix E.1); fixing the ratio keeps it comparable across the rows.
Debiasing lowers the RMSE more than the additional inputs do for , and less otherwise. The predicted Beta lowers it slightly further for ; otherwise its RMSE is almost the same as that of the debiased estimate with more inputs. The predicted Beta is the only estimate whose relative bias is small at most ; the other three underestimate the expected improvement at every .
Policy performance with each estimate. Figure 6 compares the adaptive batch size, latency-aware policy using each of the four estimates with Best-of- and with the oracle policy, at and on the ray at and . The top row compares the proportion of generations-equivalent cost saved, where the plug-in always saves cost over Best-of-. The bottom row plots against , where is the value of of Best-of- with its -maximizing : at large the plug-in falls below Best-of-, while the predicted Beta mostly stays above it. In both views the ordering is the same: the predicted Beta, then the debiased estimate with more inputs close below it, then the debiased estimate, then the plug-in.
Fitting on another configuration. Each of the 24 configurations has six others that share none of its language model, reward model and dataset: the three other language models crossed with the two other reward models, on the other dataset. Table 8 repeats the RMSE of the three regression-based estimates, each fitted instead on half the prompts of each of these six separately, and scored on half of the configuration's own prompts. Fitted this way, each estimate's RMSE is higher than when fitted on the configuration's own prompts, the predicted Beta's by at most a tenth, and at every it is still lower than the RMSE of the plug-in. This compares accuracy only; the policy using an estimate fitted on another configuration was not run.
Table 7: Accuracy of the four estimates of the expected improvement , with , averaged over the 24 configurations of Section 4.1. RMSE () against , with the normalized rank of , lowest in bold; and, for an estimate , the relative bias , in %. The regression-based estimates are fitted on half of a configuration's prompts and scored on the other half, both ways round; RMSE is the root of the mean squared error over the 24 configurations.
| RMSE () | relative bias (%) | |||||||
|---|---|---|---|---|---|---|---|---|
| plug-in | debiased | debiased, more inputs | predicted Beta | plug-in | debiased | debiased, more inputs | predicted Beta | |
| 2 | 14.901 | 14.894 | 14.629 | 14.394 | -26 | -26 | -22 | +7 |
| 5 | 10.022 | 10.013 | 9.628 | 9.488 | -27 | -26 | -22 | +2 |
| 10 | 6.417 | 5.763 | 5.485 | 5.433 | -65 | -20 | -17 | +2 |
| 20 | 3.341 | 3.047 | 2.965 | 2.929 | -58 | -17 | -19 | -3 |
| 40 | 1.690 | 1.561 | 1.532 | 1.522 | -49 | -15 | -13 | +1 |
| 80 | 0.901 | 0.790 | 0.781 | 0.779 | -41 | -15 | -10 | +4 |
| 160 | 0.589 | 0.410 | 0.406 | 0.406 | -31 | -14 | -7 | +7 |
| 320 | 0.465 | 0.217 | 0.213 | 0.214 | -17 | -13 | -4 | +10 |
Table 8: RMSE () against , with , of the plug-in, which has no fit, and of the three regression-based estimates of the expected improvement, over the 24 configurations of Section 4.1. “Own”: fitted on half of the configuration’s prompts and scored on the other half, both ways round. “Other”: fitted on half of the prompts of another configuration that shares none of the configuration’s language model, reward model and dataset, for each of the six such configurations, and scored on half of the configuration’s prompts. RMSE is the root of the mean squared error over the 24 configurations, both prompt halves and, for “other”, the six configurations fitted on.
| plug-in | debiased | debiased, more inputs | predicted Beta | ||||
|---|---|---|---|---|---|---|---|
| own | other | own | other | own | other | ||
| 2 | 14.901 | 14.894 | 14.894 | 14.629 | 14.758 | 14.394 | 14.495 |
| 5 | 10.022 | 10.013 | 10.013 | 9.628 | 9.680 | 9.488 | 9.525 |
| 10 | 6.417 | 5.763 | 5.772 | 5.485 | 5.543 | 5.433 | 5.497 |
| 20 | 3.341 | 3.047 | 3.074 | 2.965 | 3.021 | 2.929 | 2.990 |
| 40 | 1.690 | 1.561 | 1.595 | 1.532 | 1.598 | 1.522 | 1.592 |
| 80 | 0.901 | 0.790 | 0.823 | 0.781 | 0.835 | 0.779 | 0.835 |
| 160 | 0.589 | 0.410 | 0.431 | 0.406 | 0.439 | 0.406 | 0.440 |
| 320 | 0.465 | 0.217 | 0.225 | 0.213 | 0.232 | 0.214 | 0.234 |

Figure 5: The estimated CDF value of the best of Stage-1 rewards (shifted exponential) against its normalized rank , in each of the 24 configurations of Section 4.1 (columns: language models; rows: reward model and dataset). Both axes use a logit scale, , which spreads out values near 1. Grey points: 3000 Stage-1 batches sampled at random from all 100 of the configuration's prompts. Orange: the binned-means map of the debiased estimate, fitted on one half of those prompts. Dotted: the identity. falls below the identity at a value between 0.96 and 0.99, depending on the configuration: when is high, it overestimates .

Figure 6: The adaptive batch size, latency-aware policy using each of the four estimates of the expected improvement, batch sizes in , averaged over the 24 configurations of Section 4.1. Left: no latency cost ( ). Right: the ray , at , , . Top: the proportion of generations-equivalent cost saved at matched mean normalized reward rank, , against Best-of-N's generations-equivalent cost in log scale. (Points are joined in order of , so where a policy's mean normalized reward rank is not monotone in , its curve turns back.) Bottom: , with the value of V of Best-of-N with its V-maximizing N, against along the ray (log scale). Light blue diamonds: plug-in; grey triangles: debiased; pink crosses: debiased, more inputs; orange plus signs: predicted Beta (ours); black circles: oracle; dotted black: Best-of-N.
E.1 HOW THE CONVEXITY CORRECTION DEPENDS ON
Tables 7 and 8 vary with , so that the relative size of the predicted Beta's correction for the convexity of EI differs across rows approximately only through the uncertainty about given the first batch. With and , as in the fitting procedure, . is of order one (Appendix E, fitting procedure), so is small and . Hence, with and , . Substituting gives
and likewise . The relative bias given of the debiased estimate with more inputs is therefore
which depends on and only through , given the conditional distribution of , and is at most 0 by Jensen's inequality.
The limits. By Taylor expansion of at , for small , so as , . for large , so as , : is then nearly linear in .
The increase in . increases in for every conditional distribution of . Let and . By the quotient rule,
so it suffices to show . Since , the tangent line of at is . So it suffices to show that lies below this line:
since taking expectations of both sides gives . We have , and with , so is strictly convex below and strictly concave above it. Then : if , would be strictly concave on , and would give ; if , it would be strictly convex there and give . Also : increases on from , so , hence is negative somewhere in , and decreases above . The inequality follows: above because is concave there and , and for because : the first inequality holds since increases on , as and there; the second by the concave case at ; the third since .
Holding fixed across the rows therefore approximately holds the relative size of the correction fixed for a given conditional distribution of , and the rows differ only in the uncertainty about given the first batch.
F ADDITIONAL FIGURES AND TABLES OF EXPERIMENT RESULTS
F.1 RESULTS ACROSS LATENCY COSTS AND DEPENDENCE OF LATENCY ON BATCH SIZE
Figures 7 and 8 show the curves of Figure 2 at and (rows) and and (columns), at and : the proportion of generations-equivalent cost saved at Best-of-'s reward, and the mean normalized reward rank, against generations-equivalent cost. The middle column of both, , is Figure 2.

Figure 7: The bottom row of Figure 2 at each , also with : proportion of generations-equivalent cost saved at matched mean normalized reward rank, , against Best-of-'s generations-equivalent cost (log scale), at and (rows) and and 1 (columns). , batch sizes in , averaged over the 24 configurations of Section 4.1. Points are joined in order of , so where a policy's mean normalized reward rank is not monotone in , its curve turns back. Colours and line styles as in Figure 2.

Figure 8: The top row of Figure 2 at each , also with : mean normalized reward rank against generations-equivalent cost (: mean number of generations and mean total latency in seconds) (log scale) for the policies and settings of Figure 7. Dotted black: Best-of-.
F.2 PER-CONFIGURATION RESULTS ACROSS LANGUAGE MODELS, REWARD MODELS, AND DATASETS
Section 4 reports results averaged over the 24 configurations (Section 4.1); the per-configuration values are shown here. Figure 9 gives the bottom panel of Figure 2 at , and Table 9 gives the proportion of generations-equivalent cost saved at the reward of Best-of- with , as in Table 1 at and , both with the predicted Beta. We do not report oracle performance here because with the oracle the proportion saved varies little across configurations: the oracle policy sees the rewards only through , whose distribution does not depend on the configuration.
| Two-stage BoN, adaptive , latency-aware (ours) | predicted Beta (ours) | Best-of-N (baseline) |
|---|---|---|
| Two-stage BoN, adaptive , latency-unaware | ||
| Two-stage BoN, fixed , latency-aware | ||
| Two-stage BoN, fixed , latency-unaware (baseline) |

Figure 9: The bottom row of Figure 2 at in each of the 24 configurations of Section 4.1: the proportion of generations-equivalent cost saved against Best-of-N's generations-equivalent cost (log scale), at , , , batch sizes in , with the predicted Beta; each panel uses its configuration's own Best-of-N. Columns: language models; rows: reward model and dataset.
Table 9: Per-configuration results of Table 1: proportion (%) of generations-equivalent cost saved at the reward of Best-of-N with in each of the 24 configurations of Section 4.1 (adaptive batch size policies, , predicted Beta, at and ). At the two latency rules are one policy and does not apply.
| dataset | RM | LM | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| unaware | aware | unaware | aware | unaware | aware | unaware | aware | ||||
| AlpacaFarm | FsfairX | Llama | 8.8 | -1.9 | 1.6 | -0.2 | 2.1 | 8.8 | 12.8 | 8.4 | 27.5 |
| Gemma | 11.2 | 0.3 | 3.4 | 0.0 | 2.9 | 11.4 | 15.1 | 11.1 | 29.1 | ||
| Mistral | 11.0 | -0.7 | 2.9 | -0.3 | 2.7 | 11.0 | 14.9 | 10.8 | 28.8 | ||
| Qwen | 8.1 | -1.5 | 1.5 | -0.2 | 2.2 | 8.1 | 12.5 | 8.1 | 27.3 | ||
| RM-Mistral | Llama | 9.3 | -1.2 | 1.8 | -0.7 | 2.2 | 9.3 | 13.2 | 8.7 | 27.6 | |
| Gemma | 9.9 | -0.6 | 2.7 | -0.2 | 2.5 | 10.1 | 13.7 | 10.0 | 28.0 | ||
| Mistral | 10.8 | -0.3 | 2.9 | -0.1 | 2.7 | 11.0 | 14.9 | 10.8 | 28.8 | ||
| Qwen | 9.9 | -0.5 | 2.7 | -0.3 | 2.6 | 10.1 | 13.9 | 9.9 | 28.0 | ||
| ArmoRM | Llama | 9.6 | -1.3 | 2.0 | 0.0 | 2.5 | 9.7 | 13.8 | 9.2 | 28.1 | |
| Gemma | 10.7 | -1.0 | 2.6 | -0.2 | 2.6 | 10.8 | 14.6 | 10.5 | 28.6 | ||
| Mistral | 9.7 | -0.7 | 2.2 | 0.1 | 2.5 | 9.9 | 13.7 | 9.3 | 28.0 | ||
| Qwen | 9.2 | -1.4 | 2.1 | -0.4 | 2.4 | 9.0 | 13.1 | 8.6 | 27.8 | ||
| HH-RLHF | FsfairX | Llama | 8.5 | -1.3 | 1.7 | -0.1 | 2.3 | 8.5 | 12.6 | 8.1 | 27.6 |
| Gemma | 10.3 | -0.1 | 3.0 | 0.1 | 2.8 | 10.5 | 14.3 | 10.4 | 28.3 | ||
| Mistral | 11.0 | 0.5 | 3.5 | 0.1 | 2.9 | 11.1 | 14.7 | 11.1 | 28.2 | ||
| Qwen | 10.4 | -0.3 | 3.0 | -0.1 | 2.8 | 10.5 | 14.2 | 9.9 | 28.1 | ||
| RM-Mistral | Llama | 10.1 | -0.8 | 2.5 | -0.3 | 2.5 | 10.3 | 14.2 | 10.1 | 28.1 | |
| Gemma | 11.7 | 0.0 | 3.4 | -0.2 | 3.1 | 12.0 | 15.7 | 11.9 | 29.7 | ||
| Mistral | 11.5 | 0.9 | 3.9 | -0.1 | 3.0 | 11.7 | 15.2 | 11.7 | 28.3 | ||
| Qwen | 11.0 | 0.4 | 3.7 | 0.1 | 3.0 | 11.2 | 14.8 | 10.6 | 28.6 | ||
| ArmoRM | Llama | 9.9 | -0.6 | 2.4 | -0.2 | 2.6 | 10.0 | 13.7 | 9.6 | 27.9 | |
| Gemma | 10.8 | 0.0 | 3.1 | 0.1 | 2.9 | 11.0 | 14.8 | 10.8 | 28.7 | ||
| Mistral | 9.5 | -0.2 | 2.8 | -0.1 | 2.7 | 9.7 | 13.2 | 9.4 | 27.8 | ||
| Qwen | 9.5 | -0.7 | 2.3 | 0.0 | 2.7 | 9.7 | 13.5 | 9.2 | 27.7 | ||
F.3 SENSITIVITY TO THE CORRELATION
Every latency-aware policy compared in Section 4 uses the exact, correct prediction of , and focuses on the perfect-correlation case (Section 4.3 also compares to ). Here, we systematically explore how the performance depends on , sweeping . We also compare with a latency-aware policy that uses a misspecified latency predictor, predicting under the assumption that , estimating whatever the true , which is the other extreme of the latency-unaware policy that assumes .
Figure 10 shows the proportion of generations-equivalent cost saved at the reward of Best-of-N with , as in Table 1, against , for the adaptive batch size policies at , , and . The latency-aware policy that predicts correctly saves as much as the latency-unaware policy at (in which case ), and more the higher is; we also see higher savings with higher and as already shown in Figure 3. Predicting as if never saves more than predicting it at the true , and at it saves less than the latency-unaware policy, by more at : reading a that says little about as if it determined is worse than not reading it.

Figure 10: Proportion (%) of generations-equivalent cost saved at the reward of Best-of- with , against the correlation of and , at and (rows) and , 0.5 and 1 (columns). All policies choose the second batch size adaptively in . Performance is averaged over the 24 configurations of Section 4.1. Predicting at the true in filled markers, predicting as if in hollow markers; line styles are otherwise the same as in Figure 3.
F.4 HEATMAPS OF THE LAMBDA GRID
Figure 11 shows, over the grid of the 31 geometrically spaced values of of Section 4.1 and 81 geometrically spaced values of , the mean normalized reward rank, the mean latency, and the mean number of generations of the latency-aware policy with adaptive batch sizes, at the latency model of Figure 2 (, , ), averaged over the 24 configurations of Section 4.1. Each ray of Figure 2 is a diagonal of this grid.

Figure 11: Heatmaps over the grid of the 31 geometrically spaced values of of Section 4.1 and 81 geometrically spaced values of for the latency-aware policy with adaptive batch sizes , at , , , averaged over the 24 configurations of Section 4.1. Top row: mean number of generations. Middle row: mean latency (s). Bottom row: mean normalized reward rank of the returned response. Left column: our method, with the predicted Beta. Middle column: oracle variant. Right column: ours minus oracle.
G SELECTING THE TRADEOFF PARAMETERS IN PRACTICE
The two tradeoff parameters are selected once, offline. Run inference on an initial serving trace or a held-out set, sweep over a grid as we do above, plot the resulting tradeoff among mean reward, mean latency, and mean generation count, and select the pair that meets the deployment target. Two properties keep this cheap. First, the 's do not need to adapt to load: adaptation to the state of the serving system is automatic through , in contrast to the fixed-threshold or fixed-cost rules that many adaptive TTC methods use, which do not respond to the state of the serving system. Second, because the CDF transformation places the decision on the scale-free scale of CDF values, and should transfer across language models and reward models as long as the serving system – and hence the latency distribution – is unchanged; Appendix F.2 checks this across the 24 configurations.
H RANDOM DRAWS AND SEEDING
Every random draw in the simulations comes from a generator with a fixed seed, so each run reproduces exactly, and the same draws are shared across all the policies being compared (common random numbers). The latencies , and when (Appendix F.3), are drawn once per prompt and trial. Trial draws one uniformly random ordering of the pool : its first entries form the Stage-1 set and the next the second batch , which is equivalent to the two draws without replacement of Section 4.1. The same orderings index every prompt's pool; since each pool holds independent generations, this leaves each prompt's draws with the same distribution. These latencies and orderings are reused for every policy, every pair, and both the estimated-EI and oracle variants. The empirical Best-of- reference curves involve no random draws: they are computed exactly (Appendix C). Because the second batch continues the first batch's ordering, trial sees the same rewards whatever and a policy chooses. A difference between two policies therefore reflects only their decisions, not different random draws, which is why the latency-aware policy at matches the latency-unaware baseline exactly rather than to within Monte Carlo noise. The latency samples used for the offline choice of batch sizes (Appendix A) come from a separately seeded generator, so the chosen and are also reproducible. All 24 configurations of Section 4.1 use the same seed. The regressor of the predicted Beta (Appendix E) is fitted once for each half of each configuration's prompts, and every run loads that fit; its predictions reproduce exactly on one type of CPU and differ across types only by floating-point rounding of its inputs.
I DATASET AND MODEL ASSET DETAILS
All experiments reuse the pools of generations and reward scores released by Kalayci et al. (2025): for each of 100 prompts from each dataset, 960 responses sampled from each language model and scored by each reward model. We use every combination of the four language models, three reward models, and two datasets below, the 24 configurations of Section 4.1, and generate or score no new responses. The three reward models are also those used by Sun et al. (2024).
Datasets. We use prompts from the following datasets, 100 from each:
-
AlpacaFarm: https://github.com/tatsu-lab/alpaca_farm, Apache 2.0 License.
-
HH-RLHF: https://huggingface.co/datasets/Anthropic/hh-rlhf, MIT License.
Language models (LMs). Responses were generated by the following publicly available language models:
-
Llama-3.1-8B-Instruct: https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct, Llama 3.1 Community License.
-
Gemma-2-9B-it: https://huggingface.co/google/gemma-2-9b-it, Gemma Terms of Use.
-
Mistral-7B-Instruct-v0.3: https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.3, Apache 2.0 License.
-
Qwen2.5-7B-Instruct: https://huggingface.co/Qwen/Qwen2.5-7B-Instruct, Apache 2.0 License.
Reward models (RMs). Responses were scored by the following publicly available reward models:
-
FsfairX-LLaMA3-RM-v0.1: https://huggingface.co/sfairXC/FsfairX-LLaMA3-RM-v0.1, CC-BY-NC-4.0 License.
-
RM-Mistral-7B: https://huggingface.co/weqweasdas/RM-Mistral-7B; no license is stated on the model card.
-
ArmoRM-Llama3-8B-v0.1: https://huggingface.co/RLHFlow/ArmoRM-Llama3-8B-v0.1, Llama 3 Community License.
For all models and datasets, we follow their licensing terms and acknowledge the original sources.
J COMPUTE INFRASTRUCTURE
All experiments are simulations over precomputed rewards and run on an internal university CPU cluster; no GPU is needed. A run fixes one configuration, latency model, and set of policies, and is one SLURM job with 20 CPU cores and 20 GB of memory. Within it, every combination of policy, , , and estimated or oracle EI is an independent task of 1,000 Monte Carlo trials for each of the 100 prompts – between 2,840 and 34,648 tasks per run, depending on how many policies and values it covers – and the tasks are spread over the job's cores. Covering the 24 configurations for every experiment in the paper takes about 1,400 such runs. Their median running time is 15 minutes, 90% finish within 34 minutes, and the longest takes under 4 hours; together they use about 8,800 core-hours. The reported tables and figures are computed from the stored results of these runs, with no further simulation.