Aggregation (Scorio.Aggregate)

Test-time scaling utilities live under Scorio.Aggregate (also available as Scorio.Agg and Scorio.agg). Candidate pools are vectors for one question or M × N matrices for a batch. To match Python exactly, returned indices are 0-based and -1 is the no-valid-candidate sentinel.

Scorio.AggregateModule

Answer aggregation and selection for test-time scaling.

Scorio.Aggregate is the Julia port of Python's scorio.aggregate package. It contains per-trace confidence signals, process-reward reductions, fixed-pool selection and voting rules, and online stopping rules.

Candidate pools use N-element vectors for one question or M × N matrices for batches. Returned candidate and token indices deliberately match Python's 0-based convention; -1 denotes that no valid candidate exists.

source

Confidence signals

Scorio.Aggregate.picsarFunction
picsar(logprobs; answer_start=nothing, normalize_reasoning=false)

PiCSAR reasoning-plus-answer log-likelihood. answer_start is the number of tokens before the answer span, matching the Python split index.

source

Process rewards

Scorio.Aggregate.prm_aggregateFunction
prm_aggregate(step_scores; method="last") -> Float64

Reduce one trace's finite per-step process-reward scores using "last", "min", "mean", "prod", or "max".

source

Selection and voting

majority_of_the_bests is also available under the short method alias mob.

Scorio.Aggregate.majority_of_the_bestsFunction
majority_of_the_bests(answers, scores; m=nothing, ...)

Exact mode of the Best-of-N answer under size-m bootstrap resampling. The default is floor(sqrt(n)) over valid candidates.

source
Scorio.Aggregate.cges_voteFunction
cges_vote(answers, scores; allow_other=false, return_index=false, return_score=false)

Select the answer having the largest CGES posterior score. Candidate indices follow Python's 0-based convention and use -1 for CGES_OTHER or an empty row.

source
Scorio.Aggregate.cges_stopFunction
cges_stop(answers, scores; threshold=0.95, include_other=false,
          min_samples=1, return_prob=false)

Stop one sampling stream once the largest checked CGES posterior reaches the requested threshold.

source

Online stopping

Scorio.Aggregate.adaptive_consistency_stopFunction
adaptive_consistency_stop(answers; threshold=0.95, return_prob=false)

Stop candidate sampling when the Beta posterior probability that the leading answer beats the runner-up reaches threshold.

source
Scorio.Aggregate.deepconf_online_stopFunction
deepconf_online_stop(topk_logprobs, threshold; window=2048)

Return Python's 0-based end-token index for the first below-threshold confidence window, or nothing if generation runs to completion.

source