feat(model): Support Qwen2.5 models (#2030)

This commit is contained in:
Fangyin Cheng
2024-09-19 11:58:39 +08:00
committed by GitHub
parent 1328c5636d
commit 1f2e844639
5 changed files with 47 additions and 4 deletions

View File

@@ -370,10 +370,15 @@ class Qwen2Adapter(QwenAdapter):
support_8bit: bool = True
def do_match(self, lower_model_name_or_path: Optional[str] = None):
return (
lower_model_name_or_path
and "qwen2" in lower_model_name_or_path
and "instruct" in lower_model_name_or_path
return lower_model_name_or_path and (
(
"qwen2" in lower_model_name_or_path
and "instruct" in lower_model_name_or_path
)
or (
"qwen2.5" in lower_model_name_or_path
and "instruct" in lower_model_name_or_path
)
)