Expand description
2026-09-26: Shared measurement helpers: accept length, prompt synthesis, percentiles, median and formatting.
Owner: bench. Invariants:
percentileuses the nearest-rank rule ofpctinbench/bench_concurrency.py, over the finite values only.make_promptwith an empty tag uses that script’s word list and word count. Checked 2026-09-26 by running both: the texts are equal up to an ISL of 1104; above it the script emits fewer words than it asks for.
Structs§
- Percentiles
- 2026-09-26: p50 / p90 / p99, each from
percentile.
Enums§
- Prompt
Mode - 2026-09-26: Should the prompt push the model to fill the output budget?
Functions§
- accept_
len - 2026-09-26: Emitted tokens per decode step,
completion / (completion - accepted): 1.0 when no draft token was accepted.decode_floorandconcurrencyboth read this one rule. - fmt_ms
- 2026-09-26: Format an optional millisecond value for a table cell: seconds
from 10 s up, and
—for none, negative or non-finite. - make_
prompt - 2026-09-26: Build a prompt of roughly
isl_tokenstokens. A non-emptyprefix_tagopens the prompt as[tag]: a unique tag gives a prompt no earlier request shares, and a constant tag gives the same prompt every time. - median
- 2026-09-26: True median of the finite values: the middle element for odd
n, the mean of the two middle elements for evenn. Notpercentile(values, 50), whose index for n=3 is 2, the maximum. - pct_
delta - 2026-09-26: Relative change
newvsbase, in percent.Nonewhen either is non-finite,baseis not positive, or the result is not finite. - percentile
- 2026-09-26:
p-th percentile (0–100) ofvalues, nearest rank:idx = min(int(n*p/100 + 0.5), n-1)over the sorted finite values.