Signed-off-by: BeatSeat <wendavid552@gmail.com> Signed-off-by: Yueqian Lin <70319226+linyueqian@users.noreply.github.com> Co-authored-by: Yueqian Lin <70319226+linyueqian@users.noreply.github.com>
76 lines
3.4 KiB
Python
76 lines
3.4 KiB
Python
# SPDX-License-Identifier: Apache-2.0
|
|
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
|
"""
|
|
Custom model configs that cannot be expressed via HuggingFace Transformers alone,
|
|
following the same pattern as vllm.transformers_utils.configs.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import importlib
|
|
|
|
_CLASS_TO_MODULE: dict[str, str] = {
|
|
"Mammothmoda2Config": "vllm_omni.transformers_utils.configs.mammoth_moda2",
|
|
"Mammothmoda2Qwen2_5_VLConfig": "vllm_omni.transformers_utils.configs.mammoth_moda2",
|
|
"Mammothmoda2Qwen2_5_VLTextConfig": "vllm_omni.transformers_utils.configs.mammoth_moda2",
|
|
"Mammothmoda2Qwen2_5_VLVisionConfig": "vllm_omni.transformers_utils.configs.mammoth_moda2",
|
|
"FishSpeechConfig": "vllm_omni.transformers_utils.configs.fish_speech",
|
|
"FishSpeechSlowARConfig": "vllm_omni.transformers_utils.configs.fish_speech",
|
|
"FishSpeechFastARConfig": "vllm_omni.transformers_utils.configs.fish_speech",
|
|
"GLMTTSConfig": "vllm_omni.transformers_utils.configs.glm_tts",
|
|
"VoxCPM2Config": "vllm_omni.transformers_utils.configs.voxcpm2",
|
|
"VoxtralTTSConfig": "vllm_omni.transformers_utils.configs.voxtral_tts",
|
|
"CosyVoice3Config": "vllm_omni.transformers_utils.configs.cosyvoice3",
|
|
"OmniVoiceConfig": "vllm_omni.transformers_utils.configs.omnivoice",
|
|
"BailingMoeV2Config": "vllm_omni.transformers_utils.configs.ming_flash_omni",
|
|
"BailingMM2Config": "vllm_omni.transformers_utils.configs.ming_flash_omni",
|
|
"MingFlashOmniConfig": "vllm_omni.transformers_utils.configs.ming_flash_omni",
|
|
"Qwen3VLMoeVisionConfig": "vllm_omni.transformers_utils.configs.ming_flash_omni",
|
|
"WhisperEncoderConfig": "vllm_omni.transformers_utils.configs.ming_flash_omni",
|
|
}
|
|
|
|
__all__ = [
|
|
"Mammothmoda2Config",
|
|
"Mammothmoda2Qwen2_5_VLConfig",
|
|
"Mammothmoda2Qwen2_5_VLTextConfig",
|
|
"Mammothmoda2Qwen2_5_VLVisionConfig",
|
|
"FishSpeechConfig",
|
|
"FishSpeechSlowARConfig",
|
|
"FishSpeechFastARConfig",
|
|
"GLMTTSConfig",
|
|
"VoxCPM2Config",
|
|
"VoxtralTTSConfig",
|
|
"CosyVoice3Config",
|
|
"OmniVoiceConfig",
|
|
"BailingMoeV2Config",
|
|
"BailingMM2Config",
|
|
"MingFlashOmniConfig",
|
|
"Qwen3VLMoeVisionConfig",
|
|
"WhisperEncoderConfig",
|
|
]
|
|
|
|
|
|
def __getattr__(name: str):
|
|
if name in _CLASS_TO_MODULE:
|
|
module_name = _CLASS_TO_MODULE[name]
|
|
module = importlib.import_module(module_name)
|
|
return getattr(module, name)
|
|
|
|
raise AttributeError(f"module 'vllm_omni.transformers_utils.configs' has no attribute '{name}'")
|
|
|
|
|
|
def __dir__():
|
|
return sorted(list(__all__))
|
|
|
|
|
|
# Eagerly import all config modules so their AutoConfig.register() side-effects
|
|
# run as soon as `vllm_omni.transformers_utils.configs` is imported.
|
|
from vllm_omni.transformers_utils.configs import cosyvoice3 as _cosyvoice3 # noqa: F401, E402
|
|
from vllm_omni.transformers_utils.configs import fish_speech as _fish_speech # noqa: F401, E402
|
|
from vllm_omni.transformers_utils.configs import glm_tts as _glm_tts # noqa: F401, E402
|
|
from vllm_omni.transformers_utils.configs import mammoth_moda2 as _mammoth_moda2 # noqa: F401, E402
|
|
from vllm_omni.transformers_utils.configs import ming_flash_omni as _ming_flash_omni # noqa: F401, E402
|
|
from vllm_omni.transformers_utils.configs import omnivoice as _omnivoice # noqa: F401, E402
|
|
from vllm_omni.transformers_utils.configs import voxcpm2 as _voxcpm2 # noqa: F401, E402
|
|
from vllm_omni.transformers_utils.configs import voxtral_tts as _voxtral_tts # noqa: F401, E402
|