Skip to content

deepseek: list the forward's 2,048-row prefill variants under TF_DSV41_PF_4K - #1683

Merged
ashhart merged 3 commits into
ashhart:mainfrom
jayleaton:dsv41-up/pf4k-aot
Nov 1, 2026
Merged

ashhart merged 3 commits into
ashhart:mainfrom
jayleaton:dsv41-up/pf4k-aot

Conversation

@jayleaton

Copy link
Copy Markdown
Contributor

What this changes

With TF_DSV41_PF_4K the forward still runs 2,048-row segments: the per-piece fallback, and a first start through a 4,096-row staging ring. aot-needs listed only the 4K segments' variants, so a pack built with it had no captured _kv_store for that ring. Both ranks failed the first operation:

before: operation 7 failed: MissingTritonVariant _kv_store RATIO 0 RING 4096 ROWS 0 PSH 0 PDL 0   (rank 0 and rank 1)
after : the prompt passes (segments, piece runs, images, CED replay's decoder) are listed again at the default prefill rows

promptPasses returns the 4K pass plus the default-rows pass, and prompts() enumerates the segments, piece runs, image plans and the CED replay decoder under each pass. This is family-local; runtime arithmetic does not change.

Issue: none open upstream; found while booting the public pack. Stacked on: nothing (based on main 3f0a715c4; the 35 later main commits, to a0d24896f, touch none of its files).

Receipt

  • Environment, with the TensorFold commit, MLX or PyTorch version, machine and GPU, checkpoint and revision: head 5141e348b64b on main 3f0a715c4; Zig 0.17.0; host checks on a Linux aarch64 DGX Spark (GB10, CUDA 13.0). Real-pack boot on two GB10s, TP=2 over RoCE, checkpoint jayleaton/DeepSeek-V4.1-Flash-1017-EXL3-2.8bpw revision 859396591c34, TF_EXPERIMENTAL=deepseek.
  • Exactness: n/a; only the capture list changes, and the same kernels run.
  • Decode speed before and after: n/a.
  • Prompt speed before and after: n/a; the change adds captured variants and does not change which kernels prefill runs.
  • Real-pack evidence: the boot before this commit loaded both ranks (worst serving growth 7.20 and 9.18 GiB), then failed with the MissingTritonVariant above. After the fix, needs.json contains the RING 4096 _kv_store (144 variants). The next TP=2 boot was ready in 536 s, with drafts on and a 1,048,576-token context. It passed the recipe smoke and canary, and a 2,048-token greedy decode was coherent.
  • Host regression: a second commit makes aot_needs_test.zig run real enumerate with the served PF_4K options over a recorded sigs.json fixture. It checks that RING 4096 and 8192 are listed, plus every variant of a 2,048-row piece run, an image segment and the CED decoder. With the second pass removed it fails (control below). Cost: on a GB10's CPU this one Debug test takes about 15 minutes, so test-dsv41-device-host goes from about 6 s to 15 minutes. That step is not part of zig build test, so the no-GPU CI job does not run it. A lighter fixture for this check could follow if that is preferred.
  • Tests run, with pass, fail and skip counts:
    zig fmt --check build.zig zig                      exit 0
    git diff --check 3f0a715c4..HEAD                    exit 0
    python3 tools/zig/lean_check.py                     base 425 problems, head 425, new 0 (lean_new.py)
    zig build test-cuda-host --summary all              exit 0, 271/271 steps, 3906/3915 tests passed, 9 skipped (with test-server-cpu)
    zig build test-dsv41-shared test-dsv41-state test-dsv41-forward test-dsv41-kv test-dsv41-device-host test-dsv41-draft test-dsv41-cuda-host test-draft-dsv41-host  exit 0, 49/49 steps, 531/533 tests passed, 2 skipped
    control (neg-aot, fix reverted, tests kept): zig build test-dsv41-device-host  exit 1 (fails, as required)
    
  • Real-pack TP=2 boot of main + every PR in this series (and the DeepSeek image path that is not yet proposed), at 83ba53298924: passed. Both ranks reached readiness; the recipe smoke, the canary and a strict tool call passed; MissingTritonVariant 0 in both rank logs; 2048 greedy tokens in 51.1 s with token_sha256 7538b20557b1…, the same as the downstream build of this series.
  • Not run, and why: Metal (this is the CUDA AOT capture list).

Checklist

  • Every token still goes through the lane rounds. No serial path, and nothing that needs drafts off.
  • Drafted output equals "draft": false, a resumed prompt equals a fresh one, and concurrent equals solo. (Not measured for this change alone.)
  • No precision traded for speed. If the bits change, the description says which sums change and why.
  • A new or changed GPU kernel is registered with the kernel contract (docs/kernel-contract.md); each backend's SUMMARY line is in the receipt. (No kernel changes.)
  • Prompt processing is no slower than the last release. (Capture list only; the same kernels run.)
  • The description says which platforms I ran, Metal M1 to M5 and CUDA, and which I could not.
  • New tests fail before the change, pass after it, and skip cleanly without their dependency. (Control: with the 2,048-row pass cut, the enumerate test fails in test-dsv41-device-host.)
  • Comments and docstrings are one line. No measurements or history in the source.
  • No personal data, machine names, internal hosts or local paths. No AI attribution lines.

jayleaton and others added 3 commits November 1, 2026 03:00
…1_PF_4K

With PF_4K the forward keeps 2,048-row segments (the per-piece fallback and a
first start run them through a 4,096-row staging ring), but aot-needs listed
only the 4K segments' variants. The served flash17 pack then failed its first
operation on rank 0 and rank 1 with no captured _kv_store for RING 4096.
As the recipe engine does, the prompt passes (segments, piece runs, images and
CED replay's decoder) now run again at the default prefill rows under PF_4K.

(cherry picked from commit 314c7a9)
@ashhart
ashhart merged commit b17fb50 into ashhart:main Nov 1, 2026
9 checks passed
@ashhart

ashhart commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Thank you @jayleaton. 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 1, 2026

Copy link
Copy Markdown
Owner

Thanks @jayleaton! The aot-needs fix for TF_DSV41_PF_4K=1 packs is in 1.2.1: https://github.com/ashhart/TensorFold/releases/tag/v1.2.1

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