Repository navigation
Refactor Drama3 and Nemotron Transcribe with shared MoE execution - #1234
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
Share the duplicated MoE graph construction and staged expert execution used by Drama3 and Nemotron Transcribe.
MoeModulebuilds routing, expert projections and weighted reductions with explicit mathematical policies. Resident execution uses it directly.StagedMoeRuntimereuses cached expert graphs and the existing expert-weight store for offload, preserving logical expert assignments and reduction order.GraphWorkspaceshares activation scratch across serial backbone and expert phases.FeedForwardModulefor Nemotron's shared ReLU-squared experts.Existing options, defaults and native quantization are retained, including Drama3's offload routing-materialization boundary.
CUDA performance
RTX 5090, Debug build, eight CPU threads. Q4_K_S expert packages, with Q8_0 tower projections for Drama3 and an F16 encoder for Nemotron Transcribe. Compared with main at
d2b2076e, using identical inputs and settings in sequential matched sessions, including counterbalanced A–B–B–A and B–A–A–B comparisons. RTF excludes the short unrelated warmup; peak VRAM includes loading and request execution. Offload uses pinned experts and eight GPU slots; Nemotron offload uses prefill batch size 1024. The Nemotron offload row measures plain ASR; the full-GPU peak also covers timestamp/diarization requests.cuda_perfcuda_perfSmall timing differences are within observed run variation.
Current tip: CUDA offload
Warmed measurements after removing redundant staged-execution work. Drama3 RTF is the mean of two warmed requests; Nemotron measures the long plain-ASR request. These measurements were collected separately from the comparison above and should not be treated as a counterbalanced speedup comparison. Peak VRAM here covers the complete session, including Nemotron timestamp/diarization checks.
cuda_perfConstant physical slot IDs are uploaded once during setup. A controlled Drama3 prefill trace removes 1,248 host-to-device copies and stream synchronizations, with unchanged graph-launch count and identical output.
Validation
cuda_perf.1e-4. All 80 staged cases pass on each of CPU, CUDA and Vulkan, covering F32/Q4_K weights, fixed and variable row buckets, cache eviction and repeated execution. Existing dense-weight storage/projection tests are retained.