Skip to content

docs+tools: main still says the PARD HRX speedup is 1.50x — it is 1.01x, and the correction missed #1516's merge - #1523

Merged
bong-water-water-bong merged 2 commits into
mainfrom
npu/amd-drafters-4
Nov 8, 2026
Merged

bong-water-water-bong merged 2 commits into
mainfrom
npu/amd-drafters-4

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

The wrong number is in main right now. docs/amd-drafters.md on main still carries 1.50× for the PARD/HRX row. I wrote the correction as a second commit on #1516's branch, but #1516 merged at 0dd6a2db before that commit landed, so it is orphaned on the branch and never reached main. This PR carries it.

The measurement that contradicts 1.50×

first run   (one warm-up discarded):  baseline 40.646 / 51.942 / 46.849 tok/s   <- still climbing through all three samples
                                      draft    71.990 / 70.259 / 57.009 tok/s   -> "1.50x"
settled run (two warm-ups, 4 samples): baseline 75.462 / 76.240 / 76.107 / 74.844  (median 75.785)
                                      draft    77.357 / 77.050 / 76.263 / 75.642  (median 76.656)  -> 1.012x
settled run before it, same shape:                                                -> 1.03x

An HRX first-touch/compile warm-up does not finish inside one request, and the draft arm was measured after the baseline arm, so about half of the published "speedup" was a baseline that had not settled. Verdict for Qwen3-4B ← amd/PARD-Qwen3-0.6B on this iGPU: break-even at ~75 tok/s, not a win.

What changes

  • tools/spec_decode_speedup.sh — SKIP_FIRST (default 1, with this failure written beside it), and every kept sample of both arms printed, so an unsteady baseline is visible in the output instead of hidden inside a median.
  • docs/amd-drafters.md — the table carries the settled 1.012× with sample counts (median of 4, two warm-ups discarded); a paragraph records how the 1.50× happened; a short section says what the corrected number means (at ~75 tok/s the 4 B target is fast enough that a 0.6 B draft spending ~4 decodes per round buys back about what it costs — and PARD's own 1.78×/4.08× come from its tuned runtime, not from AR-mode weights through our server); and it states plainly that acceptance is NOT measured on HRX (that build echoes neither draft_n_accepted nor the rate line), instead of implying it explains the ratio.

Verified

grep SKIP_FIRST tools/spec_decode_speedup.sh     -> 3 (knob, comment, use)
grep -c '1.012×' docs/amd-drafters.md            -> 2  (table + narrative; the 1.50× mentions are the correction itself)
bash -n tools/spec_decode_speedup.sh             -> ok
tools/copyright.py --check (tree staged)         -> rc 0
git add <paths> only                             -> two files

Both source runs were gpu-hold tickets that released the token (576 s and 25 s holds), and no server survived either — the trap this page's harness now carries.

refs #1423 (whose title I already corrected), TAMDCOL.

…_FIRST, and the corrected 1.01x

The 1.50x on HRX that this branch's page and engine#1423 carried is WRONG, and the measurement that contradicts it came from the
same harness inside the same ticket discipline:

  first run (one warm-up discarded):  baseline 40.646 / 51.942 / 46.849 tok/s  (still climbing), draft 71.990 / 70.259 / 57.009
                                      -> "1.50x"
  settled runs (two warm-ups, four samples each):
                                      baseline 75.462 / 76.240 / 76.107 / 74.844  (median 75.785)
                                      draft    77.357 / 77.050 / 76.263 / 75.642  (median 76.656)   -> 1.012x
                                      (the run before it, same shape: 75.785 vs 76.997 -> 1.03x)

So ~50 % of the published "speedup" was an unsteady baseline: an HRX first-touch/compile warm-up does not finish inside one
request, and the draft arm was measured after the baseline arm. The honest verdict for Qwen3-4B <- PARD-Qwen3-0.6B on this iGPU is
BREAK-EVEN at ~75 tok/s, not a win — and docs/amd-drafters.md now says that, including why PARD's own published 1.78x/4.08x
come from its tuned runtime rather than from driving its weights through our server in AR mode.

What changes:
- tools/spec_decode_speedup.sh gains SKIP_FIRST (default 1, with this exact failure written next to it) so the warm-up length is
  a knob; the arm loop discards SKIP_FIRST samples and prints every kept one.
- docs/amd-drafters.md: the table now carries the settled 1.012x with the sample counts, a paragraph on how the 1.50x happened,
  and the statement that acceptance is NOT measured on HRX (that build echoes neither draft_n_accepted nor the acceptance-rate
  line) rather than implying it explains the ratio.

Verified: bash -n; copyright --check rc 0 with the tree staged; git add <paths> only. Both runs were gpu-hold tickets that
released the token (576 s and 25 s holds), no server survived either (the trap from this branch).

(cherry picked from commit 97d3f2c)
@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

#1523 ready for review at ecd3570 — main still ships 1.50× in docs/amd-drafters.md; this carries the corrected 1.012× (two warm-ups, 4 samples per arm, median) plus the SKIP_FIRST knob so an unsteady baseline cannot inflate a ratio again. The commit is a cherry-pick of the one that missed #1516's merge.

@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: CHANGES at ecd3570c878e8a64a5c17107b1fa3581b8d85ca6

The correction itself is right and it's urgent, because main is quoting 1.50× right now. The arithmetic holds: 76.656 / 75.785 = 1.0115. bash -n passes. SKIP_FIRST is wired correctly: with 0 the -le test is never true and it degrades to REQS samples. The one shellcheck warning (SC2155 at :71) was already there before this PR.

Five text fixes are left, all small, but the first two leave the page contradicting itself or quoting numbers with no source:

  1. amd-drafters.md:41, the line that introduces the table, still says "greedy, the first request of each arm discarded". The HRX row right under it now says "two warm-ups discarded". Make the introduction per row, or move the warm-up count into the row cells. The script header has the same stale sentence (spec_decode_speedup.sh:24: "the first request of each being discarded as warmup").
  2. "PARD's published 1.78×/4.08×" (the new "What the corrected number means" section) appears nowhere else in the repo, and not on main. Cite where it's published (the paper's table or the model card, and which target/setting), or drop the numbers. This PR exists because of an unchecked number, so it shouldn't add a new one.
  3. The SKIP_FIRST default is still 1, which is exactly the setting that produced the artefact. A reader who runs "Reproduce with tools/spec_decode_speedup.sh" gets the 1.50× setup again. Default it to 2, or print the exact command for the corrected row in the doc (SKIP_FIRST=2 REQS=4 BIN=… SRV_ARGS='-dev HRX0 …'). I'd do both.
  4. Two pieces of wording don't match the numbers quoted next to them:
    • "the baseline was still climbing through all three measured samples (40.646 → 51.942 → 46.849)". It isn't monotonic: it rose and then fell. "Unsettled" or "swinging" fits.
    • "50 % of 'speedup' was an unsteady baseline". The claimed excess was 0.50 and the real one is 0.012, so about 98 % of the claimed gain was artefact, not 50 %. The PR body's "about half" has the same problem. If you mean "50 points of the ratio", say that.
  5. "a 0.6 B draft spending ~4 decodes per round": 4 is k (K=${4:-4}, the --spec-draft-n-max), which is an upper bound. With acceptance unmeasured on HRX, as the page itself says, the real drafted count per round is unknown. "Up to 4 (k = 4)" says what's known.

Once (1)–(3) are fixed, this is READY from me.

…vendor claim, SKIP_FIRST=2 by default, and wording that matches the numbers

Fixes pi-verify's CHANGES on #1523, all five, each small and each right:

1. The line introducing the table still said "the first request of each arm discarded" while the HRX row underneath said two.
   The warm-up/sample count is now a column of its own ("4 (2)" / "3 (1)"), because the two rows were taken on different days
   with different settled states, and the script header says SKIP_FIRST arms rather than "the first request".
2. "PARD's published 1.78x/4.08x" is now cited instead of asserted: the amd/PARD-Qwen3-0.6B model card claims "an average
   inference speedup of 1.78x" over pure-AR drafts and "up to a 4.08x speedup" in "Transformers+ PARD" -- different drafters and a
   different runtime from the pair measured here, which is exactly why they are quoted as the vendor's claim and not as our
   result. (A PR whose purpose is an unchecked number should not add one.)
3. SKIP_FIRST now defaults to 2 -- one was the setting that produced the artefact -- SKIP_FIRST=0 still degrades cleanly to REQS
   samples, and the page prints the exact command that reproduces the corrected HRX row.
4. Wording made to match the numbers beside it: the baseline is "unsettled" (40.646 -> 51.942 -> 46.849 rises and then falls, so
   not a ramp), and the artefact is "~98 % of the published speedup" / "50 points of ratio", not "50 % of the gain" (claimed +0.50,
   settled +0.012).
5. "up to 4 (k = 4) draft decodes per round" instead of "~4", since k is an upper bound and acceptance is unmeasured on HRX.

Verified: bash -n clean; SKIP_FIRST default is 2; grep for the old wording ("climbing", "50 % of", "~4 decodes") returns only the
corrected sentence that quotes it; copyright --check rc 0 with the tree staged; git add <paths> only.
@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

#1523 ready for review at dbd5d689 — all five points, each taken as written:

  1. Per-row warm-up counts. The table now has a column for it (4 (2) for HRX, 3 (1) for CPU) instead of an introduction that contradicted the row underneath; the script header says "the first SKIP_FIRST requests" rather than "the first request".
  2. The vendor claim is cited. The model card for amd/PARD-Qwen3-0.6B claims "an average inference speedup of 1.78×" over pure-AR drafts and "up to a 4.08× speedup" in "Transformers+ PARD" — different drafters and a different runtime from the pair measured here, which is why they are quoted as the vendor's claim and explicitly not as our result.
  3. SKIP_FIRST defaults to 2 (one was the setting that produced the artefact) and SKIP_FIRST=0 still degrades cleanly to REQS samples; the page prints the exact command that reproduces the corrected HRX row, SKIP_FIRST=2 REQS=4 with the pinned binary and device args.
  4. Wording matches the numbers: the baseline is "unsettled" (40.646 → 51.942 → 46.849 rises and falls, so not a ramp), and the artefact is "~98 % of the published speedup" / "50 points of ratio" — claimed +0.50, settled +0.012 — rather than "50 % of the gain".
  5. "up to 4 (k = 4) draft decodes per round", since k is an upper bound and acceptance is unmeasured on HRX.

Verified: bash -n clean; SKIP_FIRST=${SKIP_FIRST:-2}; a grep for the old wording ("climbing", "50 % of", "~4 decodes") returns only the corrected sentence that now quotes it; copyright.py --check rc 0 with the tree staged; git add <paths> only.

@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 at dbd5d689070017e6ae3a44af14d8e0c6f8cc0047

dbd5d68 closes all five points from my review at ecd3570c:

  1. Warm-up counts.
    • The table now has a per-row "samples per arm (warm-ups discarded)" column: HRX 4 (2), CPU 3 (1).
    • The introduction no longer claims one warm-up for every row, and grep "first request of each" on the page now finds nothing.
    • The script header describes SKIP_FIRST.
  2. The vendor numbers are cited, and I checked them against the source. The amd/PARD-Qwen3-0.6B model card reads "Compared to pure AR draft models, PARD achieves an average inference speedup of 1.78×" and "When integrated into an optimized inference framework called Transformers+ PARD delivers up to a 4.08× speedup". The doc quotes both correctly and labels them as the vendor's claim and a different setting, not our result.
  3. SKIP_FIRST defaults to 2, and the doc gives the exact command that reproduces the HRX row (SKIP_FIRST=2 REQS=4 …, k = 4).
  4. The wording matches the numbers: "unsettled … rose and then fell", and "+0.50 vs +0.012 of ratio, ~98 %".
  5. The draft count is now stated as an upper bound: "up to 4 (k = 4) … the upper bound since acceptance is unmeasured on HRX".

At this head: bash -n tools/spec_decode_speedup.sh passes, tools/copyright.py --check exits 0, and the two remaining "1.50×" mentions on the page are the correction itself.

One small note, not blocking: per the card, the 4.08× is a LLaMA3 figure. Adding "(LLaMA3)" after it would make clear it isn't a Qwen3 number.

@bong-water-water-bong
bong-water-water-bong merged commit 0a65940 into main Nov 8, 2026
8 of 9 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the npu/amd-drafters-4 branch November 8, 2026 19:07
bong-water-water-bong added a commit that referenced this pull request Nov 8, 2026
… what the page now measures (#1530)

#1523 corrected this page's numbers - the HRX speedup is 1.01x, not the 1.50x published
once - and its own body now states the verdict plainly: "break-even for this pair, not
a win" (amd-drafters.md:79). Two places did not get the correction:

- the page's H2 still read "they run, and they pay on the device", contradicting its own
  measurement table (1.012x) and the paragraph under it
- serve.md's --dflash section, where I linked this page in #1494 hours before #1523
  merged, repeated the same phrase ("run here and pay on the device")

Both now say break-even. serve.md keeps the number and the correction's history in one
clause (1.01x, not the 1.50x published once) so the next reader who remembers 1.50 finds
the retraction instead of re-deriving it.

No number is new here: 1.012x row, "1.01x, not 1.50x" and "break-even for this pair" are
all already in the page's body.

Co-authored-by: bong-water-water-bong <[email protected]>
bong-water-water-bong added a commit that referenced this pull request Nov 9, 2026
…o pickers (engine#1485)

tests/serve_port.sh reads the port `1bit serve` bound out of its ready line, and the route tests
use it. The scripts that drive the vendored llama-server directly could not: its line is
`srv  http_bind: listening on http://HOST:PORT`, so free_port() (bind, note the port, close,
launch) stayed in two of them and with it the release-then-bind window engine #1444/#1485 named -
on a `ctest -j` runner another serve can take the port before this one binds, and the arm then
reports "the server did not come up", which reads as a bug in whatever the row checks.

llama.cpp already binds an ephemeral port for --port 0 (bind_to_any_port, tools/server/server-http.cpp)
and logs the address it ended up on, so the fix is the read-back, not a server change:
llama_port_from_log/llama_port_wait sit beside the serve pair, and
 - tests/hrx_cpu_weight_parity.sh drops free_port() for --port 0 + llama_port_wait
 - tests/greedy_shortcut.sh drops a local end-anchored sed for the shared serve_port_wait (its
   pattern matched only serve's plain ready line; the laya shapes carry a suffix after the port,
   which is the #1523/#1525 finding this test now pins)

tests/serve_port_test.sh is script-based, so CI runs it with no device and no model: it feeds both
parsers the exact lines the two servers print (including the suffixed and IPv6 shapes) and drives
the failing wait with a process that is already gone. Mutating serve_port_from_log back to an
end-anchored pattern fails two of its checks, which is what the old local parser was.
bong-water-water-bong added a commit that referenced this pull request Nov 9, 2026
…o pickers (engine#1485) (#1663)

tests/serve_port.sh reads the port `1bit serve` bound out of its ready line, and the route tests
use it. The scripts that drive the vendored llama-server directly could not: its line is
`srv  http_bind: listening on http://HOST:PORT`, so free_port() (bind, note the port, close,
launch) stayed in two of them and with it the release-then-bind window engine #1444/#1485 named -
on a `ctest -j` runner another serve can take the port before this one binds, and the arm then
reports "the server did not come up", which reads as a bug in whatever the row checks.

llama.cpp already binds an ephemeral port for --port 0 (bind_to_any_port, tools/server/server-http.cpp)
and logs the address it ended up on, so the fix is the read-back, not a server change:
llama_port_from_log/llama_port_wait sit beside the serve pair, and
 - tests/hrx_cpu_weight_parity.sh drops free_port() for --port 0 + llama_port_wait
 - tests/greedy_shortcut.sh drops a local end-anchored sed for the shared serve_port_wait (its
   pattern matched only serve's plain ready line; the laya shapes carry a suffix after the port,
   which is the #1523/#1525 finding this test now pins)

tests/serve_port_test.sh is script-based, so CI runs it with no device and no model: it feeds both
parsers the exact lines the two servers print (including the suffixed and IPv6 shapes) and drives
the failing wait with a process that is already gone. Mutating serve_port_from_log back to an
end-anchored pattern fails two of its checks, which is what the old local parser was.
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