Repository navigation
[Migrate]Move model-specific helpers out of serving_speech - #6697
hsliuustc0106 merged 11 commits into
Conversation
Signed-off-by: boatman <109857087+sphinxkkkbc@users.noreply.github.com>
Signed-off-by: boatman <109857087+sphinxkkkbc@users.noreply.github.com>
…:sphinxkkkbc/vllm-omni into refactor/serving_speech_helper_migration
Signed-off-by: boatman <109857087+sphinxkkkbc@users.noreply.github.com>
Signed-off-by: boatman <109857087+sphinxkkkbc@users.noreply.github.com>
…:sphinxkkkbc/vllm-omni into refactor/serving_speech_helper_migration Signed-off-by: boatman <109857087+sphinxkkkbc@users.noreply.github.com>
eb4f8e5 to
477ec34
Compare
|
This PR touches vllm_omni/entrypoints/, tests/entrypoints/, tests/model_executor/, tools/pre_commit/, vllm_omni/model_executor/ (23 files). Based on CODEOWNERS coverage of the changed files, the most-related reviewers appear to be: Could one of you take a look when you get a chance? Thanks! |
76c3257 to
30c0b8a
Compare
Signed-off-by: boatman <109857087+sphinxkkkbc@users.noreply.github.com>
30c0b8a to
a56e49f
Compare
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
This PR appears to belong to: docs/design/module/entrypoints.md. Module owners: @alex-jw-brooks @linyueqian @NickCao @sphinxkkkbc, please review your own changes and leave a short self-review comment describing what you checked. PRs without author self-review may not be assigned a reviewer. Please take a look when you have a chance. If you would like an automated review, mention @vllm-omni-review-bot in a comment. |
|
@vllm-omni-review-bot please review |
…r/serving_speech_helper_migration Signed-off-by: boatman <109857087+sphinxkkkbc@users.noreply.github.com> # Conflicts: # tests/entrypoints/openai_api/test_serving_speech.py # tests/entrypoints/openai_api/test_tts_adapter.py # vllm_omni/entrypoints/openai/tts_adapters/base.py # vllm_omni/entrypoints/openai/tts_adapters/qwen3_tts.py
bda6072 to
195ae73
Compare
|
@vllm-omni-review-bot can you help review? |
|
@linyueqian PTAL, the legacy pass still causes event-loop blocking(e.g. |
Omni ReviewBot triage noteAutomated triage of commit
These are automated triage suggestions only — the final decision belongs to the maintainers. |
…r/serving_speech_helper_migration
|
Resolved conflicts, @linyueqian PTAL, Thanks! |
1dc4055 to
cdd3e6a
Compare
|
resolve conflcits |
…r/serving_speech_helper_migration
Signed-off-by: boatman <109857087+sphinxkkkbc@users.noreply.github.com>
b6d689b to
ba1e0ae
Compare
…ect#6697) Signed-off-by: boatman <109857087+sphinxkkkbc@users.noreply.github.com> Signed-off-by: ZhengWG <zwg0606@gmail.com>
…ect#6697) Signed-off-by: boatman <109857087+sphinxkkkbc@users.noreply.github.com>
…ect#6697) Signed-off-by: boatman <109857087+sphinxkkkbc@users.noreply.github.com> Signed-off-by: wenjie.yan <wenjyan@outlook.com>
main finished moving per-model helpers out of serving_speech.py (vllm-project#6697, RFC vllm-project#4327), and non-streaming delta accumulation is now driven by OutputPolicy.accumulate_nonstreaming rather than a hardcoded model-type check. The rebase takes main's serving_speech.py unchanged, so: - Vevo2Adapter.validate()/build() now own what _validate_vevo2_request / _build_vevo2_params did on the server. - build() returns OutputPolicy(accumulate_nonstreaming=True), replacing the ("moss_tts_nano", "vevo2") entry in the old hardcoded check. Without it the non-streaming response keeps only the final, empty sentinel chunk. - _resolve_ref_audio now returns (wav, sr, cache_key); unpack all three. The new adapter tests mock the server with spec=OmniOpenAIServingSpeech, so a call into a server helper that no longer exists fails in the test. Signed-off-by: Yash Jain <yashjainjain1704@gmail.com>
…ect#6697) Signed-off-by: boatman <109857087+sphinxkkkbc@users.noreply.github.com>
PLEASE FILL IN THE PR DESCRIPTION HERE.
Purpose
Move the scattered model-specific helpers out of serving_speech.py, as the validation/build/sampling_params lifecycle has been stabilized, and newly supported models already implement such helpers within their adapters instead of in the main serving file.
This work does not overlap with the M-series changes in #4855. The PR only relocates helpers that have a single model consumer. Potentially shared state, such as
self._tts_tokenizer, remains unchanged. This is intended to be a structural refactor only, with no changes to serving behavior or model capabilities. The affected helpers are listed below.The related tests have been updated to follow the new ownership boundaries. One potentially non-obvious case is
build_tts_params: although it previously appeared to be a shared serving helper, its only consumer in online serving is Qwen3-TTS. It has therefore been moved intoQwen3TTSAdapter.Corresponding tests in
TestTTSMethodsnow call:server._adapter._build_tts_params(...)instead of:server._build_tts_params(...). This makes the tests reflect the actual model-specific ownership of the helper without changing the behavior under test.One non-helper change involves
Qwen3TTSAdapter.apply_sampling_overrides, which does not introduce behavioral regression. This PR only reorders the call sequence, and the final result remains identical to that on the main branch. This change was omitted in #5272.Status
Self checked all affected helpers, not found regression behavior.
Migration Mapping Table
_conditioning_cache_salttts_adapters.base.conditioning_cache_salt_estimate_ref_code_lenQwen3TTSAdapter._estimate_ref_code_len_estimate_prompt_lenQwen3TTSAdapter._estimate_prompt_len_build_tts_paramsQwen3TTSAdapter._build_tts_params_build_qwen3_tts_requestQwen3TTSAdapter.build_estimate_fish_ref_code_lenFishSpeechAdapter._estimate_ref_code_len_estimate_fish_prompt_lenFishSpeechAdapter._estimate_prompt_len_build_fish_speech_promptFishSpeechAdapter._build_prompt_voxcpm2_encodeVoxCPM2Adapter._encode_build_voxcpm2_promptVoxCPM2Adapter._build_prompt_detect_moss_variant_MossTTSAdapterBase._detect_moss_variant_get_moss_processor_MossTTSAdapterBase._get_moss_processor_build_moss_tts_params_MossTTSAdapterBase._build_moss_tts_params_build_higgs_audio_v2_paramsHiggsAudioV2Adapter._build_higgs_audio_v2_params_resolve_higgs_audio_v2_processorHiggsAudioV2Adapter._resolve_higgs_audio_v2_processor_build_higgs_audio_v3_paramsHiggsAudioV3Adapter._build_higgs_audio_v3_params_resolve_higgs_audio_v3_ref_codesHiggsAudioV3Adapter._resolve_higgs_audio_v3_ref_codes_get_higgs_audio_v3_ref_codesHiggsAudioV3Adapter._get_higgs_audio_v3_ref_codes_put_higgs_audio_v3_ref_codesHiggsAudioV3Adapter._put_higgs_audio_v3_ref_codes_resolve_higgs_audio_v3_adapterHiggsAudioV3Adapter._resolve_higgs_audio_v3_adapter_coerce_ming_prompt_waveformMingTTSAdapter._coerce_ming_prompt_waveform_build_ming_reference_waveformsMingTTSAdapter._build_ming_reference_waveforms_parse_ming_instructionMingTTSAdapter._parse_ming_instruction_build_ming_dense_promptMingTTSAdapter._build_ming_dense_prompt_parse_ming_instruction_fieldstts_adapters.ming_tts.parse_ming_instruction_fields_build_ming_flash_omni_promptMingFlashOmniTTSAdapter.build_build_voxtral_promptVoxtralTTSAdapter._build_prompt_build_step_audio2_promptStepAudio2Adapter.build_build_cosyvoice3_promptCosyVoice3Adapter._build_prompt_build_covo_audio_promptCovoAudioAdapter.build_get_audex_tokenizerAudexAdapter._get_tokenizerandAudexTTAAdapter._get_tokenizer_build_glm_tts_promptGlmTTSAdapter._build_prompt_glm_tts_text_tokenizer_and_frontendGlmTTSAdapter._text_tokenizer_and_frontend_estimate_glm_tts_text_token_lenGlmTTSAdapter._estimate_text_token_len_build_glm_tts_prefill_metadataGlmTTSAdapter._build_prefill_metadataFollow up
test_serving_speech.pyshould be reorganized becauseTestTTSMethodscurrently mixes tests for shared serving behavior with tests for model-specific helpers and validation. Several other test classes have the same issue. As a follow-up, these tests should be separated into shared serving tests and per-model adapter tests, potentially under a dedicatedtts_adapters/test directory ortest_tts_adapterfor validate/build/sampling/capabilities check, rather than continuing to add model-specific coverage totest_serving_speech.pyTest Plan
vLLM Version:
0.28.0
vLLM-Omni Commit:
76c3257
Test Result
No failed test.
tests/entrypoints/openai_api/test_audex_serving_guards.pytests/entrypoints/openai_api/test_serving_speech.pytests/entrypoints/openai_api/test_tts_adapter.pytests/model_executor/models/higgs_audio_v3/test_higgs_audio_v3.pytests/model_executor/models/ming_tts/test_ming_shared_modules.pyBEFORE SUBMITTING: read CONTRIBUTING.md and run the precheck-pr skill with the code agent for a self-check against project conventions.
(anything written below this line will be removed by GitHub Actions)