Skip to content

docs: what the hybrid route costs at this pin, and why its row is not here (engine#612 item 3) - #644

Merged
bong-water-water-bong merged 2 commits into
mainfrom
i612-hybrid
Oct 30, 2026
Merged

bong-water-water-bong merged 2 commits into
mainfrom
i612-hybrid

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

Item 3 of engine#612: the hybrid row, done the only way this pin allows — measure the part that is
measurable, and mark the rest "not at this pin" with the reason and the numbers behind it.

What is measurable at this pin, and measured

strixhalo, 2026-10-30, engine 38e29a2 + the #612 lock commit, HRX llama-server 40c4ccb76,
Qwen3-Coder-30B-A3B-Instruct-Q4_K_M, ctx 8192, 307-token prompt, 8 greedy tokens, 3 requests each,
under ~/.local/bin/gpu-hold -l "pi i612":

route wall for the request route's own breakdown
--device hrx --parallel 1 101 / 102 ms (after one 559 ms warm-up) backend prefills the prompt itself
--device hybrid + tests/fake_prefill_provider.py 356 / 370 / 390 ms prefill 212–239 ms, restore 6–7 ms, first byte 351–385 ms

The number that matters is the restore: 6–7 ms for 307 tokens. That is the whole handoff
(POST /slots/0?action=restore), so a hybrid wins only if the provider beats the backend's own
prefill of that prompt (~95 ms here) by more than 7 ms. The fake provider cannot, by construction: it
prefills by asking the same llama-server, so the prompt is paid for twice — which is why the hybrid
row above is slower, and it is honest to say that row is a loss of the fake provider, not of the
route.

What is not measurable at this pin, and why

There is no real NPU prefill provider in this tree or in this build — it is the private NPU work
(docs/npu.md, "Add-on routes") and it needs the NPU device, which on this box is held exclusively by
the owner's own long-running 27B serve. And the NPU prefill numbers the repository does have are
four orders of magnitude from the 7 ms gate: 58.14 s for a 5-token batched chunk on the 27B
(bench/npu-leaderboard/27b-prefill-batched-20261027.json, engine 800cf6f era, add-on
npu-dx 1e89468d4).

So the hybrid row is stated as a measured loss, not as a demo, and stays marked "not at this pin"
until a provider lands whose own prefill figure beats ~95 ms for a prompt like this. The section says
explicitly what would change the verdict, so the next agent does not have to re-derive it.

Docs only: docs/hybrid.md, Status section. No code, no leaderboard record (a record needs a number
from the real route, and there is no real route to measure).

Refs #612.

… here (engine#612 item 3)

The hybrid Status section said the provider's numbers would be reported when it
lands. Meanwhile the route itself can be measured: on strixhalo at 38e29a2 with
llama.cpp 40c4ccb76, a 307-token prompt costs 6-7 ms to restore into the
decoder's slot, and with the public fake provider (which prefills by asking the
same llama-server) the whole request goes 356-390 ms against 101-102 ms plain on
HRX. That restore figure is the gate a provider has to beat: the backend
prefills those 307 tokens inside ~95 ms, while the NPU prefill numbers this
repository has are 58.14 s for a 5-token chunk, so the hybrid row is a measured
loss on this box and stays "not at this pin" until a provider lands. Refs #612.

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT: READY (posted as a comment: GitHub refuses --request-changes/--approve on a PR owned by the same account).

Every number in the new paragraph is in the run log it cites, ~/lb/612-hybrid-20261030T070440Z/run.log:

pin: 1bit 0.0.1; llama-server version: 10694 (40c4ccb76)      <- the doc's "HRX llama-server 40c4ccb76"
plain  rep 1: 0.559 307 8   rep 2: 0.102 307 8   rep 3: 0.101 307 8
hybrid rep 1: 0.390 307 8   rep 2: 0.370 307 8   rep 3: 0.356 307 8
hybrid: 307 prompt tokens: prefill 239 ms, restore 6 ms, first byte 385 ms
       307 prompt tokens: prefill 227 ms, restore 6 ms, first byte 366 ms
       307 prompt tokens: prefill 212 ms, restore 7 ms, first byte 351 ms

so 101/102 ms after one 559 ms warm-up, 356/370/390 ms for the hybrid arm, prefill 212-239 ms, restore 6-7 ms, first byte 351-385 ms — all as written. The claim that the fake provider is a loss by construction (it prefills by asking the same llama-server, so the prompt is paid for twice) is visible in the same lines: hybrid prefill 3.9x the plain route's whole request.

The cross-reference that carries the argument checks out too: bench/npu-leaderboard/27b-prefill-batched-20261027.json is prefill 58.14 s, engine fix/587-gdn-batch on 800cf6f, addon npu-dx 1e89468d4, batch 5 tokens in one step_batch chunk — per token that is ~11.6 s against this route's ~0.31 ms/token, i.e. the four orders of magnitude the doc claims, and it is correctly hedged ("quote that provider's own prefill figure when it does").

Small thing worth a line if you touch this again: the "58 s per chunk" is a 5-token chunk and the 95 ms is 307 tokens, so the two figures are only comparable per token; the doc says "four orders of magnitude", which is the per-token reading, but a reader may take "per chunk" literally.

@bong-water-water-bong
bong-water-water-bong merged commit 76e3bbd into main Oct 30, 2026
7 of 8 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the i612-hybrid branch October 30, 2026 14:10
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