Skip to content

refactor(dsv41): projection forms in the CUDA plan (#3527 1/5) - #3530

Draft
laudney wants to merge 1 commit into
ashhart:mainfrom
laudney:dsv41-rel-1-plan-forms
Draft

laudney wants to merge 1 commit into
ashhart:mainfrom
laudney:dsv41-rel-1-plan-forms

Conversation

@laudney

@laudney laudney commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Step 1 of #3527: the CUDA plan holds each projection's form, so a release checkpoint can plan FP8 and BF16 groups and MXFP4 experts beside EXL3's trellises. No behavior change.

main this PR
A group's storage in the plan EXL3 trellis parts only Form = exl3 / fp8_block / bf16; experts exl3 / mxfp4
Expert width a rank holds 128-element units 128 for EXL3, 64 for the release (partition.expertShare)
EXL3 plans and loads unchanged: the world-4 plan fingerprints keep their pinned digests

Why

Serving the checkpoint as DeepSeek released it is crucial for benchmarking and for adoption: SGLang, vLLM and TRT-LLM serve these same bytes, so comparisons are like for like with no conversion step, and users run the checkpoint they already download, with no TensorFold-specific requant (#3527).

What this changes

The plan's GroupPlan and ExpertsPlan gain a form union, and every reader of the EXL3 parts reads them through .form.exl3. The expert width share takes its unit from the checkpoint format.

Checks on this head

  • Head commit: 26352aa
  • Lean checker on the base and on this head: 337 and 337, 0 new.
  • Tests run: zig build test test-golden test-dsv41-cuda-host test-dsv41-forward test-dsv41-device-host test-kernel-contract compile-dsv41-cuda compile-dsv41-server on the stack head: 5296/5334 passed, 37 skipped, 1 failed (cli_config_test "serve --config: expand ...", which fails identically on main e7e2424 on the same host: inherited). zig fmt --check build.zig zig and git diff --check pass at every stack head. Each commit ran the family host suites when it was made (on main 811c384).
  • CI: pending on this head.
  • Not run: the full unfiltered zig build kernel-contract (the release filter dsv41_rel ran; see the kernel section); other SMs (the release images are sm_121a only).

Receipt

  • n/a: a plan refactor with no inference change; EXL3 plan fingerprints are pinned and unchanged.
  • Environment: TensorFold main e7e2424 + this stack, Zig 0.17.0, nvcc 13.5 (V13.5.37; contract records also for 13.0), four GB10 (sm_121a), driver 580.178.04, NCCL 2.30.7; deepseek-ai/DeepSeek-V4.1-Flash-1017 @ 08c8657f02291e11b6f6b63e0e16014f8e748518

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.

  • 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.

  • 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. (Drafts and concurrency: equal, receipt above. Resume: not run, sessions are off at 4 slots.)

  • No precision traded for speed. The release arithmetic is the checkpoint's own (DeepSeek-V4.1-Flash release weights (FP8 + MXFP4) on CUDA at world 4 on four GB10s #3527); EXL3 bits are unchanged.

  • Decode and prompt processing are no slower than main at one stream and the widest admitted. (n/a for the release checkpoint: main refuses it. EXL3 paths are untouched by format gating; not re-measured, no EXL3 pack on the test machines.)

The CUDA plan typed every projection as an EXL3 group, so another
weight format would have to thread branches through every reader.
GroupPlan and ExpertsPlan now hold their stored form in a tagged union
with an EXL3 arm, readers go through it, and the expert width splits
on a per-format block (expertShare: 128 for EXL3, 64 for the release
format). EXL3 plans, emitted calls and pinned fingerprints are
unchanged; block.Options gains the checkpoint format for the release
arms to come.
@laudney

laudney commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

@ashhart rebased onto main 699094f705 (#3388 landed), head aa201b39c4 (was 26352aa883). No content change: git range-diff shows every commit equal. The split-rows plan commit is now dropped from the top of the stack (#3534), which takes the fix from main; checks and the 4 × GB10 receipt are in #3534.

@ashhart

ashhart commented Nov 20, 2026

Copy link
Copy Markdown
Owner

Thanks @laudney for the patch-identical rebase. This step applies cleanly to current main.

EXL3 remains the default and keeps its 128-column expert split; the release's 64-column split is explicit and covered at worlds 2 and 4. The legacy fingerprint conversion keeps the pinned world-4 plan digests meaningful, and the production readers now use the form payloads consistently.

I found no remaining issue in this plan-only step.

It goes on a landing train with the other ready steps now.

  • Synthena

This branch has not been deployed

No deployments
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