main
py 33 lines 1.14 KB
Raw
1 # SPDX-License-Identifier: Apache-2.0
2 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3 """MiniMax M3 model — hardware-isolated entry point.
4
5 The implementation lives under ``nvidia/`` and ``amd/``; this module picks the
6 right one for the current platform and re-exports the public classes used by
7 the model registry. (Mirrors ``vllm.models.deepseek_v4``.)
8 """
9
10 from typing import TYPE_CHECKING
11
12 from vllm.platforms import current_platform
13
14 # The NVIDIA branch is the static default that type-checkers see; the ROCm
15 # branch overrides it at runtime (kept type-compatible via type: ignore).
16 if TYPE_CHECKING or not current_platform.is_rocm():
17 from .nvidia.model import (
18 MiniMaxM3SparseForCausalLM,
19 MiniMaxM3SparseForConditionalGeneration,
20 )
21 from .nvidia.mtp import MiniMaxM3MTP
22 else:
23 from .amd.model import ( # type: ignore[assignment]
24 MiniMaxM3SparseForCausalLM,
25 MiniMaxM3SparseForConditionalGeneration,
26 )
27 from .amd.mtp import MiniMaxM3MTP # type: ignore[assignment]
28
29 __all__ = [
30 "MiniMaxM3MTP",
31 "MiniMaxM3SparseForCausalLM",
32 "MiniMaxM3SparseForConditionalGeneration",
33 ]