Repository navigation
hyperloom custom: the result records whether the served decode drafted (#1062) - #1063
Conversation
#1062) `bench_summary.drafting` answered only "which drafter *file*" and returned `{}` when no drafting lever was set. On this pin that is not "no drafting": the GGUF carries its own MTP head and `1bit serve` drafts with it unless `--no-mtp`/`ONEBIT_NO_MTP=1`. Measured, 2026-11-04 22:39 (Qwen3.8-27B UD-Q4_K_XL, 20_480 ctx, score 13.03 tok/s decode at 18_762 tokens): the artifact recorded `drafting: {}` while its own serve.log said `--spec-type draft-mtp`, recipe `qwen35-mtp-max-3`, and the scored long leg drafted `mean len 3.02` at `0.67460` acceptance (85 accepted / 126 generated). That is worth recording because the cap moves the score: `HL_MTP_MAX=6` costs ~18 % of 18.8k decode against the default here (paired arm in one claim, 2026-11-03 17:15) and `HL_MTP_MAX=0` moves `tg128` from 11.80 to 8.83 (2026-11-01). Two rows differing only in the unset default recorded identical `drafting`/`levers` and were silently incomparable -- the same rule as `model`/`build`/`device_stack`/`placement` (#993/#1008/#996): the result names the input it was measured with. `drafting_summary()` now records both halves: `requested` (`null` = no lever set, pin default applied; `{"HL_MTP_MAX": "0"}` = deliberately non-drafting) and `serve` (spec type, draft recipe and args, accepted/generated counts, mean accepted length), parsed from the run's own serve.log so it does not depend on reading the pin's defaults correctly. It reports, it does not check: a log without drafting stays `None`. `drafting_identity()`'s existing contract is unchanged, so this only adds fields.
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY at b95ffd9e — the bug is real on the artifact it cites, and the new parser reproduces every value from the very log that exposed it.
The gap, on the artifact itself (~/hyperloom-ws/window-20261104/arm_74_longctx.json):
bench_summary.drafting {} <- the record
bench_summary.serve_tok_s {"long": 13.03, "short": 17.70, …} <- the score in the body
bench_summary.longctx {"ctx_tokens_requested": 18800, "ctx_tokens_actual": 18762, "decode_tokens": 128, …}
so 13.03 tok/s at 18,762 tokens is exactly what the file says, and the drafting field says nothing while the same run's logs-arm_74_longctx/serve.log reports drafting.
The parser, run against that real log (not a fixture):
{"spec_type": "draft-mtp", "recipe": "qwen35-mtp-max-3", "recipe_args": "--spec-draft-n-max 3",
"tasks_reporting": 12, "accept_rate_last": 0.6746, "accepted_last": 85, "generated_last": 126,
"mean_acc_len_last": 3.02, "mean_acc_len_max": 3.81}
Every value the body quotes is there — draft-mtp, qwen35-mtp-max-3, --spec-draft-n-max 3, 0.67460, 85 / 126, mean len 3.02 — and the last acceptance line in the file (task 532) is the one it picks, which is the right one to pick.
Tests and the control. tests/hyperloom_benchmark_test.py → OK rc 0. With drafting_observed() forced back to its pre-#1063 behaviour (return None), the same test fails at assert got["spec_type"] == "draft-mtp"; restored, it passes again. The "unset is not off" half is pinned too: no lever set → requested: None and a requested_note, HL_MTP_MAX=0 → {"HL_MTP_MAX": "0"} with no note.
Placement of the change is right. It is assigned in the serve path only (benchmark.py:802, serve_measure), while the llama-bench path keeps drafting_identity() at :765 — correct, because llama-bench does not draft, so an empty record there is the truth rather than a gap. And drafting_identity()'s {} contract is untouched, so nothing that reads the old shape breaks.
Three small notes, none blocking:
- The negative control fails as
TypeError: 'NoneType' object is not subscriptablerather than with the assertion's own message.assert got is not None and got["spec_type"] == "draft-mtp"would make a future regression print the sentence the test intends to print. tasks_reportingis 12 on the real log, not 2 as in the fixture — it counts every timing block that reported (all legs), which is honest but easy to read as "one per task". The*_last/*_maxfields are the ones that carry meaning; a one-word rename (timing_blocks) or a comment would remove the ambiguity.- For a reader of the JSON alone,
bench_summary.kldisnullon this arm, so the body's "gate PASS (KLD 0, texts identical)" cannot be confirmed from the artifact — it lives in the gate output. Not this PR's business, but the same argument asdraftingapplies one field over.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY at 1705799b (rebase-only; the review stands).
This PR's own files are byte-identical between the heads — the rebase brought other PRs' content with the new base:
git diff b95ffd9e…1705799b -- tools/hyperloom/custom/benchmark.py tests/hyperloom_benchmark_test.py -> 0 changed lines
So everything in my verdict holds: drafting_observed() on the real arm_74_longctx serve.log returns draft-mtp / qwen35-mtp-max-3 / --spec-draft-n-max 3 / 0.6746 / 85 / 126 / mean len 3.02, the same run's artifact is the one that had drafting: {}, the test passes and bites when drafting_observed() is forced back to None, and the record is assigned on the serve leg only (benchmark.py:802) while llama-bench keeps drafting_identity() because it does not draft.
Closes #1062.
Root cause
drafting_identity()names the drafting files the workload passes (HL_DFLASH,HL_MTP_HEAD) andreturns
{}when neither is set. On this pin{}is not "no drafting": the GGUF carries its own MTP headand
1bit servedrafts with it unless--no-mtp/ONEBIT_NO_MTP=1. So unset (serve's recipe default,draft length 3) and
HL_MTP_MAX=0(deliberately off) serialised identically, and neither said whether thedecode that produced the score drafted at all.
The measurement that exposed it
arm_74_longctx.json, 2026-11-04 22:39 on7.4.0-rc1-1bit, Qwen3.8-27B UD-Q4_K_XL,HL_CTX=20480 HL_LONGCTX=18800, score 13.03 tok/s decode at 18,762 tokens, gate PASS (KLD 0, texts identical):the same run's
serve.log:The cap is not decorative:
HL_MTP_MAX=6costs ~18 % of 18.8k decode against the default on this box(paired arm inside one claim, 2026-11-03 17:15), and
HL_MTP_MAX=0movestg128from 11.80 to 8.83(2026-11-01). Two artifacts differing only in an unset default were therefore indistinguishable.
Fix
drafting_summary(serve_log)replaces the bare identity inbench_summary.draftingfor a servedmeasurement and records both halves:
requested—nullwhen no drafting lever was set (the pin's own default applied), otherwise the envthat was set, so
{"HL_MTP_MAX": "0"}is distinguishable from unset;serve— parsed from the run's own log:spec_type,recipe/recipe_args,tasks_reporting,accept_rate_last,accepted_last/generated_last,mean_acc_len_last/_max.It reports, it does not check (same posture as
placement_summary): a log with no drafting staysNonerather than an object that reads as
off, anddrafting_identity()keeps its existing{}contract, sothe change only adds fields.
Before / after, same run, same log
Tests
The new block parses the four verbatim log lines above (including serve's mid-sentence flag, whose trailing
;is why the spec pattern is punctuation-bounded), assertsNonefor a log with no drafting and for amissing log, and pins the unset-vs-
HL_MTP_MAX=0distinction. Existing assertions ondrafting_identity()are untouched and still pass.