Skip to content

Refactor Ming3 Audio with shared MoE execution - #1238

Merged
0xShug0 merged 1 commit into
mainfrom
refactor/ming3-audio
Nov 8, 2026
Merged

0xShug0 merged 1 commit into
mainfrom
refactor/ming3-audio

Conversation

@0xShug0

@0xShug0 0xShug0 commented Nov 8, 2026

Copy link
Copy Markdown
Owner

Ming3 Audio now uses the shared MoeModule for expert computation and StagedMoeRuntime for offloaded prefill, preserving its explicit BF16 rounding boundaries. This removes duplicated expert staging and execution code.

Full-chunk and tail graphs are registered together before allocating their shared workspace. This fixes long offloaded prefill exceeding the scratch reservation when a shorter tail needs more workspace. Graph replanning retains allocation capacity after releasing the previous graph resources.

Workspace allocation is explicitly owned by the caller: StagedMoeRuntime::prepare() prepares execution plans only. Drama3 and Nemotron Transcribe move their existing workspace preparation call to the caller. No backend kernels, model specs or precision defaults change. Separate Ming3 prefill/decode timing keys are also added.

Validation used an RTX 5090, eight threads, the published Q4_K package and Debug builds. Requests and measurements ran sequentially with matched inputs.

Backend / mode Main RTF PR RTF Main / PR peak VRAM (MiB)
CUDA resident 0.01560 0.01542 7,583 / 7,583
CUDA offload 0.04532 0.04524 4,213 / 4,213
Vulkan offload 0.12991 0.12804 3,538 / 3,535

CUDA offload used 64 measured requests per variant; the paired 95% interval for execution-time change was −0.52% to +0.15%, consistent with unchanged performance.

Validation also covers:

  • Exact ASR text on CUDA/Vulkan resident and offloaded paths.
  • Offloaded S2S with seeds 42, 43 and 42: identical text and WAVs against main, repeatable output, and equal peak VRAM of 4,609 MiB.
  • A 153-second audio request interleaved with shorter requests on CUDA and Vulkan, exercising full/tail graph planning and workspace reuse.
  • Independent host-reference MoE unit tests on CPU, CUDA and Vulkan, including multiple graph owners sharing a workspace and reset/reuse across shapes, with the existing 1e-4 tolerance.

@0xShug0
0xShug0 merged commit 768ded0 into main Nov 8, 2026
7 checks passed
@0xShug0
0xShug0 deleted the refactor/ming3-audio branch November 8, 2026 18:05
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