Skip to content

test(qwen35): the resumed == fresh checks' fresh runs resume from nothing - #2374

Merged
ashhart merged 2 commits into
ashhart:mainfrom
AbrahamCete:fix/qwen35-check-resumed-fresh
Nov 7, 2026
Merged

ashhart merged 2 commits into
ashhart:mainfrom
AbrahamCete:fix/qwen35-check-resumed-fresh

Conversation

@AbrahamCete

@AbrahamCete AbrahamCete commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

Two qwen35 checks compare a run resumed from kept prompt caches with a fresh run. In both, the fresh run ran inside the resumed run's keepPrompts scope, on the same prompts, so it resumed too, and the check compared two resumed runs (#2353):

  • resumed() in zig/tests/qwen35/check_invariants.zig ("lanes long greedy: resumed == fresh");
  • stress() in zig/tests/qwen35/check_radix.zig ("radix: N requests, resumed == fresh", and "radix: all together == fresh", which uses the same fresh run).

Each fresh run now evicts every kept prompt first, and its check fails by name when a fresh reply still restored tokens: the fresh run of <prompt> resumed <n> tokens.

zig/tests/qwen35/serve_check.py has the same gap, but the server has no per-request way to skip the prompt cache and no eviction endpoint, so a fresh request on a warm server needs a design choice. As offered in #2353, I left it to you.

  • Issue: Refs qwen35 check: the resumed == fresh invariant's fresh run also resumes #2353. This fixes check_invariants.zig and check_radix.zig; serve_check.py remains.
  • Stacked on: main 53311e7. One commit, c1e213bb1, adding four lines in two files. It merges cleanly onto main eaf79c5 (git merge-tree); none of the 15 commits since 53311e7 touch zig/tests/qwen35/.
  • atc overlap --json (2026-11-06 15:20Z, --base 53311e7e1): two changed files, and no open pull request it checked shares them, so there is no conflict. The run was incomplete (otherPullRequestsLimit, pullFilesUnavailable, timeLimit). Two local worktrees share a file and merge cleanly.

Checks on this head

  • Head commit: c1e213bb1, on main 53311e7.
  • Lean checker, python3 tools/zig/lean_check.py, on the base and on this head: 252 and 252, 0 new.
  • Tests run, with the command and pass, fail and skip counts, in clean git archive trees:
    • zig build test -Dhip=true --summary all: 612/612 steps, 7732/7796 tests passed, 64 skipped.

    • tf-qwen35-test check <Qwen3.8-27B-MLX-4bit> --only invariants on gfx1151: 42 passed, 0 failed, 5 skipped, with lanes long greedy: resumed == fresh: 4 streams, 192 tokens, 896 prompt tokens from the kept caches and radix: 14 requests, resumed == fresh: 27 of 28 resumed, 48 tokens each. The skips are the four drafted == serial checks ("the model has no draft head") and radix memory: too few ids, as on main.

    • The same on Qwen3.6-35B-A3B-MLX-4bit-MTP: 46 passed, 0 failed, 1 skipped (radix memory: too few ids).

    • This head with both eviction lines removed, on the 27B: both checks fail by name, 37 passed, 2 failed, 5 skipped. The three checks after the failing one in stress() do not run.

      FAIL lanes long greedy: resumed == fresh: the fresh run of long0 resumed 128 tokens
      FAIL radix: 14 requests, resumed == fresh: the fresh run of a0 resumed 1088 tokens
      
    • zig fmt --check and git diff --check: clean.

  • CI: green on c1e213bb1, 7/7: zig, zig-windows, zig-macos-dev-tools, fmt, release-paths, and benchmark-clients on Ubuntu and Windows.
  • Not run, and why: test-golden, because no golden runs tf-qwen35-test check. serve_check.py, which this does not change. Chips other than gfx1151, which I don't have; the change is in the checks' host-side setup, not in a kernel.

Receipt

n/a: the change is in tf-qwen35-test check, a test harness. The server, the engines and the kernels are unchanged. The GPU checks above ran on a Ryzen AI Max+ 395 (gfx1151), Ubuntu 26.04, Zig 0.17.0, hipcc with HIP 7.1.52801 and Ubuntu clang 21.1.8, with TensorFold/Qwen3.8-27B-MLX-4bit (revision 22d8d538) and Qwen3.6-35B-A3B-MLX-4bit-MTP.

Checklist

  • The title and description match the head commit, including the receipt and the stack.
  • New tests fail before the change, pass after it, and skip cleanly without their dependency. (Without the evictions, both checks now fail by name, as above; on main they passed while comparing two resumed runs.)
  • Comments and docstrings are one line. No measurements or history in the source.
  • No personal data, machine names, internal hosts or local paths in the diff or its commits. No AI attribution lines.

@ashhart

ashhart commented Nov 6, 2026

Copy link
Copy Markdown
Owner

Thanks @AbrahamCete, this is exactly what #2353 needed. Both checks evict before their fresh run, and both now fail by name when the eviction is removed: the fresh run of long0 resumed 128 tokens, and a0 resumed 1088 in the radix stress. The 27B and 35B passes on gfx1151 show nothing else moved. It's in the landing queue, and we'll add a "Tests:" CHANGELOG line at landing. serve_check.py is ours to settle, since a fresh request on a warm server needs either a per-request way past the prompt cache or a cold second server; we'll do that separately and say on #2353.

AbrahamCete and others added 2 commits November 7, 2026 02:56
…hing

The fresh runs of check_invariants' resumed check and check_radix's stress
ran inside the resumed runs' keepPrompts scope, on the same prompts, so
they resumed too and each check compared two resumed runs. Each fresh run
now evicts every kept prompt first, and its check fails by name when a
fresh reply still restored tokens.
@ashhart
ashhart force-pushed the fix/qwen35-check-resumed-fresh branch from c1e213b to 6021724 Compare November 7, 2026 02:57
@ashhart
ashhart merged commit 14562c0 into ashhart:main Nov 7, 2026
0 of 7 checks passed
@ashhart

ashhart commented Nov 7, 2026

Copy link
Copy Markdown
Owner

Thank you @AbrahamCete. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes.

@ashhart

ashhart commented Nov 7, 2026

Copy link
Copy Markdown
Owner

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.

2 participants