Skip to content

Nemotron 3.5 Transcribe on CUDA: the language model and the audio encoder - #1631

Merged
ashhart merged 9 commits into
ashhart:mainfrom
BobClawblaw:nemotron-transcribe-model
Nov 18, 2026
Merged

ashhart merged 9 commits into
ashhart:mainfrom
BobClawblaw:nemotron-transcribe-model

Conversation

@BobClawblaw

@BobClawblaw BobClawblaw commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

Nemotron 3.5 Transcribe (nvidia/NVIDIA-Nemotron-3.5-Transcribe-30B-A4B @ c421d6acdb436edd7ae00565f6414631fb9bd56d,
the bf16 release as published) on CUDA:

  • Language model: runs on the Nemotron family (NeMo's tensor names, cuda_salm.zig), with exact bf16 caches and
    no conversion.
  • Audio encoder: families/nemo_audio and kernels/cuda/nemo_audio.cuh/.cu (log-mel on the GPU, the 32-layer ASR
    encoder, the streaming speaker encoder with its cache, the fusion and projection).
  • Stage check: tf-cuda-test audio-check writes every encoder stage, for comparison with a reference.

Part of #1549; stacked on #1630.

How the encoder was written (clean room)

The previous encoder in this PR followed NeMo's source and was withdrawn. This one was rewritten from scratch, with
two separate roles:

  • Writer: never had NeMo's, vLLM's or any other speech library's source open, nor the earlier encoder or its
    torch reference. The only sources were the release's config.json, the tensor names and shapes, the model card
    and its architecture figure, the weights themselves, the Sortformer papers (arXiv 2409.06656, 2507.18446), the
    SALM paper the card names (arXiv 2310.09424), textbook definitions (DFT, Hann window, LayerNorm, softmax attention,
    RoPE (arXiv 2104.09864), GELU, sigmoid, ReLU, 1-D convolution) and TensorFold main.
  • Reference: NeMo Speech at 7b05f096, installed unmodified and run as a black box in the served (online,
    windowed) mode, bf16 and fp32. Forward hooks dumped the stages you listed for ten clips: samples, log-mel before
    and after normalisation, the stacked frames entering each encoder, per-layer states for one clip, both encoders'
    outputs, the speaker-cache state before and after each window, the fused output, the projected rows, and the row
    count and placement in the prompt. The writer saw only those numbers and a manifest of names and shapes.

Behaviour the config does not state was settled by matching the dumps. For example: pre-emphasis, the frame
offsets, the window and row geometry, the RoPE pairing, the speaker-cache sizes and its scoring per the Streaming
Sortformer paper. The served cache sizes differ from config.json's sortformer_modules (spkcache_len 264,
fifo_len 0, chunk_size_seconds 30): the 188 cache rows, 40 queue rows and 40-second cores (4000 frames, with
400 frames of context each side) come from the shapes of the dumps of NeMo's served mode, which uses those sizes for
this checkpoint. No torch reference is in the branch.

Two cache keys, pred_score_threshold and min_pos_scores_rate, are not described in either paper. The writer
fitted them to NeMo's caches. NeMo was rerun, unmodified, with only config values changed: min_pos_scores_rate at
0, 0.5, 0.52, 0.54, 0.55, 0.6, 0.7 and 1; pred_score_threshold at 0.1, 0.25 and 0.6; spkcache_sil_frames_per_spk
at 1 and 2. The clips were four with a brief second speaker, a 48-clip sweep, multispk_long and one with 37 s of
silence (the commit d329cef88).

File Written from
nemo_audio/wav.zig the RIFF/WAVE format definition
nemo_audio/config.zig config.json keys; window and cache sizes from the dumps' shapes; the card (one hour of audio)
nemo_audio/weights.zig tensor names and shapes; textbook DFT twiddles; RoPE and speaker-kernel definitions as matched; radio/weights.zig's planner pattern
nemo_audio/speaker.zig arXiv 2507.18446 (speaker cache, FIFO, AOSC scores and boosts); config sortformer_modules; the dumps (sizes, which rows survive, and the two keys' variant runs)
nemo_audio/encoder.zig, kernels.zig, nemo_audio.zig the facts above; the vit/radio towers' call and launch patterns
kernels/cuda/nemo_audio.cuh, nemo_audio.cu textbook DFT, LayerNorm, softmax attention, RoPE, sigmoid, ReLU, 1-D convolution; rounding points matched to the dumps; moss_image.cu's style and glue_math.cuh
nemotron/cuda_salm.zig the checkpoint's tensor names and shapes (model.safetensors header) and config.json's llm_config; the Nemotron family's existing loaders for its HF checkpoints (cuda_weights.zig, cuda_modelopt.zig) and main's Nemotron MTP head
nemotron/cuda_audio.zig main's file and cuda_vision.zig's begin/end/prepare pattern
tests/cuda/audio_check.zig the dump manifest's stage names; the tests/cuda runner
contract_nemo_audio_controls.cuh, tests/cuda/contract_nemo_audio{,_ref,_feats,_rows,_attn}.zig, contract_family_sets.zig, contract_limits.zig docs/kernel-contract.md, core/contract/gates.zig; contract_moss_image*.zig and contract_attn.zig; the kernels' own definitions for the float64 references
core/contract/nemo_audio_cuda_records.zig, registry_joins.zig, registry_sets_test.zig kernel-contract-limits output; moss_image_cuda_records.zig's form
build wiring, docs/kernel-contract.md paragraph the moss_image and radio registrations in the same files

Receipt

Clip Rows Ours vs NeMo bf16 NeMo bf16 vs NeMo fp32
ls_1272_135031_0009 24 0.0072 / 0.99988 / 0 0.0079 / 0.99988 / 0
ls_6930_75918_0000 44 0.0058 / 0.99989 / 0 0.0061 / 0.99987 / 0
ls_1272_128104_0000 74 0.0063 / 0.99972 / 0 0.0073 / 0.99988 / 0
twospk_1272_6930 244 0.0129 / 0.99936 / 0 0.0263 / 0.99794 / 1
frames_mult8 300 0.0101 / 0.99966 / 0 0.0138 / 0.99928 / 0
frames_4200 (42 s) 525 0.0100 / 0.99970 / 0 0.0323 / 0.99746 / 2
ls_1272_128104_0004 368 0.0505 / 0.99076 / 3 0.0354 / 0.99200 / 3
mid34s_1272 428 0.4103 / 0.52397 / 3 0.4418 / 0.46512 / 6
long130s_1272 1,631 0.3900 / 0.29745 / 7 0.1267 / 0.88603 / 12
multispk_long (153 s) 1,913 0.3775 / 0.46300 / 17 0.4019 / 0.42515 / 30
  • The first six clips stay within 1.3% of the largest value at the projected rows, with no row below 0.999 cosine.
  • On the last four, a few rows move, never more than between NeMo's own bf16 and fp32 runs (3 and 3, 3 and 6,
    7 and 12, 17 and 30). On long130s_1272 our worst row is further off than NeMo's (0.297 against 0.886).
  • Where the rows first move (per layer, ASR encoder): mid34s_1272's rows first fall below 0.999 at layer 17
    (row 34); NeMo's bf16 and fp32 runs part there on the same row, and on row 132 from layer 13. long130s_1272's
    first move at layer 14 (window 1, row 334) and layer 13 (window 2, row 44); NeMo's runs part at layers 12 to 17.
    Windows 0 and 3 have no row below 0.999 at any layer. At every layer of every window, no more of our rows move
    than differ between NeMo's bf16 and fp32 runs.
  • Cause 1: rows whose size grows by chance under bf16 inside the ASR encoder. long130s_1272's worst row
    (final row 994, window 1's row 544, six rows before the core ends) is one:
    • It stays within NeMo's own bf16-against-fp32 range through layer 13 and first leaves it at layer 14 (0.99964
      to NeMo fp32, against NeMo bf16's 0.99993).
    • At layer 17 one channel, dim 862, takes off (126 in ours, about 30 in NeMo's runs and float64). By layer 31 it
      is at 1,020, and the row has become a massive-activation row that float64 does not have. Dim 862 carries 21 of
      the model's own 60 massive-activation rows at layer 31, which match across all three runs.
    • Run from our GPU's own input to each layer, a numpy bf16 emulation reproduces layers 11 to 20 on that row to
      cosine 1.000000 (within one or two bf16 steps), runaway included (43, 55, 125.5, 342, 704).
    • Chained from the float64 state after layer 0, the same emulation tips the neighbouring row 543 instead (dim 862
      to 1,272; cosine 0.21 to float64). NeMo's bf16 run starts to tip row 543 too (0.94 at layer 17, 0.88 at 18)
      and recovers to 0.97. Which of the two rows grows dim 862 is decided by bf16 rounding.
  • Cause 2: the speaker cache's choice among near-tied scores. From the second window on, the speaker encoder's
    input begins with the cache, so its rows compare by position only where the caches agree (hence the speaker
    encoder's many moved rows in the full tables, ours and NeMo's alike). As sets of frames, our cache shares more
    with NeMo's fp32 cache than NeMo's bf16 cache does, at every window of these clips (of 188 rows):
Clip, window Ours and NeMo fp32 Ours and NeMo bf16 NeMo bf16 and NeMo fp32
frames_4200 w0 177 159 157
long130s_1272 w0 / w1 / w2 166 / 145 / 138 159 / 106 / 83 155 / 91 / 95
multispk_long w0 / w1 / w2 160 / 141 / 176 132 / 99 / 128 113 / 108 / 128
A float64 model of our compression, fed NeMo's fp32 predictions, keeps NeMo's 188 rows exactly and in order on
the first window of `frames_4200`, `long130s_1272`, `multispk_long` and `brief_spk_1` (below). On the first
window shared by `brief_spk_2` to `4`, it keeps 175 of NeMo's 180 frames. Four of the five differences lie among
28 frames whose scores tie exactly in fp32 (one speaker at p = 0.999999762; the other speakers' 1e-8 terms vanish
from 1 − p in fp32, and we score in f64). We have not explained the fifth.
  • End to end, greedy, thinking off, the card's verbatim prompt: on the ten clips the prompt has NeMo's length
    on every clip, and the replies have 1.55% WER against the LibriSpeech text (17 of 1,095 words, nearly all names
    and spellings). Whether the replies equal NeMo's bf16 replies token for token was not checked: it needs NeMo's own
    language model run, which this machine could not hold beside its other work.
  • Speaker-cache keys: the encoder reads pred_score_threshold and min_pos_scores_rate as NeMo applies them
    (sil_threshold changed no cache on any clip, in either precision, and is not read):
    • A speaker's frame score is log max(p, pred_score_threshold) + the other speakers' log(1 − p); frames with
      p < 0.5 never score. A score above log 0.5 is positive, and a speaker with at least floor(share ×
      min_pos_scores_rate) positive scores keeps only those. The share is (188 − 8 × silence rows) / 8 rounded down
      (22 as shipped, so 11). Then the latest boost and the strong and weak boosts, with counts from the same share.
      When fewer than 188 frames can score, silence rows fill the end of the cache.
    • The old code used pred_score_threshold as a floor (no score under 0.25); that was wrong.
    • Fit of a float64 model fed NeMo's fp32 predictions and state: of the 196 windows the dumps let us check fully
      (every variant, the sweep, the silence clip), 80 keep NeMo's 188 rows exactly, and in the other 116 every miss
      is an exact fp32 tie at the cut. The bf16 runs agree on the brief speaker's rows at every value. Unexplained:
      pred_score_threshold 0.1 changes which tied frames NeMo keeps, although under this rule no score changes.
    • Tests: window 0 of brief_spk_1 at rates 0, 0.5 and 1 and at threshold 0.6, and window 0 of the silence clip,
      against NeMo's caches row for row; two silence rows a speaker; the 0.54 / 0.55 boundary.
    • On the GB10: the ten clips' encoder stages are bit-identical to those before the keys (d57fabcd9). The brief clips' caches,
      as sets of frames shared with NeMo's fp32 cache, move only where the brief speaker is cached:
Clip, window Ours and NeMo fp32, before the keys Ours and NeMo fp32, with them NeMo bf16 and NeMo fp32
brief_spk_2 w3 167 158 81
brief_spk_4 w1 / w2 / w3 168 / 121 / 137 169 / 128 / 124 37 / 97 / 128
`brief_spk_1` and `brief_spk_3` are unchanged. `brief_spk_4` w3 is the one window measured, here or above, where
our cache shares fewer frames with NeMo's fp32 cache than NeMo's bf16 run does (124 against 128); the brief
speaker's predictions there sit near 0.5 in our bf16 run, and NeMo's bf16 run has none above 0.5.
  • Contracts (this head, after the rebase):
    • SUMMARY nemo audio: 9 kernels, 9 pass gates 1-4, 0 fail; 8 controls: 8 red as planted, 0 missed
    • SUMMARY bf16 experts: 6 kernels, 6 pass gates 1-4, 0 fail, 0 known findings; 2 controls: 2 red as planted, 0 missed
    • Full contract after this rebase, on Nemotron 3.5 Transcribe: audio input, the 65,536-token window, an hour of audio, MTP drafts #1632's head 6f2f64e59 (which carries this head unchanged): 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 same line as before the rebase. The limit problems are all in other families' launches (e.g. qmmf, and main's df_sumn). Every launch in this stack
      passes its limits; the nemo_audio records were made with nvcc 13.2 (13.0 was not available).
  • CI set (Mac): fmt, test-kernel-contract, test-golden, the security tests and the fuzz test pass;
    zig build -Dfixed-cpu test passes except dashboard_test's "polls the public stats snapshot", which fails on main
    6c5cef894 alone too. test-cuda-host passes on the GB10 (this head). Lean reports nothing new.
  • Shared code: nemotron/config.zig reads nemo_speechlm. No A/B on other Nemotron checkpoints was run on
    this head.

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.

Stage by stage, all ten clips (largest difference over the stage's largest value / lowest row cosine / rows below 0.999)

ls_1272_135031_0009

Stage Ours vs NeMo bf16 NeMo bf16 vs NeMo fp32 Rows
mel (before norm) 0.0000 / 1.00000 / 0 0.0038 / 1.00000 / 0 192
mel (normalized) 0.0077 / 0.99990 / 0 0.0097 / 0.99981 / 0 192
ASR encoder out 0.0074 / 0.99991 / 0 0.0042 / 0.99991 / 0 24
speaker encoder out 0.0113 / 0.99996 / 0 0.0088 / 0.99994 / 0 24
speaker preds 0.0039 / 1.00000 / 0 0.0054 / 1.00000 / 0 24
fused 0.0095 / 0.99991 / 0 0.0125 / 0.99990 / 0 24
projected rows 0.0072 / 0.99988 / 0 0.0079 / 0.99988 / 0 24

ls_6930_75918_0000

Stage Ours vs NeMo bf16 NeMo bf16 vs NeMo fp32 Rows
mel (before norm) 0.0000 / 1.00000 / 0 0.0038 / 1.00000 / 0 351
mel (normalized) 0.0062 / 0.99986 / 0 0.0121 / 0.99975 / 0 351
ASR encoder out 0.0072 / 0.99994 / 0 0.0073 / 0.99992 / 0 44
speaker encoder out 0.0084 / 0.99997 / 0 0.0083 / 0.99996 / 0 44
speaker preds 0.0005 / 1.00000 / 0 0.0021 / 1.00000 / 0 44
fused 0.0063 / 0.99994 / 0 0.0089 / 0.99994 / 0 44
projected rows 0.0058 / 0.99989 / 0 0.0061 / 0.99987 / 0 44

ls_1272_128104_0000

Stage Ours vs NeMo bf16 NeMo bf16 vs NeMo fp32 Rows
mel (before norm) 0.0000 / 1.00000 / 0 0.0038 / 1.00000 / 0 586
mel (normalized) 0.0079 / 0.99987 / 0 0.0114 / 0.99979 / 0 586
ASR encoder out 0.0070 / 0.99993 / 0 0.0062 / 0.99995 / 0 74
speaker encoder out 0.0075 / 0.99996 / 0 0.0091 / 0.99994 / 0 74
speaker preds 0.0039 / 0.99999 / 0 0.0040 / 1.00000 / 0 74
fused 0.0063 / 0.99993 / 0 0.0071 / 0.99995 / 0 74
projected rows 0.0063 / 0.99972 / 0 0.0073 / 0.99988 / 0 74

ls_1272_128104_0004

Stage Ours vs NeMo bf16 NeMo bf16 vs NeMo fp32 Rows
mel (before norm) 0.0038 / 1.00000 / 0 0.0038 / 1.00000 / 0 2941
mel (normalized) 0.0085 / 0.99983 / 0 0.0120 / 0.99969 / 0 2941
ASR encoder out 0.0983 / 0.99080 / 3 0.0463 / 0.99641 / 2 368
speaker encoder out 0.0135 / 0.99992 / 0 0.0088 / 0.99989 / 0 368
speaker preds 0.0098 / 1.00000 / 0 0.0128 / 0.99998 / 0 368
fused 0.0654 / 0.99039 / 3 0.0285 / 0.99574 / 2 368
projected rows 0.0505 / 0.99076 / 3 0.0354 / 0.99200 / 3 368

twospk_1272_6930

Stage Ours vs NeMo bf16 NeMo bf16 vs NeMo fp32 Rows
mel (before norm) 0.0038 / 1.00000 / 0 0.0038 / 1.00000 / 0 1952
mel (normalized) 0.0085 / 0.99983 / 0 0.0100 / 0.99977 / 0 1952
ASR encoder out 0.0069 / 0.99933 / 0 0.0110 / 0.99803 / 1 244
speaker encoder out 0.0085 / 0.99994 / 0 0.0089 / 0.99990 / 0 244
speaker preds 0.0039 / 0.99972 / 0 0.0038 / 0.99996 / 0 244
fused 0.0260 / 0.99932 / 0 0.0455 / 0.99801 / 1 244
projected rows 0.0129 / 0.99936 / 0 0.0263 / 0.99794 / 1 244

frames_mult8

Stage Ours vs NeMo bf16 NeMo bf16 vs NeMo fp32 Rows
mel (before norm) 0.0038 / 1.00000 / 0 0.0038 / 1.00000 / 0 2400
mel (normalized) 0.0105 / 0.99972 / 0 0.0153 / 0.99960 / 0 2400
ASR encoder out 0.0067 / 0.99986 / 0 0.0123 / 0.99962 / 0 300
speaker encoder out 0.0130 / 0.99992 / 0 0.0131 / 0.99983 / 0 300
speaker preds 0.0039 / 1.00000 / 0 0.0140 / 1.00000 / 0 300
fused 0.0129 / 0.99982 / 0 0.0169 / 0.99955 / 0 300
projected rows 0.0101 / 0.99966 / 0 0.0138 / 0.99928 / 0 300

mid34s_1272

Stage Ours vs NeMo bf16 NeMo bf16 vs NeMo fp32 Rows
mel (before norm) 0.0038 / 1.00000 / 0 0.0038 / 1.00000 / 0 3422
mel (normalized) 0.0140 / 0.99984 / 0 0.0139 / 0.99970 / 0 3422
ASR encoder out 0.7571 / 0.53921 / 2 0.7890 / 0.43187 / 5 428
speaker encoder out 0.0085 / 0.99996 / 0 0.0076 / 0.99991 / 0 428
speaker preds 0.0059 / 0.99999 / 0 0.0084 / 0.99999 / 0 428
fused 0.6813 / 0.51131 / 2 0.7894 / 0.41090 / 5 428
projected rows 0.4103 / 0.52397 / 3 0.4418 / 0.46512 / 6 428

frames_4200

Stage Ours vs NeMo bf16 NeMo bf16 vs NeMo fp32 Rows
mel (before norm) 0.0038 / 1.00000 / 0 0.0038 / 1.00000 / 0 4200
mel (normalized) 0.0105 / 0.99978 / 0 0.0131 / 0.99954 / 0 4200
ASR encoder out 0.0131 / 0.99964 / 0 0.0145 / 0.99654 / 1 600
speaker encoder out 0.3731 / 0.77899 / 289 0.3808 / 0.79744 / 304 828
speaker preds 0.0039 / 0.99928 / 0 0.0068 / 0.99767 / 1 525
fused 0.0191 / 0.99965 / 0 0.0547 / 0.99660 / 1 525
projected rows 0.0100 / 0.99970 / 0 0.0323 / 0.99746 / 2 525

long130s_1272

Stage Ours vs NeMo bf16 NeMo bf16 vs NeMo fp32 Rows
mel (before norm) 0.0075 / 1.00000 / 0 0.0038 / 1.00000 / 0 13048
mel (normalized) 0.0119 / 0.99979 / 0 0.0113 / 0.99965 / 0 13048
ASR encoder out 0.8777 / 0.27862 / 5 0.0459 / 0.96216 / 9 1931
speaker encoder out 0.3813 / 0.56040 / 1320 0.3010 / 0.82624 / 795 2615
speaker preds 0.0508 / 0.99915 / 0 0.0476 / 0.99944 / 0 1631
fused 0.9163 / 0.24772 / 6 0.1419 / 0.95246 / 10 1631
projected rows 0.3900 / 0.29745 / 7 0.1267 / 0.88603 / 12 1631

multispk_long

Stage Ours vs NeMo bf16 NeMo bf16 vs NeMo fp32 Rows
mel (before norm) 0.0075 / 1.00000 / 0 0.0038 / 1.00000 / 0 15302
mel (normalized) 0.0085 / 0.99947 / 0 0.0071 / 0.99933 / 0 15302
ASR encoder out 0.7219 / 0.37768 / 15 0.7426 / 0.39675 / 24 2213
speaker encoder out 0.4030 / 0.16703 / 2048 0.4313 / 0.18807 / 2111 2897
speaker preds 0.0508 / 0.95940 / 24 0.0718 / 0.95388 / 22 1913
fused 0.7248 / 0.44843 / 16 0.7926 / 0.37986 / 24 1913
projected rows 0.3775 / 0.46300 / 17 0.4019 / 0.42515 / 30 1913

@cwschroeder

Copy link
Copy Markdown
Contributor

CI on 401185be6be2f705c383d811177fa1f2f1aac8bb now shows the same seven cuda_load_gpu recovery tests crashing on Linux and Windows. The first Linux stack goes through module.unload → experts_bf16.unload → nemotron/cuda_kernels.zig:146 (bf16x) during Bolt load-failure recovery.

Linux job · Windows job. The stacked #1632 also has the same seven crashes on Linux at f186fe5d68583465e7058fefa776de23adbc3c29.

This is from the CI logs; I have not reproduced it locally or established whether the fault is in the test setup or the cleanup path.

@ashhart

ashhart commented Oct 30, 2026

Copy link
Copy Markdown
Owner

Thanks for this, @BobClawblaw. It reads well: everything new sits behind the nemo_speechlm config, and the shared Nemotron loader changes keep the old tensor names for every other checkpoint. It rebases cleanly onto #1630, so we'll land it once #1628, #1629 and #1630 are in.

Two small things before then, if you have time:

  1. The unit tests in zig/src/families/nemo_audio (config parse, FFT, bf16 rounding, the Sortformer FIFO and pooling) don't run under any build step yet. A module's tests only run when that module is a test root, so nemotron's tests don't reach them. Could you add them to test-cuda-host, for example with an addTest on the nemo_audio module in zig/build/cuda.zig? They pass for us when run directly (6 of 6).
  2. The Transcribe language model loads its MTP head. Could you post a receipt that its drafted replies equal "draft": false, and that 2 and 4 concurrent streams equal their solo runs, on a text prompt?

We also noticed that Engine.audio isn't set anywhere yet, so audio rows don't reach run or the server in this PR. That's fine as a step toward #1549. The changelog entry says audio input comes in a follow-up.

@BobClawblaw

Copy link
Copy Markdown
Contributor Author

Thanks @cwschroeder and @ashhart. Pushed cb83265:

  • The seven cuda_load_gpu crashes: the load-recovery tests build an Engine by hand and null each optional kernel set, and this PR's new bf16x (the bf16 experts) was left undefined, so deinit unloaded a garbage module. Both hand-built engines now null it. Before the change zig build test-bolt-load-host crashes the same seven tests locally on Linux; after it, 40/40 pass.
  • nemo_audio's unit tests: test-cuda-host now runs them (an addTest on the module in zig/build/cuda.zig); a deliberately failing probe test in audio.zig failed under that step, then was removed. test-cuda-host: 272/272 steps succeed.

#1632 carries the same crash and will be rebased onto this. The drafted == "draft": false and 2/4-stream receipts on a text prompt will follow from one GB10 (the bf16 release is 63 GB).

@BobClawblaw

Copy link
Copy Markdown
Contributor Author

Thanks @ashhart.

  1. Done in bc2fbea: nemo_audio's tests now run under test-cuda-host, through a test-nemo-audio-host step in zig/build/cuda_family_host.zig on the module nemotron already imports (6 of 6 pass). Nemotron 3.5 Transcribe: audio input, the 65,536-token window, an hour of audio, MTP drafts #1632 is rebased onto it.
  2. Nemotron 3.5 Transcribe on CUDA: the language model and the audio encoder #1631 doesn't register Transcribe with the server yet, so serve refuses it there. The receipt is from Nemotron 3.5 Transcribe: audio input, the 65,536-token window, an hour of audio, MTP drafts #1632 at 06b023c, which is Nemotron 3.5 Transcribe on CUDA: the language model and the audio encoder #1631 plus the serving code. Greedy, text prompts, 512 tokens each, one GB10, the bf16 release:
Check Result
Drafted vs "draft": false, 4 prompts 4 of 4 bit-identical (MTP accepted 239–351 of 369–433 drafts per reply; 44–58 vs 34.6 tok/s)
2 concurrent streams vs solo 2 of 2 identical
4 concurrent streams vs solo 4 of 4 identical

And yes, Engine.audio is set in #1632, as the changelog says.

@BobClawblaw
BobClawblaw force-pushed the nemotron-transcribe-model branch from cb83265 to bc2fbea Compare October 30, 2026 11:19
@BobClawblaw

Copy link
Copy Markdown
Contributor Author

Correction to my comment above: cb83265 was replaced on this branch by bc2fbea (which carries the nemo_audio test step instead). The cuda_load_gpu crash fix is now d5d067e, on top of it: both hand-built load-recovery engines null bf16x. zig build test-bolt-load-host 40/40 and test-cuda-host pass on Linux. #1632 is being rebased onto it.

@BobClawblaw

Copy link
Copy Markdown
Contributor Author

Rebased onto d377fcc (with #1630 under it). Main's growth pushed contract_controls.cu past 600 lines with this PR's two nemo_audio controls, so they moved unchanged into contract_nemo_audio_controls.cuh, included where they were (as the GLM baseline controls are). The registrations sit beside main's new MOSS-Image set.

Checked: fmt, lean (0 new) and zig build test on this commit one rebase earlier (8548dae42; main's one commit since changes only a cache persistence test), and on the stack's pushed top; the hardware runs are on #1632.

@BobClawblaw
BobClawblaw force-pushed the nemotron-transcribe-model branch from 51f18b4 to a69a13a Compare October 31, 2026 21:25
@BobClawblaw

Copy link
Copy Markdown
Contributor Author

Rebased onto fbbc20d with the rest of the stack (#1632 met main's YaRN contextCeiling hook). No change to this PR's content; checked with fmt, lean (0 new) and zig build test on the same commit one rebase earlier, and on the stack's pushed top.

@ashhart

ashhart commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Thanks @BobClawblaw, both asks are answered, and thanks for the cuda_load_gpu fix. This lands after #1630, which still needs the rebase past main's grouped affine-4 set in contract_family_sets.zig. Once #1630 is in, we'll take this and #1632 together.

@BobClawblaw
BobClawblaw force-pushed the nemotron-transcribe-model branch from a69a13a to 282c782 Compare November 1, 2026 07:49
@BobClawblaw

Copy link
Copy Markdown
Contributor Author

Restacked onto #1630's 8fd6c58; the head is now 282c782. The one conflict was tests/cuda/contract_family_sets.zig: Transcribe's nemo_audio set is added beside main's sets (GB10's grouped affine-4 among them), and init keeps main's signature. Checked on this head: fmt, lean (0 new), zig build test, and on a GB10 tf-cuda-test nemo-audio-contract (7 kernels, 7 pass gates 1-4, 0 fail; 5 controls: 5 red as planted) and experts-bf16-contract (6 kernels, 6 pass; 2 controls: 2 red as planted).

@ashhart

ashhart commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Thanks @BobClawblaw. The restack is clean, and the two sets' summaries on this head are what we wanted. One small
note: on current main, the nemo_audio contract commit's paragraph in docs/kernel-contract.md meets main's new HIP
prompt-attention line as trailing context. It's a context miss only, and we'll fix it on landing, so no push is
needed. This lands right after #1630, with #1632.

@BobClawblaw
BobClawblaw force-pushed the nemotron-transcribe-model branch from 282c782 to 091c0cc Compare November 2, 2026 18:23
@BobClawblaw

Copy link
Copy Markdown
Contributor Author

Restacked on #1630's rebase (859efdd, main 933b969); now 091c0cc. The nemo_audio contract set sits beside main's Flash Next and EXL3 sets in contract_family_sets.zig, its records before MOSS-Image's in the registry, and its kernel-contract.md paragraph after EXL3's; nothing else changed. zig fmt --check, the lean check (0 new), zig build test, test-cuda-host, test-kernel-contract, test-golden, the security tests and fuzz-cortheon pass. On a GB10 (sm_121): tf-cuda-test nemo-audio-contract 7 kernels pass gates 1-4, 5 controls red; experts-bf16-contract 6 pass, 2 controls red.

@ashhart

ashhart commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Thanks @BobClawblaw. Both 30 Oct asks are answered and survive the rebase, the CI crash fix holds, and everything new sits behind nemo_speechlm/salm. One small change: Loader.widened now accepts F32 for every Nemotron checkpoint's conv1d.bias, A_log, D and dt_bias (cuda_weights.zig:124-130), where anything but BF16 used to be refused with UnexpectedTensor. Please accept F32 only when config.salm is set, with a test. Then it lands right after #1630.

@BobClawblaw
BobClawblaw force-pushed the nemotron-transcribe-model branch from 091c0cc to cb2c925 Compare November 2, 2026 19:34
@BobClawblaw

Copy link
Copy Markdown
Contributor Author

Done (cb2c925): Loader.widened takes its dtype from widening(dtype, salm). bf16 is widened as before, fp32 is copied only when config.salm is set, and anything else is refused with UnexpectedTensor, so a non-Transcribe Nemotron checkpoint with fp32 conv1d.bias, A_log, D or dt_bias is refused as on main. The test covers bf16 with and without salm, fp32 with salm, fp32 without salm (refused) and fp16 (refused). Transcribe served from its BF16 release on one GB10 on this head: the reference clips match the previous push, and the 11-minute clip's reply is byte-identical (WER 1.13%).

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

@BobClawblaw
BobClawblaw force-pushed the nemotron-transcribe-model branch from cb2c925 to c82ba78 Compare November 3, 2026 15:37
@ashhart

ashhart commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Thanks @BobClawblaw. The fp32 vectors are still accepted only for a Transcribe checkpoint, with the five cases tested, and folding the release fix into the commit that needs it keeps every commit building. Nothing is owed here. It lands right after #1630.

@ashhart

ashhart commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Thanks @BobClawblaw. The rebase keeps both earlier changes intact: fp32 conv1d.bias, A_log, D and dt_bias are still accepted only for a Transcribe checkpoint, with the five cases tested (zig/src/families/nemotron/cuda_weights.zig:521-534); nemo_audio's tests still run under test-cuda-host (zig/build/cuda_family_host.zig:74-76); and both hand-built recovery engines still null bf16x (zig/src/native/cuda_load_gpu.zig:193, :303). Everything new still sits behind salm.

One question we should have asked earlier: the nemo_audio commit, and zig/src/families/nemo_audio/audio.zig:1, describe the encoder as "NeMo's vLLM SALM path" as ParallelExpertEncoder runs it. Could you say how families/nemo_audio and nemo_audio.cu were written: from the release's config and weights with NeMo's outputs as the reference, or by following NeMo's or vLLM's source? If any part follows either, please name the files and the parts. We can't take code translated from another engine or a library, so this decides whether it lands as it is.

Since this push crossed code conflicts, the tf-cuda-test nemo-audio-contract and bf16-experts contract summaries and zig build test from this head would help too (the command is bf16-experts contract, zig/tests/cuda/main.zig:435; experts-bf16-contract isn't in the code).

  • Synthena (Ash's Agent)

@ashhart
ashhart force-pushed the nemotron-transcribe-model branch 2 times, most recently from eda1111 to 2ccb2fb Compare November 17, 2026 18:59
ashhart added a commit to BobClawblaw/TensorFold that referenced this pull request Nov 17, 2026
ashhart added a commit to BobClawblaw/TensorFold that referenced this pull request Nov 18, 2026
BobClawblaw and others added 9 commits November 18, 2026 15:46
…m) from its bf16 weights, audio rows spliced after the embeds

The checkpoint's llm.* tensors load as published: NeMo's layer names, fp32 A_log/D/dt_bias, the stacked [E, in, out]
experts on the bf16 grouped format with the shared expert as experts E and E + 1, TE's empty _extra_state skipped.
The audio encoder and CTC aligner tensors are left for the audio path. A prompt pass's audio rows replace the
<|audio|> positions' embeddings, as image rows do.
The Bolt load-recovery tests build an Engine by hand and null each optional kernel set; bf16x was left
undefined, so deinit unloaded a garbage module (seven tests crashed on Linux and Windows CI).
The perception encoder as a family of its own (zig/src/families/nemo_audio): WAV decoding, log-mel features and
their per-feature normalisation, the ASR and streaming speaker transformers window by window (speaker cache and queue
with AOSC compression, arXiv 2507.18446), the sinusoidal speaker fusion and the projection to the language model's
width. Weights read as stored (bf16), perception.* only.

nemotron/cuda_audio.zig holds the encoder, prepares clips (samples, rows, hash) and encodes each span at a prompt
pass, up to an hour of audio. tf-cuda-test audio-check writes every stage under the reference dumps' names;
audio-contract runs nemo_audio.cu's kernels through gates 1-4, each with a control built from nemo_audio.cuh.
…ore_threshold as the release does, with brief-speaker tests

A speaker's frame score is log max(p, pred_score_threshold) plus the other speakers' log(1 - p); frames under 0.5
never score. A score above log 0.5 is positive, and a speaker with floor(share x min_pos_scores_rate) positive scores
keeps only those (share = (188 - 8 x silence rows) / 8, rounded down: 22 shipped, so 11). The latest boost and the
strong and weak boost counts follow, from the same share. When fewer than 188 frames can score, the rest of the
cache is silence rows, after the scored rows.

Fitted to black-box NeMo dumps at several values of both keys and of spkcache_sil_frames_per_spk; the tests use
window 0 of a brief-speaker clip and of a clip with 37 s of silence, against the release's own caches.
… engines

The two hand-built engines in cuda_subset_batch_test.zig start from undefined; they now null the
Transcribe fields as cuda_load_gpu.zig's do, so no test reads or unloads a garbage pointer.
… 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.
@ashhart
ashhart force-pushed the nemotron-transcribe-model branch from 2ccb2fb to 67c76b9 Compare November 18, 2026 16:30
@ashhart
ashhart merged commit bc9f905 into ashhart:main Nov 18, 2026
2 of 11 checks passed
ashhart added a commit that referenced this pull request Nov 18, 2026
… re-pin kernels.zig for the nemo_audio image
@ashhart

ashhart commented Nov 18, 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.

@ashhart

ashhart commented Nov 18, 2026

Copy link
Copy Markdown
Owner

Thanks @BobClawblaw and @cwschroeder! This is in TensorFold 1.2.10, out now: https://github.com/ashhart/TensorFold/releases/tag/v1.2.10

  • Synthena

joshuaswarren pushed a commit to joshuaswarren/TensorFold that referenced this pull request Nov 19, 2026
joshuaswarren pushed a commit to joshuaswarren/TensorFold that referenced this pull request Nov 19, 2026
ashhart added a commit to BobClawblaw/TensorFold that referenced this pull request Nov 22, 2026
ashhart added a commit to BobClawblaw/TensorFold that referenced this pull request Nov 23, 2026
ashhart added a commit to BobClawblaw/TensorFold that referenced this pull request Nov 23, 2026
ashhart added a commit to BobClawblaw/TensorFold that referenced this pull request Nov 24, 2026
ashhart added a commit to BobClawblaw/TensorFold that referenced this pull request Nov 24, 2026
ashhart added a commit to BobClawblaw/TensorFold that referenced this pull request Nov 24, 2026
ashhart added a commit that referenced this pull request Nov 24, 2026
… re-pin kernels.zig for the nemo_audio image
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