Skip to content

Use PreparedGraph build contexts in Nemotron Transcribe and Ming3 Audio - #1269

Merged
0xShug0 merged 1 commit into
mainfrom
refactor/prepared-graph-build-context
Nov 12, 2026
Merged

0xShug0 merged 1 commit into
mainfrom
refactor/prepared-graph-build-context

Conversation

@0xShug0

@0xShug0 0xShug0 commented Nov 12, 2026

Copy link
Copy Markdown
Owner

Nemotron Transcribe and Ming3 Audio already own their transient graphs through PreparedGraph, but several builders reconstruct ModuleBuildContext from individual fields. Derive these contexts from their graph owner so future execution settings propagate consistently.

  • Update Nemotron's regular/offload decoder, diarization pre-encoder and CTC bridge, plus Ming3's regular Thinker builder.
  • Remove redundant cached raw context/graph pointers from the affected graph wrappers. Keep persistent recurrent/KV state separately owned.
  • Preserve graph entry points, caching, allocation policies, precision, sampling and log keys. Only four model-local files change; no framework, GGML or spec changes.

Validation

CUDA on RTX 5090, Debug build, eight threads, published mixed Q4 expert packages. Baseline: main 5c3d0d45c. Requests ran sequentially in A→B→B→A order, with an unrelated short warmup per session. Offload used eight expert-cache slots and unpinned host storage.

Configuration Before RTF After RTF Peak VRAM before → after (MiB)
Nemotron Transcribe, full GPU 0.019837 0.018659 22,295 → 22,295
Nemotron Transcribe, offload 0.271752 0.274698 6,493 → 6,493
Ming3 Audio ASR, full GPU 0.016887 0.016627 7,879 → 7,879
Ming3 Audio ASR, offload 0.069682 0.069189 4,241 → 4,241
Ming3 Audio S2S, full GPU 0.179632 0.179123 9,483 → 9,483
Ming3 Audio S2S, offload 0.766930 0.772847 4,609 → 4,609

RTF aggregates matched post-warmup short/28-second ASR requests or spoken responses. Peak VRAM also includes the separate 167-second lifecycle requests. Nemotron's apparent full-GPU gain includes first-use CTC setup variation and is not claimed as a speedup. A shape-warmed Nemotron offload comparison measured 3,504.525 → 3,502.661 ms (−0.05%), with identical peak VRAM; the initial small slowdown did not persist.

  • All 68 primary A/B request pairs match after excluding timing fields, including transcripts, timestamps, speaker labels, confidence values and termination fields. All 16 corresponding speech WAVs are byte-identical.
  • Long→short reuse, shorter CTC requests after longer ones, and Ming3 seeds 42→43→42 passed. Offload S2S repeatedly released/recreated its stage workspaces successfully.
  • All 12 paired blocks report identical graph-buffer and metadata reservations. Timestamp/diarization requests returned aligned words with no failed CTC streams.
  • The focused offload timing check also produced identical corresponding outputs.

Existing behavior: resident Nemotron can change one word's capitalization and a speaker-confidence value on repeated input after an intervening diarization request. This occurs on both baseline and refactor; corresponding A/B outputs remain identical.

Execution validation covers CUDA only. The Debug build and git diff --check passed.

@0xShug0
0xShug0 merged commit 33ca47f into main Nov 12, 2026
7 checks passed
@0xShug0
0xShug0 deleted the refactor/prepared-graph-build-context branch November 12, 2026 21:18
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