[Quantization][Qwen2.5-Omni] Support thinker-only ModelOpt NVFP4 W4A4 checkpoints (#5073)
Signed-off-by: Caspian443 <scrisis843@gmail.com> Co-authored-by: SYLAR <125541396+lishunyang12@users.noreply.github.com>
This commit is contained in:
1 parent
f663d120c7
commit
593b404539
5 files changed
+48
-2
No files matched your search
@@ -1805,6 +1805,7 @@ class TestQwen2_5OmniPipeline:
|
||||
assert s.owns_tokenizer is True
|
||||
assert s.engine_output_type == "latent"
|
||||
assert s.requires_multimodal_data is True
|
||||
assert s.hf_config_name == "thinker_config"
|
||||
|
||||
def test_talker(self):
|
||||
p = resolve_pipeline_config("qwen2_5_omni")
|
||||
@@ -1813,6 +1814,7 @@ class TestQwen2_5OmniPipeline:
|
||||
s = p.get_stage(1)
|
||||
assert isinstance(s, StagePipelineConfig)
|
||||
assert s.input_sources == (0,)
|
||||
assert s.hf_config_name == "talker_config"
|
||||
assert s.sampling_constraints["stop_token_ids"] == [8294]
|
||||
# thinker2talker was removed: qwen2_5_omni has no async_chunk support,
|
||||
# so sync_process_input_func always wins and custom_process_input_func
|
||||
@@ -1829,6 +1831,7 @@ class TestQwen2_5OmniPipeline:
|
||||
assert s.execution_type == StageExecutionType.LLM_GENERATION
|
||||
assert s.final_output_type == "audio"
|
||||
assert s.engine_output_type == "audio"
|
||||
assert s.hf_config_name == "thinker_config"
|
||||
|
||||
|
||||
class TestQwen3TTSPipeline:
|
||||
|
||||
@@ -12,7 +12,7 @@ from unittest.mock import Mock
|
||||
import pytest
|
||||
from omegaconf import OmegaConf
|
||||
from pydantic import ValidationError
|
||||
from transformers import PretrainedConfig
|
||||
from transformers import PretrainedConfig, Qwen3OmniMoeConfig
|
||||
from vllm.engine.arg_utils import EngineArgs
|
||||
|
||||
from vllm_omni.config.model import OmniModelConfig
|
||||
@@ -244,6 +244,28 @@ def test_stage_specific_text_config_override():
|
||||
assert omni_config.get_head_size() == talker_head_dim
|
||||
|
||||
|
||||
def test_non_override_ar_stage_inputs_embeds_size_matches_hidden_size():
|
||||
"""A stage without an embedding-size override keeps the default input width."""
|
||||
vllm_config = EngineArgs().create_model_config()
|
||||
vllm_config.hf_config = Qwen3OmniMoeConfig(enable_audio_output=True)
|
||||
|
||||
omni_config = OmniModelConfig.from_vllm_model_config(
|
||||
vllm_config,
|
||||
model_stage="talker",
|
||||
hf_config_name="talker_config",
|
||||
)
|
||||
|
||||
assert (
|
||||
getattr(
|
||||
omni_config.hf_config.talker_config,
|
||||
"embedding_size",
|
||||
None,
|
||||
)
|
||||
is None
|
||||
)
|
||||
assert omni_config.get_inputs_embeds_size() == omni_config.hf_text_config.hidden_size
|
||||
|
||||
|
||||
def test_stage_configs_path_field():
|
||||
"""OmniEngineArgs with stage_configs_path should construct without error."""
|
||||
args = OmniEngineArgs(stage_configs_path="/some/path.yaml")
|
||||
|
||||
Reference in new issue
Block a user