Repository navigation
Qwen3.5-family CUDA: enable dense MTP drafting - #3582
Conversation
|
Thanks @tacosta, the shape of this is right: the optional normalized view in the lanes stays off by default, the drafter path keeps the target only path intact, and the tap capture with suffix retention is the careful part. Keeping it a draft was the right call, and your own body names what is open. On the red checks: your pre rebase run already had one failing host test, a terminated contract process and an
|
|
Thanks for the review @ashhart. I reran the full host suite on the rebased local head I traced the earlier The focused MTP CUDA qualification passed 33/33, and the focused tap contract passed 2/2 with both planted controls detected. The broader kernel-contract run was terminated by LocalATC's host-memory safety limit, and the earlier checkpoint-backed qualification's The DFlash2 same-prompt diagnostic arm is now present locally and its runner tests pass 19/19, but I have not collected the GPU comparison. The 2K cold first-token result and the full equality matrix remain open for the device qualification. I have not pushed this newer local head. I also left the direct |
|
Thanks @ashhart. I fetched remote main; Before rebasing, I reran ATC 0.9.6 for #2485, including the affected areas (core, models, CUDA and tests). It still returns The contributor instructions say to stop issue-dependent work when the check is incomplete, so I have not rebased, started the post-rebase build/qualification, or pushed. Could you point me to a supported way to get complete ATC coverage or confirm the scope of overlaps that is cleared for #2485? |
db705bf to
a4ea384
Compare
|
@ashhart — update on the rebased PR head ( The receipt is measured against
Greedy and seeded-sampled output equality, resumed equality, and the collected 512-context stream matrix passed. The full all-kernel contract was attempted but LocalATC stopped it at the host-RAM safety threshold before its summary; the PR description records that partial result and the known attention findings. The focused MTP/tap checks pass. CI has started on the rebased head; the current checks are pending. Against the |
|
Hi @tacosta, a heads-up from #3858: I'm about to open a draft PR stacked on #3723 that adds MTP drafting for SenseNova-Loop-9B. It touches the same drafter files as this PR ( Our scopes differ:
I'll treat this PR as going first and rebase mine onto your dense arm, keeping only the BF16 side-file loader and the Loop parts. If you'd rather structure the dense arm so a BF16 variant can sit beside the affine-4 one, tell me and I'll match it. I won't touch #2485's scope. |
|
@ashhart — I read your earlier guidance and Maxrio9's latest note before preparing this update. For pushed head a4ea384, items 1 and 3 appear clear: the PR text identifies the head, stack and receipt baseline; the added source comments/docstrings are single-line and within 120 columns, with no performance results or development history in source. Items 2 and 4 remain open. The recorded 2K TTFT is +0.133% vs main and +0.291% vs no drafts; 8K is within the proposed margin. Those receipts use the older e7ff97e baseline. The 512-context multi-stream results establish equality, not speed at the widest admitted setting. The PR also doesn't clearly surface the requested drafter memory cost or cancel/partial-acceptance evidence. For ordering, please consider Maxrio9's overlapping MTP comment: #3582 (comment). It proposes stacking their Loop-specific work on this PR. Please let us know the preferred order, including whether the reusable normalized-feature interface should be its own prerequisite PR; we'll follow that sequence. |
|
@ashhart — could you confirm the preferred stack before I restack #3582? Your #2485 note suggested keeping the reusable |
|
Thanks @tacosta, and thanks for the careful receipts. Our answer on the stack is: split the reusable
|
a4ea384 to
b154039
Compare
|
On exact head zig build test-qwen35-mtp-coupled-host test-qwen35-mtp-selection-host \
test-qwen35-mtp-lifecycle-host test-qwen35-mtp-memory-host \
test-qwen35-prefill-host -Dcpu=apple_m1 -j6 --summary all
python3 -m unittest discover -s tools/bench/mtp2485 -p test_receipts.pyThe host run passed 112/112 and the receipt harness passed 23/23. I also explicitly imported and ran the new suffix and prompt-chunk fixtures in scratch (24/24). Moving the suffix cut one row later failed both the direct and stepped cases ( On an RTX 5090 Laptop GPU (SM 120, CUDA 13.1.115), I built the exact-head runner with The prerequisite #4132 trial-merges cleanly into main After #4132 merged, I reran the same five host targets and the Python receipt tests on I then ran the same five host targets plus Igor Lessio - AIFLOW LABS |
b154039 to
5b2be93
Compare
26d3de9 to
8727742
Compare
Add dense Qwen3.5 MTP loading and speculative execution with allocator peak checks, overflow handling, KV-only prompt absorption, suffix tap capture, and sampled-draft coupling tests. Keep the normalized prompt-feature interface reusable by any drafter that consumes normalized rows. Register TF_MTP_TREES once on current main and describe its sampled-tree opt-in. Repair the receipt runner monotonic timer import and cover its readiness timeout.
Expose the moved scan to incoming host recorders without another implementation. Free both fixture recorders, include incoming tap tests in the covering prefill step, and remove nine blank lines to keep the engine at 600 lines.
Main's lane changes take cuda_native.zig to 601 with this PR; the blank line between reserve and release goes.
8727742 to
a57ef3d
Compare
|
Thank you @tacosta. 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. |
What this changes
Enables dense MTP loading and execution only on TensorFold's native CUDA Qwen3.5-family path. The implementation does not add MTP support to other model families or backends. Qualification used the
nvidia-3.8-27b-nvfp4checkpoint through this family adapter; that checkpoint does not broaden the supported scope.The change keeps target-only decoding as the default and adds memory-peak checks, overflow handling, KV-only prompt absorption, bounded suffix tap capture, GPU-resident draft feedback, and sampled-draft coupling tests. The optional normalized-prompt-feature interface is reusable by other compatible drafters and is not MTP-specific.
4c616e63d57204cd8395dc3af9b572d9ec49626b. This branch contains one MTP commit,5b2be93de13ddbc406f072caa5867e55d7118d16, based on that commit. The tested base is4c616e63; current main isdc71af9dand contains that base plus 109 commits. Receipts remain anchored to the tested base.pullRequestsLimit; the snapshot lists this PR as mine. The scan limit is tracked in ATC #18.atc overlap --json --base origin/main: run on 2026-11-21 against testedorigin/mainat4c616e6; incomplete because ofotherPullRequestsLimit,pullFilesUnavailable,pullRequestsLimitandtimeLimit. It reports 3 clean, 7 conflicting and 71 unknown working-tree comparisons; 81 comparisons for PR Qwen3.5-family CUDA: enable dense MTP drafting #3582 are unknown; 9 local worktree overlaps are conflicts. This is not an all-clear scan. Maintainers can set the ordering for the overlaps, as requested in their stack guidance.Checks on this head
5b2be93de13ddbc406f072caa5867e55d7118d16.4c616e63and this head: 168 / 168 findings, 0 new findings.zig build -j4 test test-golden --summary allpassed (exit 0; 322/335 primary golden outputs matched, zero unexpected differences, 13 known differences; secondary goldens 55/55).python3 -m unittest discover -s tools/bench/mtp2485 -p test_receipts.pypassed 24/24.zig fmt --check build.zig zigandgit diff --checkpassed. Native baseline/candidate builds and the checkpoint-backed Qwen3.5 MTP CUDA qualification passed. The focusedtf_q35_tapcontract passed full-capture and suffix cases and detected its planted controls.Receipt
4c616e63d57204cd8395dc3af9b572d9ec49626b, candidate5b2be93de13ddbc406f072caa5867e55d7118d16. The current upstream maindc71af9ddescends from the tested base by 109 commits. Cold prompt cache was disabled, each sample used a fresh server, and variant order alternated. The primary measurement is the first request only.My working noise band is 1.5%; both MTP TTFT comparisons are within it. This is the submitter's interpretation of the measured spread, not a claim that maintainers have changed the written performance gate. The benchmark's stored report still shows its original 0.1% flags.
Earlier 10-repetition receipt, retained for comparison: base
e7ff97e132f2268c7c52bf55d1b8bdbb033462f3, candidatea4ea384e1edbea9b4e285c6f394795ae25b0e0eb.nvidia-3.8-27b-nvfp4checkpoint. No other family or backend is claimed.--drafterselects a compatible MTP checkpoint;--mtp-draftssets proposal depth, default 3. Target-only remains the default.nvidia-3.8-27b-nvfp4; the separate DFlash2 comparison usedz-labs-3.8-27b-dflash2. The immutable checkpoint revision was not recorded. Runs explicitly setTF_QWEN_NVFP4_TC=1,TF_MTP_BATCH=1andTF_QWEN35_CHUNK_SOLO=4096; memory reserve and CUDA memory limit used defaults. Current-run config, tokenizer and model-index hashes are retained in the raw receipt.art_2485-enable_job_20261120_235324_28aa56_1dc5be; focused MTP CUDAart_2485-enable_job_20261120_223327_fb1c2b_9a45bf; incomplete full-contract runart_2485-enable_job_20261120_223649_7c94ab_864d19. Comparison scripts are included undertools/bench/mtp2485.Kernel contract
tf_q35_tap, which supports bounded MTP suffix capture while preserving full capture for other consumers.SUMMARY. Partial output contained 1,639 passes and 135 planted control failures, all matched by CONTROL/KNOWN, with no unmatched failures. This is not a full-suite pass.Checklist