Skip to content

nemotron: --mtp-drafts and --mtp-confidence set a lone CUDA stream's MTP depth - #997

Merged
ashhart merged 1 commit into
ashhart:mainfrom
plotarmordev:nemotron/cuda-mtp-flags
Oct 18, 2026
Merged

ashhart merged 1 commit into
ashhart:mainfrom
plotarmordev:nemotron/cuda-mtp-flags

Conversation

@plotarmordev

@plotarmordev plotarmordev commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

--mtp-drafts and --mtp-confidence reach a lone Nemotron stream on CUDA through its existing depth rule; the native
CUDA server refused both. --mtp-drafts 0 serves without drafts, a cap above 15 is refused (main verifies 16-row
windows), and a confidence outside 0 to 1 is refused, all before any device work. Other CUDA families refuse both
flags at open. Copied continuations and concurrent streams keep their own policies, and a reply never changes.

Receipt

Raw files: receipts/nemotron/cuda-mtp-flags

  • Environment: this branch at a1ad3ae against main 6ee828c. The GPU receipts were built from 0a0b2ca (published), which has the same tree as a1ad3ae (9ccf94fe) and the same parent; only the commit message differs. A DGX Spark (GB10, sm_121), driver 580.173.02, CUDA
    13.0.88; flag checks on a second DGX Spark.
    nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4@82d93699acd3be9e4617c53360fe5b3f5dbeb1b3, served with
    --name super --prompt-cache-gib 0 on loopback, TF_HEAT_HIGH=85 TF_HEAT_LOW=75.

  • Exactness: tools/bench_concurrent.py --alone --serial --levels 1,4 --tokens 256 --reps 3 --temperatures 0 plus
    drafted against "draft": false token hashes: 252 comparisons, 0 unequal, across main, this branch's defaults,
    --mtp-drafts 0, --mtp-drafts 1 --mtp-confidence 0 and --mtp-confidence 1. Every code and prose reply equals
    main's plain reply.

  • Flag effect (greedy, 256 tokens; verified drafts / rounds, drafts include copied continuations, which the cap does
    not limit):

    Settings Code Prose
    default 254 / 61 282 / 88
    --mtp-drafts 0 0 / 255 0 / 255
    --mtp-drafts 1 --mtp-confidence 0 146 / 132 141 / 141
    --mtp-confidence 1 146 / 132 141 / 141
  • Decode speed before and after, from tools/bench_openai.py (--tokens 256 --reps 3 --temperatures 0, medians,
    tokens/s, boots in the order main, branch, branch, main): code 42.21, 42.38, 42.49, 42.29; prose 32.33, 32.28,
    32.34, 32.36. With no flags, rounds and accepted drafts are the same as main's (code 61 rounds, 194 accepted); code
    verified 254 drafts against main's 258, which follows the window costs each build times at its first start.

  • Prompt speed: n/a, the change does not reach prompt processing.

  • Tests run: the new refusal tests fail on main (2 failed) and pass here. zig build test test-kernel-contract test-golden fuzz-cortheon: 94/94 steps, 586 of 592 executed tests passed, 6 skipped; golden 309/319 equal to the
    frozen answers, 0 unexpected differences. zig fmt --check on the changed files: pass. tools/zig/lean_check.py:
    517 on main, 517 here, 0 new.

  • Not run, and why: Metal (no Mac here; the flags are CUDA-only), tensor parallelism, sampled decoding, images, and
    resumed against fresh prompts. No kernel changed, so there is no contract SUMMARY line.

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. (Resumed against fresh not run, as above.)
  • No precision traded for speed. If the bits change, the description says which sums change and why. (No bits change.)
  • 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 changed.)
  • Prompt processing is no slower than the last release.
  • 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.
  • 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.

@cwschroeder cwschroeder left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found no material code issue in the seven-file increment at a1ad3aef, with Astra checking the option and policy paths. Invalid/nonfinite values and unsupported families are refused before device work. Positive caps and confidence affect the lone decoder's rule; copied chains and concurrent policies retain their own rules. A zero cap also removes the head and reduces the public lane configuration to width 1, so it disables copied proposals too.

Locally, Zig 0.17.0 passes whole-tree formatting, whitespace checks and zig build test-cuda-host -j2 --summary all: 39/39 steps, 852 tests passed and two skipped. Linux cross-compilation of the native server, CLI and CUDA test driver also succeeds (16/16 steps); none was executed. All four current-head remote checks are green.

Resolved source mapping: after the author published 0a0b2ca5, I fetched it and verified that it and a1ad3aef have the identical whole tree 9ccf94feb0e147511d0dc459a0c2dd9781bd850f and the same parent 6ee828c2; their source diff is empty. The environment statement now distinguishes the receipt build from the PR commit. This closes the source-identity gap previously raised here.

I checked 14 direct recorded draft/plain pairs against baseline hashes and the zero-cap counters; they agree with the stated results. I did not independently recheck all 252 comparisons or run a model/device test. The recorded build now has a verified source mapping to this head; the independently checked comparison scope remains those 14 pairs.

@plotarmordev

Copy link
Copy Markdown
Contributor Author

Thanks. The receipt build is 0a0b2ca, now published at plotarmordev/TensorFold@0a0b2ca5 (branch nemotron/cuda-mtp-flags-receipt-build). It and a1ad3ae have the same tree and the same parent; I only reworded the commit message before opening the PR:

$ git rev-parse 0a0b2ca5^{tree} a1ad3aef^{tree}
9ccf94feb0e147511d0dc459a0c2dd9781bd850f
9ccf94feb0e147511d0dc459a0c2dd9781bd850f
$ git diff 0a0b2ca5 a1ad3aef | wc -l
0

The environment line in the description now says so.

@cwschroeder

Copy link
Copy Markdown
Contributor

Fetched and verified: 0a0b2ca5 and a1ad3aef both have tree 9ccf94feb0e147511d0dc459a0c2dd9781bd850f, the same parent 6ee828c2, and an empty source diff. This closes the source-identity question in my review; the receipt build maps to this PR’s source. I updated the review accordingly. The independent model-evidence audit remains the 14 recorded pairs already checked.

@ashhart

ashhart commented Oct 17, 2026

Copy link
Copy Markdown
Owner

Thanks @plotarmordev for publishing the receipt build and @cwschroeder for verifying the matching tree and parent. That resolves the source-identity question for the recorded pairs.

We have also prepared the required follow-up so positive MTP depth and confidence controls use one policy in lone and shared rounds, including handoff and resumed neighbors. #1006 inherits that implementation rather than duplicating it. The earlier model receipt does not qualify this changed policy. Final one/multiple-stream, copy/Recall, sampled, cache and TP2 checks remain owed on the integrated source; default untuned behavior is retained.

Posted by Ash's AI Assistant Synthena

@plotarmordev

Copy link
Copy Markdown
Contributor Author

Thanks. When the integrated policy is up I can run the owed served checks on GB10 against that exact commit: one and several streams, copy/Recall, seeded sampling, the prompt cache (resumed against fresh), and TP=2 on two DGX Sparks, with --mtp-drafts / --mtp-confidence set and unset. Say which branch or commit and I'll post the receipts here.

@ashhart
ashhart merged commit 39ac313 into ashhart:main Oct 18, 2026
4 checks passed
ashhart added a commit that referenced this pull request Oct 18, 2026
…drafts a round, with the Mamba scan in stages of 32

The branch builds on #999's earlier commits and on #997, which come in with it. Twelve files took both sides, keeping
this line's generic native options, owner guards, per-sequence context cap, page margins, #996's borrowed shared plans
and #999's 1,024-expert, 32-pick reference, with the larger pinned-window layout beside the failed-load owner guards.
The Mamba scan's record joins #999's records in the registry.
ashhart added a commit that referenced this pull request Oct 18, 2026
@ashhart

ashhart commented Oct 18, 2026

Copy link
Copy Markdown
Owner

Thank you, @plotarmordev, for the MTP cap/confidence controls and the zero-cap receipt.

We merged the work for 1.1.0 in 39ac313. One controls policy reaches lone, shared and handoff rounds. Zero stops before the first MTP draft launch; positive caps and cumulative confidence follow the same rule, while copy drafting keeps its separate capacity.

Host controls cover policy and launch decisions.

GB10 Super VL NVFP4 passed 17/17, concurrent 2/4 and chat 12/12; each policy-specific device matrix is not separately recorded.

Posted by Ash's AI Assistant Synthena

outcastofmusic added a commit to outcastofmusic/TensorFold that referenced this pull request Oct 18, 2026
prepare.sh pins the 1.1.0 linux-aarch64 archive (sha256 8f18033f..., equal to the
GitHub release asset digest and to the copy in /tmp/tf110dl, 2026-10-18), and run.sh
defaults NATIVE to $MODELS/tensorfold-1.1.0-linux-aarch64. Every flag run.sh passes
is in 1.1.0's serve table (zig/src/server/cli.zig).

1.1.0 answers response_format and tool_choice "required" (ashhart#951) and lets
--mtp-drafts/--mtp-confidence reach CUDA Nemotron (ashhart#997); the recipe notes both
and run.sh passes neither flag. The archive ships no libwebpdecoder, and 1.0.12
refused WebP too, so run.sh's warning and the recipe now say PNG alone serves
without extra libraries. The install test reads its version from the pin.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Qj4LeSvZn6iJnKY4dqjKJ8
BlivionIaG pushed a commit to BlivionIaG/TensorFold that referenced this pull request Oct 20, 2026
…Nemotron stream's MTP depth

Two files took both sides: cuda_native.zig and native/cuda.zig keep this line's global copy switch and generic native
option adapter, which now forwards both options.
BlivionIaG pushed a commit to BlivionIaG/TensorFold that referenced this pull request Oct 20, 2026
…31 MTP drafts a round, with the Mamba scan in stages of 32

The branch builds on ashhart#999's earlier commits and on ashhart#997, which come in with it. Twelve files took both sides, keeping
this line's generic native options, owner guards, per-sequence context cap, page margins, ashhart#996's borrowed shared plans
and ashhart#999's 1,024-expert, 32-pick reference, with the larger pinned-window layout beside the failed-load owner guards.
The Mamba scan's record joins ashhart#999's records in the registry.
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.

3 participants