Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions vllm/models/kimi_k3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,20 @@

# The NVIDIA branch is the static default that type-checkers see; the ROCm
# branch overrides it at runtime (kept type-compatible via type: ignore).
if TYPE_CHECKING or not current_platform.is_rocm():
# TPU plugins import the shared ``common`` modules through this package, but
# register their own model classes. Do not eagerly import a GPU implementation.
if TYPE_CHECKING:
from .nvidia.model import KimiK3ForConditionalGeneration, KimiLinearForCausalLM
from .nvidia.mtp import KimiK3MTP
else:
elif current_platform.device_type == "tpu":
pass
elif current_platform.is_rocm():
from .amd.linear import KimiLinearForCausalLM # type: ignore[assignment]
from .amd.model import KimiK3ForConditionalGeneration # type: ignore[assignment]
from .amd.mtp import KimiK3MTP # type: ignore[assignment]
else:
from .nvidia.model import KimiK3ForConditionalGeneration, KimiLinearForCausalLM
from .nvidia.mtp import KimiK3MTP

__all__ = [
"KimiK3ForConditionalGeneration",
Expand Down
Loading