Skip to content

Perf/modernize batched api - #39

Merged
rayondemiel merged 3 commits into
mainfrom
perf/modernize-batched-api
Sep 20, 2026
Merged

rayondemiel merged 3 commits into
mainfrom
perf/modernize-batched-api

Conversation

@rayondemiel

Copy link
Copy Markdown
Member

No description provided.

rayondemiel and others added 3 commits September 20, 2026 16:18
…ow path

A line whose modernized form the divergence guard refused was sent back
on its own with `batch_size=1`. On the batched VieuxParler that value no
longer sizes anything: it selects the line-by-line reference path, which
runs at a tenth of the batched throughput on a GPU. Measured against the
service on an RTX 4070 Ti, 128 such retries took 5.9 s with
`batch_size=1` and 2.6 s without — and every retried line came back
byte-identical to the answer the guard had just refused. The model is
deterministic; the retry could never change a verdict, it only cost
time proportional to the rejections.

The second phase is gone: a refused reading keeps its original text on
the first pass, counted in block 2 as before. With it go the two
counters that only it fed (`lines_retried`, `retries_unreachable`) and
`Code.RETRY_UNANSWERED`, which nothing could emit any more — the quality
gate refuses an incident code without a producer. The request no longer
carries the `batch_size` field at all: the service ignores it, and the
one value that still does something is the slow path.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tsg6ptZSCVon8tPnpm9TSS
The batched VieuxParler packs whatever is in flight into model batches
sized by its own token budget — about 6 500 tokens on a 12 GB GPU,
roughly one printed page of 256 lines. Replayed against the service on
an RTX 4070 Ti with eight requests in flight: 64-line requests moved
181 lines/s, 256-line requests 207 lines/s, one request for everything
254 lines/s; outputs identical in every case. A 256-line request still
answers in a couple of seconds on the GPU, and in under half a minute
on a CPU, well inside the 300 s timeout.

The user guide now says how to run the service from its GPU image and
what to lower on a CPU (the concurrency, not the batch size).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tsg6ptZSCVon8tPnpm9TSS
…old it

`scripts/mutate.py --changed` let three mutations of that one line
survive: nothing asserts on a log message, and the per-line DEBUG entry
just above already names every refused reading. Gone rather than
tested.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tsg6ptZSCVon8tPnpm9TSS
@rayondemiel
rayondemiel merged commit 603493e into main Sep 20, 2026
1 check 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