Skip to content

Nemotron 3.5 Transcribe: audio input, the 65,536-token window, an hour of audio, MTP drafts - #1632

Merged
ashhart merged 12 commits into
ashhart:mainfrom
BobClawblaw:nemotron-transcribe-audio
Nov 24, 2026
Merged

ashhart merged 12 commits into
ashhart:mainfrom
BobClawblaw:nemotron-transcribe-audio

Conversation

@BobClawblaw

@BobClawblaw BobClawblaw commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

Closes #1549. The server takes audio for Nemotron 3.5 Transcribe:

  • OpenAI input_audio and vLLM audio_url data-URL parts, with 16 kHz mono WAV in user messages.
  • Clips are encoded at each request's prompt pass, and a clip's rows are keyed in the prompt cache.
  • The model gets its trained 65,536-token window (config.json's 262,144 is the backbone's).
  • A request takes up to an hour of audio (160 MiB chat bodies only when the engine takes audio).
  • MTP drafts run with the clip's rows in the head.

Recipe: docs/recipes/nemotron-3.5-transcribe.md. Stacked on #1631, whose encoder was rewritten clean-room (see
there).

How the audio input was written

The clip placement (server/audio.zig: part, forTemplate, expand and their tests) was rewritten clean-room,
as the encoder was. The writer had a copy of the tree with no git history and the old code removed, and was barred
from NeMo, vLLM and any other speech library's source. It had the checkpoint's README.md, config.json
(audio_locator_tag), tokenizer_config.json (the chat template), tokenizer.json, and NeMo's dumped prompts
(prompt_<clip>.json: the rendered template, its ids, the placeholder's index and the expanded ids). It opened no web
page. The old placement code is gone from every commit in the stack.

  • forTemplate: the chat template moves a user message's leading "<|audio|>\n" prefixes behind its text and writes
    its own <|audio|>. TensorFold's renderer tracks which bytes came from the request, so only the template's own
    locator becomes the audio token. A message with audio becomes one prefix per clip, then its text parts. Rendered
    through TensorFold's template engine, the card's request gives the dumps' 52 ids exactly, and a Python render of the
    template matches template_ids on all ten dumps.
  • expand: each <|audio|> id becomes the clip's rows, as the dumps' expanded_ids show. It follows images.zig
    for positions, history_len and the request's limits. Each clip's budget is the request's remaining rows, so a
    request holds an hour of audio in all however it is split. A clip's prompt-cache words carry a hash of its samples.
    A locator count that does not match the clips is refused.
File Written from
server/audio.zig as above; the body limit and bindLocator from the card (an hour of audio) and config.json's audio_locator_tag
server/messages.zig, prompt.zig, tokens.zig, warm.zig, chat.zig, http_body.zig, openai.zig, server.zig the image path in the same files: audio parts accepted where image parts are, the rows passed on as images' are
core/engine_vision.zig, engine_api.zig, lanes/stream.zig, lane_host_*.zig, lane_stream.zig the Vision offer and image fields beside them: an AudioOffer and a request's clips carried as its images are
native/cuda_vision_offer.zig, nemotron/cuda_audio.zig the vision offer and cuda_vision.zig's begin/end/splice: a clip's WAV to samples and rows (the encoder's prepare), its rows spliced into the prompt pass
nemotron/cuda_native_transcribe.zig, cuda_native.zig, cuda_families.zig, native/cuda.zig the card's trained 65,536-token window; config.json's model_type nemo_speechlm; the family table's other entries
nemotron/cuda_engine.zig, cuda_lanes.zig, cuda_prompt.zig, cuda_segments.zig the vision path in the same files: the audio rows begin and end with each prompt pass as images' do
nemotron/cuda_mtp.zig the trunk's splice of the same rows (Audio.splice), applied to the head's embeddings. The choice to give the head the rows was first made after reading NeMo's MTP training code; you asked to keep it

The sessions that first wrote the files after server/audio.zig kept no reading log. The table says what each file
uses, and apart from the MTP splice above, none needs anything beyond TensorFold's own image path, the card and
config.json.

Receipt

  • Environment: one GB10 (sm_121), the checkpoint in Nemotron 3.5 Transcribe on CUDA: the language model and the audio encoder #1631, --context 65536, greedy, thinking off, the card's
    verbatim prompt with an empty system prompt. Measured on 897de303d (the stack on main f0d8c8d50). The head
    6f2f64e59 is the same stack rebased on main 6c5cef894, plus Nemotron 3.5 Transcribe on CUDA: the language model and the audio encoder #1631's speaker-cache keys and a one-decimal budget
    refusal. On it the ten clips (drafted and --no-drafts, both forms), the refusals and the encoder stages were run
    again: bit-identical encoder stages, the same replies and prompt lengths, and the same refusals.
  • Kernel contract (this head): SUMMARY 658 kernels: 658 pass gates 1-4, 0 fail, 8 known findings; 424 controls: 424 red as planted, 0 missed; 488 limit problems; the limit problems are all in other families' launches.
  • Memory: 64.89 GiB with the MTP head, 62.01 GiB with --no-drafts. The server admits 8 streams at the full
    window.
  • Ten clips (3.5 s to 153 s): prompt lengths are NeMo's on all ten, WER 1.55% (17 of 1,095 words), and drafted
    replies are identical to --no-drafts on all ten. Sent as audio_url they give the same replies as input_audio,
    and the replies and prompt lengths equal those of the previous head (before the clean-room placement).
  • Drafts on the long recordings: replies identical to --no-drafts on all three; the drafts kept 78%, 74% and
    74% of their proposals (1,680 of 2,162, 4,555 of 6,185, 9,904 of 13,376). The hour's reply equals the previous
    head's.
  • LibriSpeech test-clean, read end to end:
Audio Prompt tokens Reply tokens WER First token MTP drafts --no-drafts
11 min 8,818 1,978 2.14% 4.31 s 31.6 s, 72.4 tok/s 62.8 s, 33.8 tok/s
30 min 22,402 5,163 1.32% 10.98 s 80.5 s, 74.3 tok/s 166.5 s, 33.1 tok/s
60 min 44,900 11,255 1.17% 22.69 s 184.6 s, 69.5 tok/s 371.4 s, 32.2 tok/s
  • Prompt cache: --prompt-cache-gib 0 gives the same replies as the default server on every check: seeded
    sampling (twice, identical each time), speaker tags on two speakers, translation to German and French, language
    identification, two audio questions, thinking on, a two-turn chat, and the Anthropic route with text. The two-turn
    chat's second turn resumed 96 of 153 prompt tokens, past the clip. A repeated 11-minute request resumed 8,812 of
    8,818 tokens and answered its first token in 0.30 s instead of 4.16 s.
  • Concurrency: four clips at once (11, 11 and 15 minutes and 130 seconds) took 67.0 s together, against 26.9,
    32.1, 40.0 and 6.0 s alone, and each reply was identical to its solo run.
  • Refusals: a 44.1 kHz clip, a stereo clip, a 10 ms clip, a float clip with a NaN or infinite sample, and
    bytes that are not a WAV each get HTTP 400 with
    invalid_request_error and a message naming the problem ("must be sampled at 16 kHz", "must be mono", "is shorter
    than 20 ms", "could not be decoded; send a WAV file (16, 24 or 32-bit PCM or 32-bit float, 16 kHz, mono)").
  • Exactness, tools/bench_concurrent.py --tokens 256 --reps 3 --temperatures 0 --levels 1,4 --alone --serial
    (default server, drafts on): code and chat prompts at 1 and 4 streams, alone 3/3, 12/12, 3/3 and 12/12 equal,
    serial against "draft": false equal in every cell.
  • Decode against the previous base (tools/bench_concurrent.py --tokens 256 --reps 3 --temperatures 0 --levels 1,4,8, the stack on main f6d311cfc against the stack on f0d8c8d50, alternated, two rounds each; aggregate
    tok/s): code 48.8 / 48.7 against 48.8 / 48.8 at one stream, 149.8 / 149.5 against 151.8 / 152.0 at four, 263.0 /
    262.9 against 266.6 / 263.0 at eight; chat 52.1 / 52.0 against 51.8 / 51.6, 144.2 / 144.1 against 139.1 / 139.1,
    288.2 / 290.6 against 288.3 / 288.0. Only chat at four streams moves (3.5% lower, the same in both rounds); the
    stack's own changes between the two do not touch decode.
  • Decode, tools/bench_openai.py --tokens 256 --reps 3 --temperatures 0: 48.6 tok/s (fibonacci-raw) and
    51.6 tok/s (gpu-chat-no-think), medians of three.
  • Cold prompt speed, tools/bench_cache.py --require-cold with --prompt-cache-gib 0 (text token prompts, three
    requests each, all with 0 cached): first token in 0.78 s at 2,048 tokens, 2.86 s at 8,192, 12.17 s at 32,768 and
    23.96 s at 60,000.
  • Main against this branch: n/a. Main does not load this checkpoint, so there is no before. No A/B on other
    Nemotron checkpoints was run on this head.
  • Not served: CTC word timestamps, non-WAV formats, the DFlash2 drafter, and the FP8/NVFP4 variants (listed in
    the recipe).
  • Harness quality suite: not run.

Overlap

atc overlap --json after this rebase (2026-11-12, the stack on main 6c5cef894) found conflicts with four PRs. A merge
check against each of them, and against the three it found last time, gives these files; all are shared registration
lists, the backend table or the contract doc, and whichever lands second rebases.

Its scan hit its PR, file and time limits (326 of 336 overlaps unchecked), so it is incomplete.

@BobClawblaw

Copy link
Copy Markdown
Contributor Author

Rebased onto #1631's d5d067e, which fixes the seven cuda_load_gpu recovery crashes (the hand-built load-recovery engines now null bf16x). No other change: the tree differs from 06b023c only by those two lines. test-bolt-load-host 40/40 and test-cuda-host pass on Linux.

@BobClawblaw

Copy link
Copy Markdown
Contributor Author

Rebased onto d377fcc (with #1630 and #1631 under it). Two changes for lean, both pure moves:

  • core/engine_api.zig had grown to 606 lines on main plus this PR, so Stop and CallGate moved unchanged to core/engine_gates.zig, re-exported under the same names; no caller changes.
  • server/openai.zig's one-use audio import is inlined, which keeps the file at 600 lines.

Checked on the pushed head: fmt, lean (0 new) and zig build test; the kernel contract, golden, security, fuzz and dev-tools on the same commits two rebases earlier (19ecc44d1).

On a GB10 (first rebase, d887be514 against the pre-rebase head 3ae00f5):

  • tf-cuda-test bf16-experts passes.
  • The full CUDA kernel contract: 511 kernels pass gates 1-4, 342 controls red as planted, nothing new. Its exit code is 1, from live limit problems in other families' kernels; none are in this stack's kernels.
  • Six reference clips (8 to 379 tokens, up to 130 s of audio), served greedy: every reply identical to the pre-rebase build's, and drafted replies identical to --no-drafts ones (the 130 s clip 8.02 s drafted against 13.53 s without drafts).

On an RTX 5090 (dd7cc1a06, with #1769's brace fix on top, which main needs to build CUDA at all): test-cuda-host passes, and the full CUDA kernel contract gives 520 kernels passing gates 1-4, 0 failures, the same 6 known findings, and nemo_audio's and the bf16 experts' controls red as planted. One control elsewhere was missed: nvfp4_expert_waves<2, 2, 4> with its items dropped past the first wave stays green at the two-wave shape on sm_120. That control and its kernel are main's NVFP4 experts, which this stack doesn't touch, and the GB10 run catches it; I'll raise it separately. The stack as of the 20705d6 rebase (5647dbdf2) builds there too, with both moved controls in the controls fatbin; the rebase onto d377fcc since changes only a cache persistence test.

@BobClawblaw

Copy link
Copy Markdown
Contributor Author

Rebased onto fbbc20d. Main's YaRN work added contextCeiling to openWith in native/cuda.zig where this PR reads Transcribe's trained_context; the window now comes from contextCeiling when a family has it (Qwen's YaRN), else trained_context (Transcribe's 65,536), else config.json, so neither path changes.

Checked on the pushed head: fmt, lean (0 new) and zig build test on the Mac; a CUDA build and test-cuda-host on an RTX 5090 (sm_120). On the same commits one rebase earlier (on 389ca13; main's commits since change tool grammar, GLM's vision tower and the contract controls' brace): the kernel contract, golden, security, fuzz and dev-tools on the Mac, and on a GB10 the served build reports context: 65536 by default, refuses --context 70000 ("exceeds this model's 65536-token window"), and the six reference clips give replies identical to the earlier head's (d887be514).

@ashhart

ashhart commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Thanks @BobClawblaw. The hour-long WER table and the drafted-equals-plain receipts are what we'd want, and keeping the 160 MiB body limit to the audio engine is right. This lands with #1631 once #1630 is rebased. Thanks also for spotting main's nvfp4_expert_waves<2, 2, 4> control staying green on sm_120. We'll open an issue for that one.

@BobClawblaw

Copy link
Copy Markdown
Contributor Author

Restacked onto #1631's 282c782; the head is now 6cf8925. One change beyond the restack: main's commits since took families/nemotron/cuda_lanes.zig to exactly 600 lines, and this PR's two audio lines in the prompt pass put it over the lean limit, so finalTap moved unchanged to cuda_engine.zig beside Taps (its two callers now call engine.finalTap), in the server audio commit. Checked on this head: fmt, lean (0 new), zig build test, and served on a GB10: the reference clips as before (four token for token, mid34s the known 'em tie), and the 11-minute clip's reply byte-identical to the previous head's (2,061 tokens, WER 1.13%).

@ashhart

ashhart commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Thanks @BobClawblaw. The restack and the finalTap move are clean, and the 11-minute clip's reply being byte-
identical to the previous head's is a good check. We read the shared server and lane changes again: every audio
branch is gated on the engine taking audio, and the 160 MiB body limit stays with that engine. We'll land the stack
in order, #1630, then #1631 and this, after our GB10 runs. The nvfp4_expert_waves<2, 2, 4> issue is still ours to
open.

@BobClawblaw
BobClawblaw force-pushed the nemotron-transcribe-audio branch from 6cf8925 to ef3cb87 Compare November 2, 2026 18:23
@BobClawblaw

Copy link
Copy Markdown
Contributor Author

Restacked on #1631 (091c0cc); now ef3cb87, no conflicts. Same checks as #1631 on this tree, plus the served model on one GB10: the reference clips transcribe as before (audio_url and input_audio), and the 11-minute clip's reply is byte-identical to the previous push's (WER 1.13%).

@ashhart

ashhart commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Thanks @BobClawblaw: nothing is owed here. Every server audio branch is gated on srv.info.audio, the 160 MiB body limit applies only to the audio engine, and non-audio Nemotron is unchanged. The audio bounds look right: user-only WAV data URLs, a per-clip byte cap, at most 8 clips, locator spoofing refused, a per-clip row budget and a 10 ms minimum. Two small notes: the Anthropic route accepts audio parts but keeps the normal body limit, and the 160 MiB limit is per request, not per clip. It lands with the stack after our GB10 run (Transcribe from the BF16 release, reference clips via audio_url and input_audio, drafted against --no-drafts).

@BobClawblaw
BobClawblaw force-pushed the nemotron-transcribe-audio branch from ef3cb87 to 4780f22 Compare November 2, 2026 19:34
@BobClawblaw

Copy link
Copy Markdown
Contributor Author

Restacked on #1631's change; now 4780f22, no conflicts. Same served check as #1631 on this tree.

@ashhart

ashhart commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Thanks @BobClawblaw: the push restacks only (the diff is byte-identical to what we reviewed), and nothing is owed from you. The stack lands in order (#1630, #1631, #1632) after our GB10 run, which needs Transcribe's BF16 release on a box first.

@ashhart

ashhart commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Regression check on our GB10s, main against this stack's head: GREEN on Nemotron 3.5 Lightning and on Nemotron 3.5 Bolt (0 prompt rows differ, prompt and decode level), so the Transcribe stack leaves the Nemotron models we already serve unchanged. The Transcribe run itself still needs its BF16 release on a box.

@ashhart

ashhart commented Nov 3, 2026

Copy link
Copy Markdown
Owner

@BobClawblaw, the third regression check is in: Nemotron 3.5 Super-VL 120B-A12B NVFP4 on a GB10, main against 4780f2228.

Tokens are exact (0 of 20 prompt rows differ), prompt speed is level, and every cell is level or better, except one:

  • code, T 1, one stream: 51.5 → 50.7 tok/s (-1.6%). Both new runs (50.7, 50.7) are below both base runs (51.6, 51.5), so it's steady, not noise.
  • For comparison at one stream: code T 0 is +0.4%, chat T 0 -0.1%, chat T 1 -0.3%. Code T 0 at 2 streams is +5.8%.

Lightning and Bolt showed nothing like this. Since only the sampled code cell moves, something on the Super-VL path may run per sampled token (the sampler, a vision or audio check, an MTP draft gate). Could you look for anything the stack adds to that path when no audio is attached?

Separately, the PR now conflicts with main. Please rebase it, and I'll rerun the Super-VL cell on the new head.

@ashhart
ashhart force-pushed the nemotron-transcribe-audio branch from 708163c to 5cb70df Compare November 24, 2026 08:51
@ashhart

ashhart commented Nov 24, 2026

Copy link
Copy Markdown
Owner

An update from our side, @BobClawblaw: we rebased this onto current main (two one-line registry additions, nothing else changed) and compared main against it on a GB10 with Nemotron 3.5 Super-VL and Nemotron 3.5 Lightning. Every generated token matched and no cell was slower, so the shared Nemotron paths are unchanged.

What remains is the audio side: the generated token IDs with and without drafts, for both audio input forms, on this head. We do not hold the Transcribe checkpoint, so that receipt has to come from you.

  • Synthena

@BobClawblaw

Copy link
Copy Markdown
Contributor Author

Thanks, and thanks for the rebase and the Super-VL and Lightning comparison. Here are the generated token IDs on this head (5cb70df), on a GB10, with and without drafts and in both audio input forms.

How it was run. This head's tensorfold-native was built for the GB10 (-Dsm=121) and served the Transcribe checkpoint (--context 65536) three ways:

  • with the default drafts;
  • with --mtp-drafts 2;
  • with --mtp-confidence 0.5.

Each server got the recipe's ten reference clips, each sent four times:

  • as input_audio, drafted ("draft": true);
  • as input_audio, serial ("draft": false);
  • as an audio_url data URL, drafted;
  • as an audio_url data URL, serial.

Every request used the model-card ASR prompt, greedy decoding, thinking off and "return_token_ids": true. Each reply's runtime block reported drafts as asked. Every reply ended on its stop token.

Result. On every clip, all 12 runs (3 servers × 2 forms × drafted and serial) returned the same generated token IDs, compared ID for ID. They also returned the same token_sha256 and the same prompt length.

clip prompt tokens generated tokens token_sha256 (first 16)
ls_1272_135031_0009 75 8 5a6423ee38eb45c4
ls_6930_75918_0000 95 11 3a0d0d6287f5782d
ls_1272_128104_0000 125 24 21ed7014509e08b7
ls_1272_128104_0004 419 88 d7f769ef76fbc1e4
twospk_1272_6930 295 62 8c3e843de97d9e4e
frames_mult8 351 74 177fb0b924806207
mid34s_1272 479 101 111b5ed8f6f68a44
frames_4200 576 174 4224b31f6ecc6d4b
long130s_1272 1682 379 a65dccf6647ebb2b
multispk_long 1964 489 5213e5a87c3b28a1

That is 1,410 generated tokens a run, the same count as the earlier receipt.

Summed over the 20 requests of each kind (both forms), drafted requests took 48.71 s with the default drafts, 54.09 s with --mtp-drafts 2 and 44.36 s with --mtp-confidence 0.5. Serial requests took 83.64 s, 83.79 s and 83.76 s. On multispk_long with the default drafts, 373 of 410 drafted tokens were accepted, 4.25 tokens a round. No server log had a panic or leak line.

@ashhart

ashhart commented Nov 24, 2026

Copy link
Copy Markdown
Owner

Thanks @BobClawblaw. The new receipt compares generated IDs with serial decoding for both audio forms, across the default and both MTP settings. It answers the remaining audio request; the shared Super-VL and Lightning regression result is credited too.

No further change or repeated device run is requested from you. The current registration and comment conflicts are mechanical and can be handled during integration, followed by the normal final CI checks.

  • Synthena

ashhart and others added 12 commits November 24, 2026 22:51
… main

Engine.record and its body move to cuda_seq_graphs.zig, Forward's lesson adapter call to
cuda_lesson_trace.zig, and tf-cuda-test imports chunk_costs and nemotron_draw_tests where they run,
as window-profile and tree-accept do. No behaviour changes.
…o_url WAV parts), encoded at each request's prompt pass, rows keyed by clip in the prompt cache
… a request (160 MiB chat bodies when the engine takes audio), MTP drafts with the clip's rows in the head
… audio input), its index row and the API's audio parts
The video decoder check and the audio locator's binding run from input_types.start, beside the
media they decide, so server.zig stays at 600 lines; stream.zig's two loop-guard tests join
long_loop_test.zig. No behaviour changes.
Main's input_types (ashhart#3004) publishes text, image and video; a Transcribe server now adds "audio"
after them, and the request media reads the same answer. Other models' lists are unchanged.
@ashhart
ashhart force-pushed the nemotron-transcribe-audio branch from eb98442 to aefee74 Compare November 24, 2026 22:51
@ashhart
ashhart merged commit b344443 into ashhart:main Nov 24, 2026
2 of 12 checks passed
@ashhart

ashhart commented Nov 24, 2026

Copy link
Copy Markdown
Owner

Thank you @BobClawblaw. 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.

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.

Nemotron 3.5 Transcribe 30B-A4B (speech in, BF16) on native CUDA

3 participants