[Model] Add YuE2-3B text-to-music (model + /v1/audio/speech adapter) (#7886)
Signed-off-by: Youyuan Li <105433145+Darcy-Lee@users.noreply.github.com> Signed-off-by: princepride <wangzhipeng628@gmail.com> Co-authored-by: princepride <wangzhipeng628@gmail.com>
This commit is contained in:
1 parent
a038b38179
commit
423f34326e
27 files changed
+3294
-6
No files matched your search
@@ -483,6 +483,12 @@ _OMNI_MODELS = {
|
||||
"acoustic",
|
||||
"MiniMaxMusic3AcousticForConditionalGeneration",
|
||||
),
|
||||
## YuE2-3B (text-to-music; single-stage native-AR with terminal NAR/VAE)
|
||||
"Yue2ForCausalLM": (
|
||||
"yue2",
|
||||
"yue2",
|
||||
"Yue2ForCausalLM",
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project
|
||||
"""YuE2-3B text-to-music model package."""
|
||||
|
||||
from .pipeline import YUE2_PIPELINE
|
||||
|
||||
__all__ = ["YUE2_PIPELINE"]
|
||||
@@ -0,0 +1,53 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project
|
||||
"""YuE2-3B pipeline topology.
|
||||
|
||||
Single-stage native-AR text-to-music (gepard pattern). The whole
|
||||
Mixture-of-Transformers checkpoint — AR path, NAR path, projection heads —
|
||||
lives in one ``model.safetensors``, so both the autoregressive sampling and
|
||||
the terminal flow-matching + VAE pass run inside one stage and no weights are
|
||||
duplicated across stages. The VAE decoder is a separate repository
|
||||
(``m-a-p/YuE2-Vae``), loaded in ``load_weights`` from ``$YUE2_VAE`` or the
|
||||
default hub id.
|
||||
|
||||
Sampling is model-owned. ``sampling_constraints`` pins ``detokenize`` and the
|
||||
union of both phase end tokens; ``extra_args`` carry the phase and the
|
||||
request-local sampling preset, and must be present in the stage's
|
||||
``default_sampling_params`` so ``has_sampling_extra_args`` turns on and the
|
||||
per-request args reach the model's forward.
|
||||
"""
|
||||
|
||||
from vllm_omni.config.stage_config import (
|
||||
PipelineConfig,
|
||||
StageExecutionType,
|
||||
StagePipelineConfig,
|
||||
)
|
||||
|
||||
from .yue2 import STOP_TOKEN_IDS
|
||||
|
||||
YUE2_PIPELINE = PipelineConfig(
|
||||
model_type="yue2",
|
||||
default_deploy_config_name="yue2.yaml",
|
||||
model_arch="Yue2ForCausalLM",
|
||||
stages=(
|
||||
StagePipelineConfig(
|
||||
stage_id=0,
|
||||
model_stage="yue2",
|
||||
execution_type=StageExecutionType.LLM_AR,
|
||||
input_sources=(),
|
||||
final_output=True,
|
||||
final_output_type="audio",
|
||||
owns_tokenizer=True,
|
||||
engine_output_type="audio",
|
||||
# Whole-song audio ships once, on the finishing step; the audio
|
||||
# accumulator concatenates over time and a single tensor just
|
||||
# passes through.
|
||||
sampling_constraints={
|
||||
"detokenize": False,
|
||||
"stop_token_ids": list(STOP_TOKEN_IDS),
|
||||
},
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
__all__ = ["YUE2_PIPELINE"]
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user