From e25b072d0e88997dd30a7de273f30b05c9ab823a Mon Sep 17 00:00:00 2001 From: gaozixiang Date: Mon, 11 Nov 2024 15:43:01 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81qwen2.5=20fuction=5Fc?= =?UTF-8?q?all?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lmdeploy/model.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lmdeploy/model.py b/lmdeploy/model.py index 5f9302c0f4..99797abb68 100644 --- a/lmdeploy/model.py +++ b/lmdeploy/model.py @@ -989,12 +989,8 @@ def match(cls, model_path: str) -> Optional[str]: Args: model_path (str): the model path used for matching. """ - if 'qwen' in model_path.lower() and 'qwen2.5' not in model_path.lower(): - return 'qwen' - if 'minicpm-v-2_6' in model_path.lower(): - return 'minicpmv-2d6' - if 'minicpm3-' in model_path.lower(): - return 'minicpm3' + if 'qwen2.5' in model_path.lower(): + return 'qwen2d5' @MODELS.register_module(name='minicpmv-2d6') @MODELS.register_module(name='minicpm3') @@ -1031,8 +1027,12 @@ def match(cls, model_path: str) -> Optional[str]: Args: model_path (str): the model path used for matching. """ - if 'qwen2.5' in model_path.lower(): - return 'qwen2d5' + if 'qwen' in model_path.lower() and 'qwen2.5' not in model_path.lower(): + return 'qwen' + if 'minicpm-v-2_6' in model_path.lower(): + return 'minicpmv-2d6' + if 'minicpm3-' in model_path.lower(): + return 'minicpm3' @MODELS.register_module(name='codellama')