Skip to content

Add native VibeVoice ASR support - #730

Open
justinchuby wants to merge 13 commits into
mainfrom
justinchuby-vibevoice-offline-asr
Open

justinchuby wants to merge 13 commits into
mainfrom
justinchuby-vibevoice-offline-asr

Conversation

@justinchuby

@justinchuby justinchuby commented Sep 4, 2026

Copy link
Copy Markdown
Member

Adds staged offline ASR support exclusively for microsoft/VibeVoice-ASR-HF@f22241c2062b3b25272bf117397e03d73381037a (vibevoice_asr / VibeVoiceAsrForConditionalGeneration). The legacy microsoft/VibeVoice-ASR training checkpoint is explicitly rejected before download; it is not aliased.\n\nThe five-stage package routes all 901 native checkpoint tensors with no ignored weights. Processor/tokenizer assets and runtime metadata use the native HF repository. L4/L5 real-weight transcription remains unverified due to GPU capacity.

@justinchuby
justinchuby requested review from a team and a lite review from Copilot September 4, 2026 18:23
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Performance Comparison

Comparing 49c6c01e46cdd482

Model Metric Baseline Current Delta
bert (feature-extraction) model_size_bytes 359 KB 359 KB +0.0%
bert (feature-extraction) num_nodes 68 68 +0.0%
falcon model_size_bytes 364 KB 364 KB +0.0%
falcon num_nodes 66 66 +0.0%
gemma2 model_size_bytes 428 KB 428 KB +0.0%
gemma2 num_nodes 105 105 +0.0%
gpt2 model_size_bytes 324 KB 324 KB +0.0%
gpt2 num_nodes 54 54 +0.0%
llama model_size_bytes 425 KB 425 KB +0.0%
llama num_nodes 60 60 +0.0%
llama (static-cache) model_size_bytes 425 KB 425 KB +0.0%
llama (static-cache) num_nodes 56 56 +0.0%
mamba (ssm-text-generation) model_size_bytes 296 KB 296 KB +0.0%
mamba (ssm-text-generation) num_nodes 94 94 +0.0%
phi3 model_size_bytes 421 KB 421 KB +0.0%
phi3 num_nodes 58 58 +0.0%
phi3 (static-cache) model_size_bytes 421 KB 421 KB +0.0%
phi3 (static-cache) num_nodes 54 54 +0.0%
qwen2 model_size_bytes 425 KB 425 KB +0.0%
qwen2 num_nodes 60 60 +0.0%
qwen2 (static-cache) model_size_bytes 425 KB 425 KB +0.0%
qwen2 (static-cache) num_nodes 56 56 +0.0%
qwen3_5_moe (hybrid-text-generation) model_size_bytes 506 KB 506 KB +0.0%
qwen3_5_moe (hybrid-text-generation) num_nodes 265 265 +0.0%
qwen3_5_text (hybrid-text-generation) model_size_bytes 458 KB 458 KB +0.0%
qwen3_5_text (hybrid-text-generation) num_nodes 127 127 +0.0%
qwen3_5_vl (hybrid-qwen-vl) model_size_bytes 977 KB 977 KB +0.0%
qwen3_5_vl (hybrid-qwen-vl) num_nodes 450 450 +0.0%
t5 (seq2seq) model_size_bytes 836 KB 836 KB +0.0%
t5 (seq2seq) num_nodes 176 176 +0.0%
whisper (speech-to-text) model_size_bytes 1008 KB 1008 KB +0.0%
whisper (speech-to-text) num_nodes 128 128 +0.0%

No performance regressions.

Comment thread docs/vibevoice-asr.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new arch-validation test uses a huggingface_hub.hf_hub_download(local_dir=...) call that can break the same older Hub environments the PR explicitly targets for compatibility.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds first-class support for exporting and validating the original offline VibeVoice-ASR checkpoint as a staged ONNX package (dual cached waveform encoders → connectors → embedding replacement → cached Qwen2 decoder), plus host-side orchestration and ONNX Runtime GenAI advisory artifacts. This extends Mobius’ speech model coverage while keeping ASR routing fail-closed and distinct from VibeVoice TTS / streaming ASR.

Changes:

  • Introduces VibeVoiceASRForConditionalGeneration, VibeVoiceASRConfig, and VibeVoiceASRTask to export the five-stage offline ASR pipeline.
  • Adds host contracts (VibeVoiceASRProcessor, VibeVoiceASRHost) and ORT GenAI export outputs (preprocessor_config.json + advisory compatibility metadata).
  • Updates Transformers builder/config loading to pin the ASR revision by default and to dispatch VibeVoice architectures explicitly (fail-closed), with expanded synthetic + arch-validation tests and documentation.
File summaries
File Description
tests/weight_alignment_test.py Adds checkpoint-index census + routing coverage for the pinned VibeVoice-ASR tensor set.
tests/model_coverage_test.py Documents why L4/L5 real-weight coverage is not claimed for the large BF16 checkpoint.
tests/build_graph/speech_test.py Registers expected component topology for vibevoice-asr graph builds.
tests/arch_validation_test.py Makes HF config loading tolerant of older Hub installs and adds coverage for that path.
tests/_test_configs.py Adds a tiny VibeVoiceForASRTraining config for fast graph-level validation.
src/mobius/tasks/_vibevoice_asr.py New task exporting the five offline ASR ONNX components and cache ABI.
src/mobius/tasks/init.py Exposes and registers the new vibevoice-asr task.
src/mobius/models/vibevoice.py Extends tokenizer encoder conv stack to support a final-chunk flag for source-equivalent padding.
src/mobius/models/vibevoice_asr.py New staged offline ASR model + weight routing for both original and converted namespaces.
src/mobius/models/vibevoice_asr_test.py Synthetic parity tests vs pinned Transformers VibeVoice-ASR implementation.
src/mobius/models/init.py Exports VibeVoiceASRForConditionalGeneration from the models package.
src/mobius/integrations/vibevoice_asr.py New host-side orchestration: normalization, chunk/cache handling, prompting, diarization parsing.
src/mobius/integrations/vibevoice_asr_test.py Unit tests for processor/host behavior and deterministic orchestration contracts.
src/mobius/integrations/transformers/_config_resolver.py Makes strict Hub error handling tolerant of older huggingface_hub layouts.
src/mobius/integrations/transformers/_config_resolver_test.py Adds test coverage for Hub installs missing the errors module.
src/mobius/integrations/transformers/_builder.py Pins microsoft/VibeVoice-ASR revision by default and enforces explicit VibeVoice architecture dispatch.
src/mobius/integrations/transformers/_builder_test.py Adds fail-closed dispatch tests and validates pinned ASR raw-config build path.
src/mobius/integrations/onnx_genai/auto_export.py Detects VibeVoice-ASR packages and writes processor + advisory runtime contracts.
src/mobius/integrations/onnx_genai/auto_export_test.py Verifies ORT GenAI export emits processor contract + advisory compatibility for ASR.
src/mobius/_registry.py Registers VibeVoiceForASRTraining as a distinct fallback architecture key and pins its test model id/revision.
src/mobius/_configs/vibevoice_asr.py New config extraction for offline ASR (dual tokenizers + Qwen2 decoder) with validation.
src/mobius/_configs/init.py Exposes VibeVoiceASRConfig from the configs package.
docs/vibevoice-asr.md New documentation for staged offline ASR package boundaries, host contract, and evidence levels.
docs/model-catalog.md Adds catalog entry linking VibeVoiceForASRTraining to the offline ASR docs.
Review details
  • Files reviewed: 24/24 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tests/weight_alignment_test.py
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

🏗️ Architecture Diff

Comparing 49c6c01e46cdd482

Model Sub-model Changes Status
bert (feature-extraction) model 0
falcon model 0
gemma2 model 0
gemma4 (gemma4) decoder 0
gemma4 (gemma4) embedding 0
gemma4 (gemma4) vision_encoder 0
gemma4_text model 0
gpt2 model 0
llama model 0
llama (static-cache) model 0
mamba (ssm-text-generation) model 0
phi3 model 0
phi3 (static-cache) model 0
qwen model 0
qwen (static-cache) model 0
qwen2 model 0
qwen2 (static-cache) model 0
qwen2_moe model 0
qwen2_moe (static-cache) model 0
qwen3 model 0
qwen3 (static-cache) model 0
qwen3_5_moe (hybrid-text-generation) model 0
qwen3_5_text (hybrid-text-generation) model 0
qwen3_5_vl (hybrid-qwen-vl) decoder 0
qwen3_5_vl (hybrid-qwen-vl) embedding 0
qwen3_5_vl (hybrid-qwen-vl) vision_encoder 0
qwen3_moe model 0
qwen3_moe (static-cache) model 0
qwen3_next (hybrid-text-generation) model 0
t5 (seq2seq) decoder 0
t5 (seq2seq) encoder 0
whisper (speech-to-text) decoder 0
whisper (speech-to-text) encoder 0

No architecture changes detected.


Legend: ⚪ No change · 🔵 Minor (attrs/inits) · 🟡 Moderate (nodes added/removed) · 🔴 Major (interface changed)

justinchuby and others added 11 commits September 14, 2026 12:21
Add fail-closed routing, staged ASR graphs, host processor contract, and source-backed coverage for microsoft/VibeVoice-ASR.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Preserve final speech frames, require an unambiguous architecture, and build the source-compatible prompt and token layout.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Preserve source prompt branches and clipping behavior while restoring the VibeVoice TTS fixture in weight alignment coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Match source clipping epsilon behavior and retain already aligned ASR parameters for direct package loading.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Carry final-chunk state into each encoder convolution and use JSON-aware diarization extraction for source-style assistant responses.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Treat the strict dataclass validation exception as optional so all Transformers builds remain compatible with supported Hub releases.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Keep both normal and raw Transformers config loading compatible with older supported huggingface_hub releases.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Emit the source tokenizer’s object-reference speech tokens and keep architecture validation compatible with older Hub releases.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Render source-owned Qwen turns directly so compatible base tokenizers cannot inject an extra system prompt.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Preserve terminal-frame semantics for variable-length batches and pin default ASR builds to the validated checkpoint revision.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Rebase the offline ASR support onto the merged realtime VibeVoice work, preserve both routes, publish the ASR contract through generated model documentation, and use the supported Hugging Face cache API in the checkpoint-index test.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: a361a630-548c-41b4-9e11-43ed5a681542
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
@justinchuby
justinchuby force-pushed the justinchuby-vibevoice-offline-asr branch from f166a78 to c5c496f Compare September 14, 2026 19:26
Replace legacy training-checkpoint support with the official inference-native VibeVoice-ASR-HF release. Route all 901 native tensors without exclusions and reject the legacy repository before any Hub access.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: a361a630-548c-41b4-9e11-43ed5a681542
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
@justinchuby justinchuby changed the title Add offline VibeVoice ASR support Add native VibeVoice ASR support Sep 14, 2026
Require the native VibeVoice ASR architecture declaration before selecting the staged ASR graph.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: a361a630-548c-41b4-9e11-43ed5a681542
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
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.

Support vibevoice_asr (audio diffusion pipeline)

2 participants