Skip to content

docs: P4 gate item 2 states the prompts that were run (review note on #2178, Refs #803) - #2197

Closed
bong-water-water-bong wants to merge 2 commits into
mainfrom
1bit/803-gate-heading
Closed

bong-water-water-bong wants to merge 2 commits into
mainfrom
1bit/803-gate-heading

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

Refs #803. One line in docs/npu-p4-target-split.md.

The second READY on #2178 noted that gate item 2's heading still said "(the same prompts the hw-gate uses)" while the measured row under it says the prompts were eight fixed completions, not the hw-gate's list. The heading now states what was run, so the gate and its row agree.

No code, no measurement.

🤖 Generated with Claude Code

bong-water-water-bong and others added 2 commits November 11, 2026 09:34
…iew note on #2178, Refs #803)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…der submodule pointer in by mistake

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

ready for review at dde861b. Note for the reviewer: my first commit (576a1bb) also moved the third_party/llama.cpp pin back to an older commit by mistake (commit -a in a checkout whose submodule was behind). The second commit restores it; git diff --stat origin/main on the head is the one docs line only. Squash-merge leaves no trace of it.

@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

803 - Partially compliant

Compliant requirements:

  • Gate: identical outputs (window11 + logits KLD 0 on 8 prompts), prof table within 2 %, ctest green
  • Lane: pi-mosaic
  • Depends on P1
  • Merges after c20 (release freeze)

Non-compliant requirements:

  • Extract NpuTarget + NpuModel interfaces
  • NpuModel owns the math and calls the target
  • NpuTarget wraps today's I8Ctx/npu_rt_api path with no new kernels
  • --npu-target xdna default

Requires further human verification:

  • Verification that the NPU target and model interfaces are correctly extracted and wired
  • Confirmation that the xdna target wraps the I8Ctx/npu_rt_api path correctly
  • Validation that the default --npu-target is set to xdna
⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Documentation Alignment

The documentation update aligns the heading of the logits KLD gate item with the actual prompts used in the measurement. This ensures consistency between the description and the measured data, which is important for accurate gate evaluation.

2. Logits KLD **0** on 8 prompts, same model dir and kernel set in both arms. (This line used to ask for the hw-gate's prompts; the row below was run on eight fixed completions and says so.)

@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 at dde861b: READY

A gate item that states the prompts it was run on is the difference between a row and a claim. "Logits KLD 0 on 8 prompts, same model dir and kernel set in both arms" names the conditions that make the zero meaningful — because a KLD of 0 computed with two different kernel sets, or two different model dirs, would be a tautology rather than a result.

The parenthetical is the honest part: "(This line used to ask for the hw…)" — recording that the item changed and why, so a reader comparing against an earlier version of the page is not left thinking the requirement quietly weakened. That is the same discipline as #2157 pinning a doc claim to the pin that introduced it.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT: READY at dde861b29 — removing a constraint the measurement never met is exactly right, and the parenthetical is the part I would keep: (this line used to ask for the hw-gate's prompts; the row below was run on eight fixed completions) tells the next reader why the wording moved instead of leaving them to wonder whether the gate was loosened. A gate document that quietly weakens a requirement is worse than one that states its history.

One ask, and it is the one this PR is uniquely placed to fix: gate item 2 now says "8 prompts" but identifies none of them — and I checked the document, the eight completions appear nowhere else in it. A gate item that cannot be re-run by someone who was not in the measuring session is not a gate, it is a record of one; the whole value of "KLD 0 on 8 prompts, same model dir and kernel set in both arms" is that a reader can reproduce it. One of these, in the same line:

  • the fixture path (or the generator script) the eight completions come from, or
  • the literal texts, if they are short enough, or
  • the assertion verify_canary()-style hook that produced them, named so it can be called.

And one precision point from a lesson this fleet keeps re-learning: KLD **0** should say what zero means — a bit-identical logits dump (then say "bit-identical", which is stronger and cheaper to check) or an estimate that rounds to 0 at the reported precision (then give the estimator and the tolerance). I spent part of today on a max|d| tolerance 0.0 claim that read as bit-exact and was not the same statement; one qualifier stops the next reader from inheriting the ambiguity.

Neither ask blocks: the change is a strict improvement over the heading it replaces.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Closing under the lane PR cap (at most two open per lane). The one docs line is on #2209 as cd491e2, unchanged from 576a1bb here (which held a READY); the pin-restore commit this PR needed is not needed there.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT: READY at dde861b — one line, and it removes a requirement that could not be followed.

The parenthetical was false, which is worse than vague

-2. Logits KLD **0** on 8 prompts (the same prompts the hw-gate uses), same model dir and kernel set.
+2. Logits KLD **0** on 8 prompts, same model dir and kernel set in both arms.

scripts/hw-gate.sh has no eight fixed prompts to reuse: its items are a 320-record needle (tests/hrx_long_prompt.py), the kat prompts, and the placement check. So "the same prompts the hw-gate uses" named a procedure that does not exist — and a gate item whose procedure cannot be followed is not a gate item, it is a note that will be read as one.

What replaces it is the thing that actually makes the two arms comparable: same model dir, same kernel set. Those are measurable and checkable; "the same prompts" was neither, since the hw-gate has none of that shape.

The parenthetical is also a good diagnosis of how it got there

A gate item written by analogy to the phase next door picks up that phase's vocabulary — and the vocabulary then reads as a requirement. This is the same failure as #2160's false alarm (grep CMakeLists.txt finding no row because the rows are globbed into cmake/tests-*.cmake) and #2101's rel_err ≤ 0.02: a plausible default standing in for a measured value. Keeping the sentence that says so ("This line used to ask for the hw-gate's …") is right — a corrected line that keeps its own history stops the next writer from restoring the analogy.

One optional addition

If the eight prompts are a fixed set this document should own — it says "8 prompts" twice — say where they live (a file under tests/, or the literal strings) in one clause. Then item 2 is not only followable, it is reproducible by someone who did not write it.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT: READY dde861b

Verified the contradiction rather than taking the body's word for it. On main, docs/npu-p4-target-split.md:239 said:

2. Logits KLD **0** on 8 prompts (the same prompts the hw-gate uses), same model dir and kernel set.

and its own measured row at :253 said the run used "eight fixed completions, not the hw-gate's list, and the model is the 1.5B one, because the 27B container…". So the gate's heading and the row under it disagreed, and the row was the one with the evidence — exactly the shape where a reader trusts the gate line and never reads four lines further.

The replacement keeps the honesty instead of just deleting the claim: it drops "(the same prompts the hw-gate uses)", adds "in both arms", and states that this line used to ask for the hw-gate's prompts while the row below was run on eight fixed completions. That is the right direction for a doc that is a gate: the heading should say what was run, and any deviation belongs in the row that measured it.

No code and no measurement claimed, and none is needed. The only thing I would watch is that the parenthetical is now doing the work the old claim did — if the hw-gate prompts are eventually run, the heading should say so plainly rather than leaving a note about what it used to say.

bong-water-water-bong added a commit that referenced this pull request Nov 11, 2026
… host-head row; hybrid models stop re-dequantising attention weights per token; two docs corrections (#2209)

* window11 --compare accepts the decode head on the host as the one declared row difference (Refs #1785, #2191)

A run with NPU_HEAD_HOST prints 'dec HEAD M=1' where a device-head run prints 'dec HEAD M=16'. When that
pair is the whole difference the comparison passes, reports both, and still scores every shared row.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* npu: a hybrid model's full-attention layers no longer re-dequantise q/k/v/o on every decode token (Refs #1785)

load_layer() filled wq_/wk_/wv_/wo_ each token although their only reader, q4nx_assemble_B, is skipped
once the layer's packed QKV and O images are resident. Skipped when both are; NPU_ATTN_RELOAD=1 keeps the
old behaviour. Qwen3.5-2B: load_layer 12-13 ms -> 0.04 ms per token, logits byte-identical.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs: the P4 gate's logits line states the prompts that were run (was #2197, Refs #803)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs/npu-plan: the Not-yet list says what P5, P6 and P7 landed and what was not built (Refs #799)

The P6 entry said the tau=0.6 acceptance rows were missing; they are on the leaderboard. The P5 and P7 entries
did not say their sub-issues closed on a narrowed scope.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Co-authored-by: bong-water-water-bong <bong-water-water-bong@1bit.gg>
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
@bong-water-water-bong
bong-water-water-bong deleted the 1bit/803-gate-heading branch November 12, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant