[Model] Support DeepSeek-V4
This commit is contained in:
3
vllm_mlu/distributed/device_communicators/__init__.py
Normal file
3
vllm_mlu/distributed/device_communicators/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-MLU project
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-MLU project
|
||||
|
||||
import torch
|
||||
from torch.distributed import ProcessGroup
|
||||
|
||||
from vllm.distributed.device_communicators.base_device_communicator import (
|
||||
DeviceCommunicatorBase,
|
||||
)
|
||||
|
||||
|
||||
class MLUCommunicator(DeviceCommunicatorBase):
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
cpu_group: ProcessGroup,
|
||||
device: torch.device | None = None,
|
||||
device_group: ProcessGroup | None = None,
|
||||
unique_name: str = ""
|
||||
):
|
||||
super().__init__(cpu_group, device, device_group, unique_name)
|
||||
# init device according to rank
|
||||
self.device = torch.mlu.current_device()
|
||||
self.ca_comm: CustomAllreduce | None = None
|
||||
Reference in New Issue
Block a user