diff --git a/vllm_ascend/models/__init__.py b/vllm_ascend/models/__init__.py index cae779c..8f24995 100644 --- a/vllm_ascend/models/__init__.py +++ b/vllm_ascend/models/__init__.py @@ -7,7 +7,7 @@ def register_model(): from .deepseek_dbo import CustomDeepseekDBOForCausalLM # noqa: F401 from .deepseek_mtp import CustomDeepSeekMTP # noqa: F401 from .deepseek_v2 import CustomDeepseekV2ForCausalLM # noqa: F401 - from .deepseek_v2 import CustomDeepseekV3ForCausalLM # noqa: F401 + from .deepseek_v3 import CustomDeepseekV3ForCausalLM # noqa: F401 from .qwen2_5_vl import \ AscendQwen2_5_VLForConditionalGeneration # noqa: F401 from .qwen2_vl import AscendQwen2VLForConditionalGeneration # noqa: F401 @@ -47,7 +47,7 @@ def register_model(): ModelRegistry.register_model( "DeepseekV3ForCausalLM", - "vllm_ascend.models.deepseek_v2:CustomDeepseekV3ForCausalLM") + "vllm_ascend.models.deepseek_v3:CustomDeepseekV3ForCausalLM") ModelRegistry.register_model( "Qwen3MoeForCausalLM", diff --git a/vllm_ascend/models/deepseek_v2.py b/vllm_ascend/models/deepseek_v2.py index bfa86f0..054a02e 100644 --- a/vllm_ascend/models/deepseek_v2.py +++ b/vllm_ascend/models/deepseek_v2.py @@ -979,7 +979,3 @@ class CustomDeepseekV2ForCausalLM(DeepseekV2ForCausalLM): attn_metadata, intermediate_tensors, inputs_embeds) return hidden_states - - -class CustomDeepseekV3ForCausalLM(CustomDeepseekV2ForCausalLM): - pass diff --git a/vllm_ascend/models/deepseek_v3.py b/vllm_ascend/models/deepseek_v3.py new file mode 100644 index 0000000..4d09ef0 --- /dev/null +++ b/vllm_ascend/models/deepseek_v3.py @@ -0,0 +1,27 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2025 Huawei Technologies Co., Ltd. All Rights Reserved. +# Copyright 2023 The vLLM team. +# Copyright 2023 DeepSeek-AI and the HuggingFace Inc. team. All rights reserved. +# +# This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX +# and OPT implementations in this library. It has been modified from its +# original forms to accommodate minor architectural differences compared +# to GPT-NeoX and OPT used by the Meta AI team that trained the model. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from vllm_ascend.models.deepseek_v2 import CustomDeepseekV2ForCausalLM + + +class CustomDeepseekV3ForCausalLM(CustomDeepseekV2ForCausalLM): + pass