Skip to content

Add VibeVoice streaming ASR export - #723

Merged
justinchuby merged 10 commits into
mainfrom
justinchuby-add-vibevoice-streaming-asr
Sep 16, 2026
Merged

justinchuby merged 10 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 8c1bf5445fe0d9e7

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 8c1bf5445fe0d9e7

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
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

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.

🔵 Needs a closer look

It introduces a new multi-stage, stateful streaming ASR export surface (new config/model/task/CI contract) that warrants final human review despite strong test coverage.

Review details
  • Files reviewed: 22/22 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@rui-ren

rui-ren commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

1 similar comment
@rui-ren

rui-ren commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Copilot AI commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Merged origin/main into the branch in 322427e.

main landed the VibeVoice Realtime (streaming TTS) route, which touched the same VibeVoice files. I resolved every conflict by keeping both routes side by side:

  • _configs/vibevoice.py: VibeVoiceStreamingConfig and VibeVoiceASRConfig both retained.
  • _registry.py, models/__init__.py, tasks/__init__.py: both registrations/exports kept.
  • tasks/_vibevoice.py: kept the prefix-capable _streaming_convolution helpers used by its call sites (Realtime continues to use _cache_utils).
  • integrations/transformers/_builder.py: kept main's graph_source_name graph naming and pinned-revision block for Realtime, plus the ASR revision map; the source-revision metadata set now includes vibevoice, vibevoice_streaming, and VibeVoiceForASRStreamingTraining.
  • Tests: both VibeVoice tiny configs, both component-role expectations, both builder revision-pin tests, and both weight-alignment filtering entries.

Non-integration suite after the merge: 11165 passed, 355 skipped; the only 2 failures are pre-existing HF Hub network errors in this sandbox.

@CLAassistant

CLAassistant commented Sep 15, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Copilot AI commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Already done — no conflicts remain. The merge commit 322427e is the current head of this branch on the remote, and it contains origin/main (67fe11e) in full; re-running git merge origin/main reports "Already up to date." and there are no conflict markers anywhere in the tree.

Details of that merge are in my previous comment: main's VibeVoice Realtime (streaming TTS) route and this PR's streaming-ASR route were kept side by side across _configs/vibevoice.py, _registry.py, models/__init__.py, tasks/__init__.py, tasks/_vibevoice.py, integrations/transformers/_builder.py (+ test), tests/_test_configs.py, tests/build_graph/speech_test.py, and tests/weight_alignment_test.py.

If GitHub is still showing this PR as conflicted, try refreshing the page — the mergeability status can lag behind a push.

justinchuby and others added 5 commits September 16, 2026 15:57
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>
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>
justinchuby and others added 4 commits September 16, 2026 16:02
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>
Restore decoder cache imports and declare streaming convolution cache output types and shapes after resolving the native and streaming ASR integration.

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 322427e to ae7c6a0 Compare September 16, 2026 23:12
The streaming ASR export remains covered by the standard graph, configuration, weight-routing, and runtime-contract tests without a dedicated external-source dependency environment.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
@justinchuby
justinchuby merged commit 99d3155 into main Sep 16, 2026
22 of 25 checks passed
@justinchuby
justinchuby deleted the justinchuby-add-vibevoice-streaming-asr branch September 16, 2026 23:21
titaiwangms added a commit that referenced this pull request Sep 17, 2026
## Summary

- integrate both supported VibeVoice streaming ASR checkpoints into the
shared fail-closed source resolver
- pin config, processor, and weight sources to each checkpoint's
verified revision
- preserve module-specific weight preprocessing: only TTS layouts
receive the `checkpoint_layout` argument
- retain fail-closed rejection for unsupported BitNet and standalone
acoustic-tokenizer checkpoints

## Root cause

#723 was tested before #726 landed, although both changed VibeVoice
source resolution. The combined `main` state classified the newly
supported streaming ASR IDs as unsupported before their
architecture-specific exporter could load the pinned config.

The fix does not bypass or weaken #726's resolver. It makes streaming
ASR an explicit supported provenance route and removes the now-redundant
exact-ID pinning branch from the Transformers builder.

## Validation

- `python -m pytest
src/mobius/integrations/transformers/_builder_test.py
src/mobius/models/vibevoice_test.py -q --tb=short` (`60 passed, 1
skipped`)
- builder-level `load_weights=True` regression coverage verifies pinned
config/weight revisions, the native ASR preprocessing signature, and
emitted source metadata for both variants
- targeted lintrunner checks: clean
- revised lightweight correctness and risk reviews: PASS

---------

Signed-off-by: titaiwang <titaiwang@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@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.

5 participants