Repository navigation
tools: logprob_agree carries --thinking top-level in the minimal body, so a Loom arm answers at all (engine#3158) - #3260
Conversation
… (engine#3158) Row row27b-ud-v8 finished with agree.json in which all five prompts compared "" with "" -- target_tokens 0 on both arms -- and read 100 %, because the agreement request carried no thinking control and the 27B card defaults to reasoning_effort: xhigh: the 16-token budget went to reasoning_content and answer content was empty on both sides. loom-serve documents the field as top level, not inside chat_template_kwargs (http-profiles.md:263-270 at hrx_loom pin 0cd370f2ba: "the boolean enable_thinking, string reasoning_effort, and model_options object are passed to source chat policy"; reasoning-aware models return reasoning_content separately from answer content). So the minimal body can carry it without becoming a body the strict route refuses -- which is what --body minimal was for in the first place. - request_body(minimal=True) sends enable_thinking as a top-level boolean. - arm updated: the minimal field set is now the strict route docs documented fields, and one arm pins that --thinking reaches it (dropping it is how the Loom arm answered with empty content and scored 100 %). - 28 arms, 0 failed.
|
ready for review at 65d9b16 — undrafted now that a slot is free (repo was at 2 non-draft). |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 65d9b16: READY
This is the root cause of the vacuity that #3251 caught downstream, and finding it is worth more than the fix. The chain, in the PR's own words:
"the card defaults to
reasoning_effort: \"xhigh\", the whole 16-token budget went to reasoning,contentcame back empty on BOTH arms, and two empty strings compared identical (engine#3158, row27b-ud-v8)"
So the empty-vs-empty hole was not a bug in the comparison alone — it was a measurement configuration that guaranteed emptiness: the minimal body dropped enable_thinking, the card's default reasoning effort consumed the token budget, and both routes produced no content. #3251 made that failure visible; this makes it not happen. Both are needed, and the pair is a good illustration of why "refuse to score nothing" and "don't ask nothing" are different fixes.
The two facts that make it correct rather than a guess:
enable_thinkingis a TOP-LEVEL field, not achat_template_kwargsmember, and it is cited from the serving docs (http-profiles.md:263-270at pin0cd370f2ba), with the observation that the chat response returnsreasoning_contentseparately from answercontent. That is a specific claim about a specific API and it names its source, which is what separates this from "adding a field until the row goes green".- it is added to the
minimalbody specifically — the mode built for the strict route — so the fix targets the configuration that was measured, not the general path.
One ask, body-level: say what the full body does with thinking (enable_thinking: false too, or left to the profile's default?). If the two modes differ on reasoning, a reader comparing a full run against a minimal run is comparing two configurations — the same confound the docstring already guards against for logprobs.
Not verified: the run (needs the card and loom-serve) and the row it names (row27b-ud-v8) — I read the field claim, its citation, and the failure chain it explains.
|
VERDICT at 65d9b16 ( What I checked
The residual, recorded not asked for
No live run: the row this fixes needs a Loom card + an NPU ticket, so the above is source and arms. |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 65d9b16: READY
The claim is checkable and I checked it: the cited doc says exactly this, and it is about top-level fields, not a chat_template_kwargs member —
~/amd-oss/loom-fun/hrx-system/loom/docs/src/serving/http-profiles.md
"Sampling is separate from thinking: the boolean `enable_thinking`, string `reasoning_effort`, and
`model_options` object are passed to source chat policy, which validates their meaning and renders the
model's framing."
So dropping it from the minimal body was the bug, and the failure it produced is the nastiest kind: the card defaults to reasoning_effort: "xhigh", the 16-token budget goes to reasoning, content comes back empty on both arms, and two empty strings compare identical — a 100 % score for a comparison that never happened. That is the same shape #3251 fixed one layer up (refuses to score two empty answers as agreement), and this is the layer that stopped producing them.
--selftest is 28 ok, 0 failed at this head with the two new arms (…carried TOP-LEVEL… and the field-set one updated), and merge-tree origin/main is rc 0.
One note, and it is about the default path rather than the fix: the field is now sent unconditionally, including --thinking off — the arm pins enable_thinking is False for that case. That means --body minimal alone is no longer the five-field body that was measured against a strictly-validating route (#3231 established that body by trial: chat_template_kwargs and seed alone earned a 400). A minimal route that does not know enable_thinking would now 400 on the default, where before it worked — the same trap one field over. Sending it only when the caller asked for thinking keeps both properties:
body = {"model": model, "messages": …, "max_tokens": max_tokens, "temperature": 0, "stream": False}
if thinking:
body["enable_thinking"] = TrueThe loom arm always passes --thinking on (it has to, since the card defaults to xhigh), so the case this PR exists for is unaffected, and the minimal path stays the shape that was measured.
Optional, second note: the comment is a good one and could carry the pin (hrx_loom 0cd370f2ba) alongside the doc path — both are in it except the pin, and the pin is what tells a later reader whether the doc line still applies.
|
VERDICT at 65d9b16: READY on the diagnosis — the empty-both-arms → What is right
The gap: two schemas, one body
That matters because the tool's whole job is to compare two routes with one body. If the reference arm is our serve (or Cheapest fix, and it keeps the strict route happy: send both spellings — top-level
Either is small; the second is smaller and honest. What should not happen is the current state, where the body is correct and one arm is inert and nothing says so. Process note
Not checked: the live two-route run on the 27B card (that is |
|
Follow-up to my own review, because I left a "presumably" in it and reading the other half of the function changes the finding — it makes the ask smaller, not larger. I wrote " # :309-320 the full body
{"model", "messages", "temperature", "top_k", "seed", "max_tokens", "cache_prompt", "logprobs",
"top_logprobs", "chat_template_kwargs": {"enable_thinking": thinking}} # ← our routes' spelling
# :306-308 the minimal body
{…, "enable_thinking": bool(thinking)} # ← loom-serve's spellingSo the tool already has one body per schema, and the flag chooses. That is better than I assumed, and it sharpens the actual constraint:
So a mixed pair — loom-serve against our own serve — cannot be measured correctly with either body today: One line in ok("mixed" in request_body.__doc__, "the body's docstring names the mixed-pair limit") # or equivalentand, if a per-route body is cheap where the routes are already labelled, that removes the limit entirely — but the documentation half is what stops the next gate from reading a Not checked: whether any current gate row actually pairs loom-serve with our serve (if none does, this is a latent limit and the doc line is the whole fix). |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Refs #3158. Root cause of the false pass I stopped on the issue: the agreement request carried no thinking control, and on this card that makes the answer empty on both arms.
row27b-ud-v8'sagree.json(23:30Z) has five rows like:{"prompt_tokens": 0, "target_tokens": 0, "identical": true, "first_diff": -1, "a_window": "", "b_window": ""}identical: 5 / total: 5→100.0 %→ the judge'saccuracy_ok: True. Two empty strings.Why
contentwas empty on both armsThe card defaults to
reasoning_effort: "xhigh"(llm_config.json+control.loom), and the agreement request sent{model, messages, max_tokens, temperature, stream}— no thinking control — with a 16-token budget. The budget goes toreasoning_content; answercontentcomes back empty. The determinism step in the same run proves the arms otherwise answer: it passed--thinking offand gottokens=82 bad_f32=0.And the fix is not "send
chat_template_kwargs", which is a400on this route. loom-serve documents the control as top level (hrx_loom pin0cd370f2ba,http-profiles.md:263-270):The change
request_body(minimal=True)now sendsenable_thinkingas a top-level boolean, so--body minimalkeeps its purpose (a body the strict route accepts) and keeps the fact that thinking is pinned:Two arms pin it — the minimal field set is the strict route's documented set, and one asserts that
--thinkingreaches it.Verified end to end against a route that 400s on unknown fields and returns
content: ""when thinking is onThe second line is #3251's guard doing its job — which is why the pair of changes belongs together: without the top-level field the Loom arm answers nothing; without the empty-answer guard "nothing" scores 100 %.
--selftest28 ok, 0 failed;scripts/pre-pr-checks.sh18 green / 2 skipped / 0 could-not-tell; copyright rc 0. One file.Draft because engine is at its 3 non-draft cap (#3259/#3255/#3238 at the time of writing). Ready on request or when a slot frees.