feat(structures): decoder_llm + audio_codec whole-module structures with one-call doors (OmniVoice, 4.24x) - #176
Open
shideqin wants to merge 2 commits into
Open
Conversation
…ith one-call doors (OmniVoice, 4.24x)
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.
What this adds
OmniVoice (Qwen3-1.5B backbone + 8-codebook MaskGIT head) adopted into
the structures layer as two whole-module structures, in the PR-175
tiering (hub artifact first, local native build second, host floor):
decoder_llm(catalog/decoder_llm/,impls/decoder_llm/nvfp4.py):the whole decoder stack as one seam — the native NVFP4 engines
(fp4 GEMMs + fused qk-norm+RoPE + FA2 + fused residual/norm/quant)
with per-batch dispatch (CFG batch B=2 rides the BF16 engine, single
stream B=1 rides the FP4 CUDA graph), profile-envelope refusal outside
the native engine's v1 contract (D=1024/L=28/NH=16/NKV=8/HD=128/
FFN=3072).
audio_codec(catalog/audio_codec/,impls/audio_codec/fp16.py):the neural codec decode (codes -> waveform). Measured levers:
torch.compile 1.00x, CUDA graph 1.02x, fp16 autocast 1.22x with
waveform cosine 1.00000 — the fp16 form is adopted; the host family
(HiggsAudioV2TokenizerModel) is shared with Higgs-Audio-v3, so the
structure recurs beyond one model.
AutoPlan.attach()— the plan now carries its root host, so
plan.attach()commits theswaps atomically (the paper's
handle = plan.attach()); andstructures.maskgit_loop(model)— the MaskGIT two-phase schedule door(
loop.generate(task, gen_config)), thedecode_looptwin fornon-text generation hosts.
impls/decoder_ffn/nvfp4_static.py,impls/linear_proj/nvfp4_static.py): large-M NVFP4 FFN / projectiontiers served by the local fp4 GEMM.
nvfp4_staticscheme (weight-only,no calibration data), decoder-stack and audio-codec discovery rules
(slot-based — layers/embed_tokens/norm/rotary_emb and
decode/quantizer/acoustic_decoder/decoder_semantic — never model
names), autobuild bind dispatch, and the
omnivoice_llm/omnivoice_audio_codecbinding receipts.Measured (RTX 5060 Ti, torch 2.13+cu130, omnivoice 0.2.1, design mode,
32 MaskGIT steps, gs=2.0, seed=42, median of 3)
The native inject path measures 0.0284 median on the same box — the
structures route matches it within noise (and is slightly ahead once the
codec is included). Per-seam-only adoption (fp4 FFN, fp4 FFN+projections)
measured ~1.0x; the win lives in the whole-LLM boundary and the schedule,
not the individual kernels (the "fast kernels are not fast pipelines"
result, inside the layer itself).
Usage (the article's one-call shape)
Validation
tests/test_structures_decoder_llm.py): catalogentries, binding loads, scheme routing (decoder_llm / decoder_ffn /
linear_proj / audio_codec),
AutoPlan.attach()andmaskgit_loopdoor exports, native-refusal without a local build, slot-based
discovery — all pass without kernels (10 passed / 3 skipped here;
the 3 skips are the local-build-present cases).
generation real and non-silent; zero seam fallbacks in the benchmark
runs (ledger-verified); fp16 codec waveform cosine 1.00000 vs the
fp32 host.
tests/test_structures_bindings.py,test_structures_precision_entry.py,test_structures_decode_loop.py,test_structures_discovery_contracts.pystay green (59 + 23 passed).
Notes
flash_rt_kernels+flash_rt_omnivoice+flash_rt_fa2,-DFLASHRT_ENABLE_OMNIVOICE=ON -DGPU_ARCH=120); publishing thefp4/omnivoice kernels as hub packages with a torch-2.13 variant is the
delivery-side follow-up (the hub-first tier then picks them up and no
local build is needed).
in both the host and this path (host characteristic); keep
guidance_scale > 0and use real sentences.reset
model.llm._frt_guard.thread = None(and the codec guard) perrequest.