feature: add adaptive-N allocation and staged early stopping
#2 863 ouverte le 11 août 2026
Métriques du dépôt
- Stars
- (4 293 étoiles)
- Métriques de merge PR
- (Métriques PR en attente)
Description
Summary
Allocate candidate sampling compute per request and stop staged generation when additional samples are unlikely to justify their cost.
Parent research tracker: #2337
Blocked by: #1456, #2855, #2858, #2861, #2862
Motivation
Fixed-N sampling wastes compute on easy/high-agreement requests and may under-spend on difficult/high-entropy requests. Sequentially generating one sample at a time can save tokens but harms latency and GPU batching. The Router has request-level complexity and decision-confidence evidence, while a Best-of-N runtime will provide answer agreement and verifier outcomes; these should drive bounded staged allocation.
Research context
- ACL 2026 Seer Self-Consistency uses cheap System-1 answer entropy to allocate parallel System-2 samples in advance, reporting lower token use and latency.
- ICLR 2026 Best-of-Infinity adapts N from answer agreement and extends weighting across multiple models.
- NeurIPS 2025 Every Rollout Counts (DORA) shows allocation by individual candidate count over-invests in duplicated reasoning directions.
- NeurIPS 2025 Does Thinking More Help? supports parallel paths over blindly extending one chain.
Proposed rollout
Phase 1: agreement-based staged sampling
- Start with a small parallel batch.
- Normalize/cluster answers and compute agreement with a confidence interval.
- Stop when the configured posterior/agreement criterion is met; otherwise reserve and launch the next bounded batch.
- Never exceed #1456/#2861 budgets.
Phase 2: advance allocation
- Use immutable Router evidence such as complexity and decision confidence.
- Optionally run a cheap non-reasoning/System-1 probe to estimate answer entropy.
- Allocate the System-2 batch size before parallel dispatch, preserving latency efficiency.
Phase 3: direction-aware allocation
- Cluster candidates by answer and reasoning direction.
- Spend additional rollouts across distinct promising directions rather than overrepresented duplicates.
Each phase requires a separate benchmark result and can land behind an explicit experimental mode.
Non-goals
- Do not add online model training or change Router signals during Looper execution.
- Do not implement global batch/capacity scheduling in the per-query router.
- Do not bypass fixed hard budgets when confidence is low.
- Do not enable adaptive allocation by default based only on smoke tests.
Acceptance criteria
- Adaptive policy consumes the typed evidence/budget contracts from #2861.
- Fixed-N remains available as the deterministic baseline.
- Every extra batch is reserved before dispatch and has a replayable allocation reason.
- Stopping criteria are calibrated on held-out data and avoid zero-as-missing confidence semantics.
- Fixed-average-budget evaluation shows quality equal to or better than fixed-N with lower tokens or latency.
- Easy/hard, low/high disagreement, and same/mixed-model slices are reported separately.
- Fallback behavior is deterministic when normalization, entropy probing, or verification fails.
- E2E covers immediate stop, maximum-N exhaustion, timeout, and hard-budget refusal.