From 1b3b46e54d955f07cefaf98ddc3b9d07239a859f Mon Sep 17 00:00:00 2001 From: Yishuo Wang Date: Tue, 23 Jul 2024 13:44:56 +0800 Subject: [PATCH] fix chatglm new model (#11639) --- python/llm/src/ipex_llm/transformers/convert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/llm/src/ipex_llm/transformers/convert.py b/python/llm/src/ipex_llm/transformers/convert.py index cc820fa1..789fd67d 100644 --- a/python/llm/src/ipex_llm/transformers/convert.py +++ b/python/llm/src/ipex_llm/transformers/convert.py @@ -1035,7 +1035,7 @@ def _optimize_post(model, lightweight_bmm=False): if model.config.architectures is not None \ and model.config.architectures[0] in ["ChatGLMModel", "ChatGLMForConditionalGeneration"]: if hasattr(model.config, 'padded_vocab_size') and \ - model.config.padded_vocab_size == 65024: + model.config.padded_vocab_size in [65024, 64896]: # chatglm2-6b, chatglm2-6b-32k, chatglm3-6b, chatglm3-6b-32k, chatglm3-6b-128k modeling_module_name = model.__class__.__module__ module = importlib.import_module(modeling_module_name)