Skip to content

Reduce Nemotron Transcribe transfers and unused prefill work - #1215

Merged
0xShug0 merged 1 commit into
mainfrom
perf/nemotron-transcribe-optimizations
Nov 6, 2026
Merged

0xShug0 merged 1 commit into
mainfrom
perf/nemotron-transcribe-optimizations

Conversation

@0xShug0

@0xShug0 0xShug0 commented Nov 6, 2026

Copy link
Copy Markdown
Owner

Reduces unnecessary transfers and prefill computation in Nemotron Transcribe without changing precision, sampling, timestamps or speaker labeling.

  • Export encoder ASR states only when timestamps or diarization need them.
  • Combine the CTC bridge, central-window selection and normalization into one cached graph, avoiding an intermediate device-to-host-to-device transfer. Keep host alignment and selected-token projection unchanged.
  • Skip unused computation after the final recurrent/KV update in intermediate resident prefill chunks. The final chunk retains the complete output head; both graph views share their tensor allocation. Disk-expert decoder execution remains unchanged.

All changes are model-local and enabled by default. No new performance option or framework/kernel changes.

Performance

RTX 5090, Debug build, eight CPU threads, Q4_K_S expert decoder with F16 encoder. Identical requests and settings on main and this branch, measured serially through reusable server sessions.

Resident component Main PR Time reduction
CUDA, 167-second prefill 659.93 ms 631.24 ms 4.3%
Vulkan, 167-second prefill 1,044.35 ms 995.23 ms 4.7%
CUDA, 328-second CTC 72.84 ms 65.76 ms 9.7%
Vulkan, 328-second CTC 93.61 ms 86.35 ms 7.8%
Profile Main peak VRAM PR peak VRAM
CUDA resident 22,323 MiB 22,285 MiB
CUDA offload 6,761 MiB 6,723 MiB
Vulkan resident 21,724 MiB 21,692 MiB
Vulkan offload 6,066 MiB 6,034 MiB

End-to-end GPU RTF changes remain near run variation because AR decoding dominates. This is a component-efficiency and small memory improvement, not a material overall throughput gain. First-use Vulkan graph/shader setup can still dominate initial requests; the component results above do not establish a startup improvement.

Validation

  • All 31 matched main/PR requests on CUDA, Vulkan and CPU returned identical complete non-timing results: transcripts, termination, timestamp positions, speaker labels, confidence values and speaker turns. Every requested alignment succeeded.
  • Reused sessions cover plain ASR, timestamps, diarization, long-to-short requests and option changes. GPU inputs include 167- and 328-second audio; CPU includes 28-second diarization.
  • Encoder bounds, decoder safety, decoder padding and alignment safety tests pass. Added coverage includes fused CTC normalization, changing window offsets, optional encoder-state export, attention cache updates, final full prefill chunks and quantized offload/resident equivalence.

@0xShug0
0xShug0 merged commit ab29800 into main Nov 6, 2026
7 checks passed
@0xShug0
0xShug0 deleted the perf/nemotron-transcribe-optimizations branch November 6, 2026 01:39
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.

1 participant