Repository navigation
Refactor Nemotron models with shared RoPE encoder and host CTC decoding - #1213
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extract reusable RoPE Transformer encoder construction and cached execution from Nemotron Transcribe and Nemotron 3 Diarization. Both models use the shared encoder, and Transcribe’s CTC adapter reuses its Transformer builder.
RopeTransformerEncoderModuleowns numerical graph construction and resolved weight types.RopeTransformerEncoderRuntimeowns cached graphs, positional inputs, attention masks, allocation and execution.CtcHostDecoderowns host token collapse, frame spans and full/anchored-band alignment with reusable workspace.Validation
All compared transcripts, word timestamps, speaker turns, non-timing result fields and saved speaker-probability tensors matched main exactly. CUDA and Vulkan checks cover default/eager attention, Diar BF16/Q8, Transcribe full residency and host-staged experts, CTC timestamps, speaker tagging, streaming, mixed-length native batches, repeated requests after shape changes, and unload/reload. Small CPU checks also matched. Debug builds and relevant encoder, CTC, alignment and scheduling tests passed.
Offline performance
RTX 5090, CUDA 12.9 and native Vulkan, Debug builds, eight CPU threads. Matched request sequences use approximately 6–328 seconds of audio. RTF excludes the first warmup request. Parentheses show observed process peak VRAM in MiB, sampled every 100 ms over the session.
disk_experts=truestages expert weights from host storage; expert computation stays on the GPU. Post-unload GPU residency matched main or was slightly lower.Streaming performance
Matched warmed HTTP streaming requests use 28-, 167- and 28-second recordings. RTF includes upload, transport and complete SSE delivery; warmup and reload are excluded.
lowlowvery_highvery_highThe earlier apparent
very_highslowdown was timing noise: it did not reproduce across 16 counterbalanced server runs. The table reports the final steady-state results, within 1% of main. Individual paired differences varied in both directions, and all outputs matched exactly.CPU performance
Ryzen 9 7900X, eight threads. Small matched runs after warmup: