Skip to content

Measure cold prefill, not a cached replay, and report the network floor - #43

Merged
huangxinV587 merged 2 commits into
mainfrom
branch/ds-deploy-pool-20261107-r1
Nov 8, 2026
Merged

huangxinV587 merged 2 commits into
mainfrom
branch/ds-deploy-pool-20261107-r1

Conversation

@huangxinV587

Copy link
Copy Markdown
Contributor

Two defects made the earlier comparison unsound without looking wrong.

Prefix cache. Repeating an identical prompt measures a cache hit. One retrieval case read 0.52 s / 3.14 s / 0.56 s across three samples; the median reported 0.56 s for what is physically a 3.1 s cold prefill. --cache-bust gives every sample a unique one-line system prefix. Cases declaring turns are exempt because observing prefix reuse is their purpose.

Warmup. First-request compile and graph-capture costs leak into samples. --warmup N discards N runs per case.

Network floor. TTFT measured across a tunnel contains transport time. The receipt now records network_floor_ms from five metadata reads. In the two deployments measured here the floors were 3 ms and 125 ms; subtracting it changed the longest-context result from a wide gap to parity.

Receipt schema goes to 3 and records warmup and cache_bust, so a warm result can never be read as cold. docs/benchmarks.md documents all three traps. 243 tests pass.

Two defects made earlier comparisons unsound without looking wrong.

First, repeating an identical prompt measures a prefix-cache hit rather than a
prefill. One retrieval case read 0.52 s and 0.56 s on two of three samples and
3.14 s on the other; the fast pair was a cache hit, and taking the median
turned a 3.1 s cold prefill into 0.56 s. `--cache-bust` now gives every sample
a unique one-line system prefix, so each measurement is a cold prefill. Cases
declaring `turns` are exempt: their whole purpose is to observe prefix reuse.

Second, the first request against a schema or a fresh engine pays compile and
warmup costs that later samples do not. `--warmup N` discards N runs per case
before sampling.

Third, a TTFT measured across a tunnel or a WAN hop contains transport time.
The receipt now records `network_floor_ms` from five metadata reads, so a
reader can separate "engine was slow" from "the client was far away". On the
two hosts used here the floors differed by two orders of magnitude, which
changes the conclusion for the longest case from a wide gap to parity.

Receipt schema goes to 3 and records `warmup` and `cache_bust` so a result can
never be read as cold when it was warm.
@huangxinV587
huangxinV587 merged commit e0047fb into main Nov 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant