Skip to content

[Voxtral] Streaming example#33042

Merged
vllm-bot merged 24 commits intovllm-project:mainfrom
patrickvonplaten:voxstral_realtime_example
Jan 29, 2026
Merged

[Voxtral] Streaming example#33042
vllm-bot merged 24 commits intovllm-project:mainfrom
patrickvonplaten:voxstral_realtime_example

Conversation

@patrickvonplaten
Copy link
Copy Markdown
Collaborator

@patrickvonplaten patrickvonplaten commented Jan 25, 2026

This PR adds a test for the new streaming generator API: #28973 which works nicely!

@mergify
Copy link
Copy Markdown

mergify bot commented Jan 25, 2026

Documentation preview: https://vllm--33042.org.readthedocs.build/en/33042/

@mergify mergify bot added the documentation Improvements or additions to documentation label Jan 25, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new example for real-time audio streaming with Voxtral. While it's a good starting point, there are a few critical issues that need addressing. The example contains unreachable code with a debugging trace, uses a hardcoded file path making it non-portable, and employs a forceful process cleanup method that is not robust. I've provided specific comments and suggestions to resolve these issues.

Signed-off-by: Patrick von Platen <patrick.v.platen@gmail.com>
Signed-off-by: Patrick von Platen <patrick.v.platen@gmail.com>
@patrickvonplaten patrickvonplaten force-pushed the voxstral_realtime_example branch from 3649d17 to c0a1518 Compare January 25, 2026 21:56
@mergify
Copy link
Copy Markdown

mergify bot commented Jan 25, 2026

Hi @patrickvonplaten, the pre-commit checks have failed. Please run:

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy or markdownlint failing?
mypy and markdownlint are run differently in CI. If the failure is related to either of these checks, please use the following commands to run them locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10
# For markdownlint
pre-commit run --hook-stage manual markdownlint

Copy link
Copy Markdown
Member

@njhill njhill left a comment

Choose a reason for hiding this comment

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

Looks great!

Signed-off-by: Patrick von Platen <patrick.v.platen@gmail.com>
Signed-off-by: Patrick von Platen <patrick.v.platen@gmail.com>
@mergify mergify bot added the multi-modality Related to multi-modality (#4194) label Jan 26, 2026
Signed-off-by: Patrick von Platen <patrick.v.platen@gmail.com>
@mergify
Copy link
Copy Markdown

mergify bot commented Jan 26, 2026

Hi @patrickvonplaten, the pre-commit checks have failed. Please run:

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy or markdownlint failing?
mypy and markdownlint are run differently in CI. If the failure is related to either of these checks, please use the following commands to run them locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10
# For markdownlint
pre-commit run --hook-stage manual markdownlint

Signed-off-by: Patrick von Platen <patrick.v.platen@gmail.com>
@mergify
Copy link
Copy Markdown

mergify bot commented Jan 26, 2026

Hi @patrickvonplaten, the pre-commit checks have failed. Please run:

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy or markdownlint failing?
mypy and markdownlint are run differently in CI. If the failure is related to either of these checks, please use the following commands to run them locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10
# For markdownlint
pre-commit run --hook-stage manual markdownlint

"""
def __init__(self, tokenizer: MistralTokenizer) -> None:
# TODO(Patrick) - put these into the tokenizer config
self._look_ahead_in_ms = 2.5
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

audio input takes care of look ahead and look back

@mergify
Copy link
Copy Markdown

mergify bot commented Jan 26, 2026

Hi @patrickvonplaten, the pre-commit checks have failed. Please run:

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy or markdownlint failing?
mypy and markdownlint are run differently in CI. If the failure is related to either of these checks, please use the following commands to run them locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10
# For markdownlint
pre-commit run --hook-stage manual markdownlint

Signed-off-by: Patrick von Platen <patrick.v.platen@gmail.com>
Signed-off-by: Patrick von Platen <patrick.v.platen@gmail.com>
Signed-off-by: Patrick von Platen <patrick.v.platen@gmail.com>
Signed-off-by: Patrick von Platen <patrick.v.platen@gmail.com>
Signed-off-by: Patrick von Platen <patrick.v.platen@gmail.com>
@patrickvonplaten patrickvonplaten changed the title [WIP] [Voxtral] Streaming example [Voxtral] Streaming example Jan 26, 2026
model_name = "mistralai/Voxtral-Mini-3B-Realtime-2602"
tokenizer = MistralTokenizer.from_hf_hub(model_name)

@pytest.mark.skip(reason="Voxtral streaming is not yet public")
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

skip for now



@pytest.mark.asyncio
@pytest.mark.skip(reason="Voxtral streaming is not yet public")
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

skip for now - important to make sure async generator works as expected

# 'true' streaming and 'offline' streaming differ a bit because log-mels are
# differently noramalized
# TODO(Patrick) - check if we want to align or not
texts[0] = texts[0].replace("He has f", "F")
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

small diff because of log-mel

Signed-off-by: Patrick von Platen <patrick.v.platen@gmail.com>
Signed-off-by: Patrick von Platen <patrick.v.platen@gmail.com>
@mergify mergify bot added the ci/build label Jan 29, 2026
@mergify
Copy link
Copy Markdown

mergify bot commented Jan 29, 2026

Hi @patrickvonplaten, the pre-commit checks have failed. Please run:

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy or markdownlint failing?
mypy and markdownlint are run differently in CI. If the failure is related to either of these checks, please use the following commands to run them locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10
# For markdownlint
pre-commit run --hook-stage manual markdownlint

Signed-off-by: Patrick von Platen <patrick.v.platen@gmail.com>
Signed-off-by: Patrick von Platen <patrick.v.platen@gmail.com>
Signed-off-by: Patrick von Platen <patrick.v.platen@gmail.com>
@patrickvonplaten
Copy link
Copy Markdown
Collaborator Author

@njhill @ywang96 I think this PR should be good for merge. mistral-common is now finalized for streaming and a 1.9.0 is pushed to pypi. The tests added to this PR ensure that all the streaming functionality behaves as expeceted.

As soon as this PR is in, we can also rebase: #33042

@mergify
Copy link
Copy Markdown

mergify bot commented Jan 29, 2026

Hi @patrickvonplaten, the pre-commit checks have failed. Please run:

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy or markdownlint failing?
mypy and markdownlint are run differently in CI. If the failure is related to either of these checks, please use the following commands to run them locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10
# For markdownlint
pre-commit run --hook-stage manual markdownlint

Signed-off-by: Patrick von Platen <patrick.v.platen@gmail.com>
Copy link
Copy Markdown
Member

@mgoin mgoin left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me, will see if the update breaks any tests

@mgoin mgoin added the ready ONLY add when PR is ready to merge/full CI is needed label Jan 29, 2026
@vllm-bot vllm-bot merged commit 40c3503 into vllm-project:main Jan 29, 2026
94 of 96 checks passed
apd10 pushed a commit to apd10/vllm that referenced this pull request Jan 31, 2026
Signed-off-by: Patrick von Platen <patrick.v.platen@gmail.com>
Co-authored-by: Roger Wang <hey@rogerw.io>
PiratePai pushed a commit to PiratePai/epd_shm that referenced this pull request Feb 3, 2026
Signed-off-by: Patrick von Platen <patrick.v.platen@gmail.com>
Co-authored-by: Roger Wang <hey@rogerw.io>
Signed-off-by: PiratePai <416932041@qq.com>
Signed-off-by: Pai <416932041@qq.com>
ItzDEXX pushed a commit to ItzDEXX/vllm that referenced this pull request Feb 19, 2026
Signed-off-by: Patrick von Platen <patrick.v.platen@gmail.com>
Co-authored-by: Roger Wang <hey@rogerw.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/build documentation Improvements or additions to documentation multi-modality Related to multi-modality (#4194) ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants