Skip to content

Add VibeVoice streaming ASR export - #723

Open
justinchuby wants to merge 8 commits into
mainfrom
justinchuby-add-vibevoice-streaming-asr
Open

Add VibeVoice streaming ASR export#723
justinchuby wants to merge 8 commits into
mainfrom
justinchuby-add-vibevoice-streaming-asr

Conversation

@justinchuby

@justinchuby justinchuby commented Sep 3, 2026

Copy link
Copy Markdown
Member

Implementation

  • Adds architecture-discriminated VibeVoiceForASRStreamingTraining support for both official Microsoft streaming-ASR checkpoints, without changing the existing VibeVoice TTS route:
    • microsoft/VibeVoice-ASR-Streaming-1.5B@4262d23d8a539a6530cf64fbd0b1751ef9a30853
    • microsoft/VibeVoice-ASR-Streaming-7B@60d858b518b4e19d404af3737f848fc185b30177
  • Exports the executable ASR pipeline as three truthful stages: audio_encoder (acoustic and semantic causal tokenizers plus connectors), embedding (speech embedding replacement), and decoder (Qwen2 with explicit KV caches).
  • Models both causal convolution cache sets and final-chunk stride padding as ONNX inputs/outputs. Streaming control tokens (<speech_start>, <speech_end>, forced <|text_chunk_end|>), chunk loop/sampling, hotword prompt assembly, and speaker JSON parsing remain host-owned.
  • Declares the decoder attention mask arbitrary through the generic mobius.attention.requires_arbitrary_mask contract, preventing incorrect GQA fusion for left-padded ASR batches.
  • Routes all 901 executable checkpoint tensors exactly once for each variant and explicitly excludes the 276 acoustic_tokenizer.decoder.* training-VAE tensors that are not on the ASR inference path. The 1.5B tied embedding/head checkpoint preserves its explicit lm_head.weight.
  • Emits graph-derived advisory metadata and processor assets, but marks ORT GenAI runtime orchestration unsupported rather than publishing a nonfunctional runnable claim.

Provenance and runtime boundary

  • Executable reference: microsoft/VibeVoice@505653d3873b065a488aea551c6ee3dc51d3062f with transformers==4.51.3; ASR-critical blobs were checked unchanged through upstream 1541f590c7099820f10ea012f48d2399282df69f.
  • The dedicated source-parity job force-installs the exact Transformers 4.51 ABI (huggingface-hub==0.31.4, tokenizers==0.21.4) after the public Transformers 5 environment.
  • No local real-weight downloads were attempted, so this PR makes no L4/L5 real-transcription claim. onnxruntime-ep-mlx 0.29.5 / ORT 1.29 cannot execute the complete VibeVoice decoder due to CumSum cannot infer output shapes; this blocks local MLX real-runtime evidence.

Validation

  • L1 staged graph/cache/role and arbitrary-mask-fusion-exclusion tests.
  • Full pinned L2 builds and complete 1,177-tensor safetensors-index audits for both variants.
  • Exact-source synthetic two-chunk prefill/cached-decode parity plus both pinned processor contracts: 24 kHz framing, left-padding, English/Chinese hotwords, and speaker JSON normalization.
  • Full non-integration suite: 4730 passed, 56 skipped, 1 subtests passed.
  • lintrunner f --output oneline --all-files and diff checks.
  • Fresh independent exact-head GPT-5.6 Terra review: no high-confidence findings.

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

Performance Comparison

Comparing 8c38c06d918889

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.

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

🏗️ Architecture Diff

Comparing 8c38c06d918889

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
justinchuby force-pushed the justinchuby-add-vibevoice-streaming-asr branch 2 times, most recently from 87138b0 to e6c4950 Compare September 3, 2026 22:57
Base automatically changed from justinchuby-add-vibevoice-tts to main September 4, 2026 15:47
@justinchuby
justinchuby requested a review from a team September 4, 2026 15:47
justinchuby and others added 4 commits September 4, 2026 08:50
Implement an architecture-discriminated, staged ONNX export for the pinned VibeVoice ASR checkpoint, with explicit audio convolution and decoder cache contracts. Preserve the existing TTS path while recording unsupported ORT GenAI orchestration boundaries and validating source parity, processor behavior, and complete checkpoint routing.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Apply the repository import and expression formatting rules after restacking the streaming ASR export on the finalized VibeVoice TTS base.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Record the streaming ASR L4/L5 runner limitation and mark its deliberate checkpoint-name translation as incompatible with the generic identity fixture. The pinned source-index audit remains the exact weight-routing proof.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Install the pinned VibeVoice executable source and its compatible Transformers release in a dedicated L3 job. Verify the installed source commit through pip direct-url metadata so source parity cannot silently skip outside a checkout.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
@justinchuby
justinchuby force-pushed the justinchuby-add-vibevoice-streaming-asr branch from e6c4950 to bd6a812 Compare September 4, 2026 16:00
Copilot AI lite review requested due to automatic review settings September 4, 2026 16:00
@justinchuby
justinchuby force-pushed the justinchuby-add-vibevoice-streaming-asr branch from e6c4950 to bd6a812 Compare September 4, 2026 16:00

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

A few robustness/compatibility issues in the new exception handling import path and pinned-source verification logic should be fixed to avoid avoidable CI/runtime failures.

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

Pull request overview

Adds first-class support for exporting VibeVoice streaming ASR (microsoft/VibeVoice-ASR-Streaming-7B) as a three-stage ONNX pipeline (audio encoder + embedding + decoder), integrated into the existing Mobius model registry/build flow and onnx-genai export tooling.

Changes:

  • Introduces VibeVoiceASRConfig, VibeVoiceASRForConditionalGeneration, and VibeVoiceASRStreamingTask to export the staged streaming-ASR pipeline with explicit KV + convolution cache I/O.
  • Extends Transformers config/module resolution to discriminate VibeVoice TTS vs ASR by architectures, and updates model/test coverage registration for the new architecture key.
  • Adds targeted tests (including pinned source-parity CI workflow) and onnx-genai advisory export support for the ASR topology.
File summaries
File Description
tests/weight_alignment_test.py Adds ASR checkpoint-index routing audit and marks ASR architecture as filtering preprocess.
tests/model_coverage_test.py Documents why generic L4/L5 runner can’t drive this streaming ASR pipeline yet.
tests/build_graph/speech_test.py Declares expected staged outputs for vibevoice-asr-streaming.
tests/arch_validation_test.py Extends HF config loading/unwrapping to handle ASR’s nested decoder config.
tests/_test_configs.py Adds tiny pinned config entry for VibeVoiceForASRStreamingTraining.
src/mobius/tasks/_vibevoice.py Refactors convolution-cache helpers into shared utility module.
src/mobius/tasks/_vibevoice_asr.py New staged task defining ASR graph contracts and explicit cache I/O.
src/mobius/tasks/_streaming_convolution.py New helper module for causal convolution cache inputs/outputs.
src/mobius/tasks/init.py Registers vibevoice-asr-streaming task and exports it.
src/mobius/models/vibevoice.py Adds ASR provenance constants, final-chunk stride padding, and ASR model modules + weight routing.
src/mobius/models/vibevoice_asr_test.py New comprehensive contract/routing and pinned source-parity tests.
src/mobius/models/init.py Exports VibeVoiceASRForConditionalGeneration.
src/mobius/integrations/transformers/_builder.py Adds architecture-discriminated VibeVoice dispatch and pins ASR revision.
src/mobius/integrations/onnx_genai/auto_export.py Detects ASR 3-stage topology and emits advisory metadata + assets.
src/mobius/integrations/onnx_genai/auto_export_test.py Adds coverage for ASR advisory export path and revision forwarding.
src/mobius/_registry.py Registers VibeVoiceForASRStreamingTraining with pinned model+revision.
src/mobius/_configs/vibevoice.py Expands config extraction to include ASR tokenizer constraints + VibeVoiceASRConfig.
src/mobius/_configs/init.py Exports VibeVoiceASRConfig.
requirements/ci/vibevoice-asr.txt Pins the exact upstream VibeVoice ASR source for synthetic parity tests.
docs/model-catalog.md Lists the new ASR architecture in the catalog.
.github/workflows/main.yml Adds dedicated CI job to run ASR pinned source-parity integration tests.
Review details
  • Files reviewed: 21/21 changed files
  • Comments generated: 3
  • 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 src/mobius/integrations/transformers/_builder.py
Comment thread src/mobius/models/vibevoice_asr_test.py Outdated
Comment thread tests/arch_validation_test.py
Generalize the pinned ASR checkpoint set, validate both official variants, and preserve explicit tied LM-head tensors during checkpoint routing.

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

Copilot-Session: d4ef52c4-0459-4efa-bc06-d0ebca2275f2
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Force-install the Transformers 4.51 reference dependency versions that the source-parity job requires, preventing the public Transformers 5 environment from supplying incompatible Hugging Face Hub and tokenizers releases.

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

Copilot-Session: d4ef52c4-0459-4efa-bc06-d0ebca2275f2
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Make config fallback compatible with older Hub releases and validate the pinned reference environment before importing its modules.

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

Copilot-Session: d4ef52c4-0459-4efa-bc06-d0ebca2275f2
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Use the composite ASR configuration dtype for the tokenizer and connector stages instead of the nested Qwen checkpoint storage dtype.

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

Copilot-Session: d4ef52c4-0459-4efa-bc06-d0ebca2275f2
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.

2 participants