Skip to content

NPU: Qwen3-1.7B fails AIR's top-5 token gate on both NPU routes (prompt 4, step 5): not verified #3400

Done

Description

@bong-water-water-bong

Qwen3-1.7B on the NPU fails AMD's verify-model full-model gate on both NPU routes, at the same position. Per the orchestrator's decision (23 Nov), Qwen3-1.7B is treated as not verified on the NPU. It is not in the shipped NPU set. Found in #3318.

Gate

  • Method: AIR's top-5 output-token inclusion check (the verify-model skill; mlir-air 331d337 programming_examples/llms/verify, with compute_topk_set_check / topk_token_ids imported unchanged).
  • Prompts: AIR's prompts/instruct.txt, 8 prompts, raw.
  • Capture: 32 greedy tokens per prompt, with no EOS stop.
  • Reference: HF BF16 on CPU, Qwen/Qwen3-1.7B @ 70d244cc86ccca08cf5af4e1e306ecf908b1ad5e.
  • Pass rule: at the first divergence, each side's token must be in the other's top 5.
  • Coverage: captures are complete on both routes (all four traces 32 long, 8/8 prompts).
  • Hardware: strixhalo, amdxdna F87D0BDF, box-hold, 0 fault lines.
route pack prompts OK verdict
dx, batched (prompts run 4 at once) FastFlowLM Qwen3-1.7B-NPU2 snapshot 1b452c9a 7/8 FAIL
forward, 4-column partition (NPU_PARTITION=4) b8 import of amd/Qwen3-1.7B_rai_1.9.0_npu 7/8 FAIL

The failing position (both routes)

Prompt 4, "Write a short story about a robot that dreams for the first time.", step 5. Both routes match the reference on steps 0-4.

  • dx: the NPU chose 3668 " character"; the reference chose 3151 " specific". " specific" is the NPU's rank 6, 0.084 logit below rank 5, so mutual top-5 inclusion fails.
  • forward: the NPU chose 11682 " detailed", which is not in the reference's top-5. The reference's " specific" is the NPU's rank 5.

Diagnosis so far (not part of the gate)

  • In HF BF16, " specific" and " character" tie at 20.25 at that step, and the comparator's tie rule takes the smaller id. HF FP32 on the same prefix ranks " character" first (20.318 vs 20.235). So the position is a near-tie in the reference itself.
  • Both routes diverge at the same step with two different pack families. On 1.7B the batched dx path was earlier byte-identical to one request at a time. So this points at the 1.7B quantised weights, not at concurrency.
  • Same gate, same method: Qwen3-0.6B (dx batched) PASS 8/8, Qwen3-4B (dx batched) PASS 8/8, Llama-3.2-1B (forward, 4-column) PASS 8/8.

Not done

  • Localisation, layer by layer at prompt 4 step 5 (AMD aie-hw-bringup / megakernel-correctness-diagnosis).
  • The dx route with one prompt at a time under this gate.

The gate was not relaxed and the reference was not swapped.

🤖 Generated with Claude Code

Activity

  1. bong-water-water-bong commented on Nov 23, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Related evidence: npu-kernels#132 (cl-inkling-npu) reports Qwen3-1.7B on the same dx route with its own Q4_K weights (dx4k6 packs built from the HF checkpoint with an importance matrix) passing AIR's top-5 gate 8/8. Both failing 1.7B runs here used FastFlowLM-derived packs: the FLM NPU2 pack on dx, and AMD's rai 1.9.0 export on the forward route. That points at the quantised weights, not the NPU route, as this issue's diagnosis guessed. It is not re-verified by me.

    🤖 Generated with Claude Code

  2. bong-water-water-bong commented on Nov 24, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    The issue's premise is now contradicted by our own measurements, and the docs no longer say what they said.

    What the two failing AIR runs used was third-party packs, not ours: FastFlowLM's Q4NX pack on the dx route and
    AMD rai 1.9.0 on forward, each 7/8 at prompt 4 step 5. Our own imatrix Q4_K (dx4k6) packs measure 8/8 on the
    same gate — npu-kernels#132 (merged 2026-11-24T03:47:31Z, merge c19a9226 = the sha config/npu-kernels.config
    pins): Qwen3-1.7B 8/8 (Q4NX 7/8), Qwen3-4B 8/8 both, decode 23.08–23.25 ms/step (1.7B) and 54.63–54.74 (4B).

    What was still wrong, and merged as #3468: the docs said the 1.7B was not in the shipped set while
    os/mini/release-check.sh (from #3453/#3460) already requires the 1.7B 2048x6144x16x8-dx4k6 set, and a
    release-check comment claimed the catalogue maps the 1.7B entry to the dx4k6 set — it does not: line 5 maps it to
    2048x6144x16x8 (Q4NX geometry), so tools/npu_catalogue_filter.py drops the entry on a dx4k6-only payload. The
    docs (docs/npu.md, docs/releases.md), the catalogue's about note and the release-check comments now state the
    measured numbers, the pack mechanism, and exactly what the catalogue switch must change. Verified numbers quoted
    from npu-kernels#132, not re-run (no NPU was used), and the PR says so.

    Not done here: the serve-level AIR run on rc2's signed 1.7B set, and the catalogue entry switch (pack publish +
    lemonade entry + map value) — that is #3453's packaging step, and forcing the map now would offer a Q4NX pack the
    shipped set refuses by name.

    Closing: the "not verified" state is resolved to "verified with our packs, 8/8, on the dev set", and the docs match
    the tree. Reopen if rc2's signed set fails the serve-level run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions