### What this PR does / why we need it? Optimize qwen2_vl and qwen2_5_vl. ### Does this PR introduce _any_ user-facing change? no ### How was this patch tested? Testing this PR on 1080p picture with tp=1, bs=1 on Qwen2-VL and Qwen2.5-VL, every fa op's during time lasting from 11ms to 9ms, got roughly 22% perf boost. --------- Signed-off-by: zouyida2052 <zouyida@huawei.com> Signed-off-by: zouyida2052 <zouyida2002@gmail.com> Co-authored-by: zouyida2052 <zouyida@huawei.com>
32 lines
1.1 KiB
Python
32 lines
1.1 KiB
Python
from vllm import ModelRegistry
|
|
|
|
|
|
def register_model():
|
|
from .deepseek_mtp import CustomDeepSeekMTP # noqa: F401
|
|
from .deepseek_v2 import CustomDeepseekV2ForCausalLM # noqa: F401
|
|
from .deepseek_v2 import CustomDeepseekV3ForCausalLM # noqa: F401
|
|
from .qwen2_5_vl import \
|
|
AscendQwen2_5_VLForConditionalGeneration # noqa: F401
|
|
from .qwen2_vl import AscendQwen2VLForConditionalGeneration # noqa: F401
|
|
|
|
ModelRegistry.register_model(
|
|
"DeepSeekMTPModel",
|
|
"vllm_ascend.models.deepseek_mtp:CustomDeepSeekMTP")
|
|
|
|
ModelRegistry.register_model(
|
|
"Qwen2VLForConditionalGeneration",
|
|
"vllm_ascend.models.qwen2_vl:AscendQwen2VLForConditionalGeneration")
|
|
|
|
ModelRegistry.register_model(
|
|
"Qwen2_5_VLForConditionalGeneration",
|
|
"vllm_ascend.models.qwen2_5_vl:AscendQwen2_5_VLForConditionalGeneration"
|
|
)
|
|
|
|
ModelRegistry.register_model(
|
|
"DeepseekV2ForCausalLM",
|
|
"vllm_ascend.models.deepseek_v2:CustomDeepseekV2ForCausalLM")
|
|
|
|
ModelRegistry.register_model(
|
|
"DeepseekV3ForCausalLM",
|
|
"vllm_ascend.models.deepseek_v2:CustomDeepseekV3ForCausalLM")
|