From 7cbc2429a665191b2a3c4a6ea424589694379740 Mon Sep 17 00:00:00 2001 From: Yuxuan Xia <77518229+NovTi@users.noreply.github.com> Date: Thu, 22 Feb 2024 10:00:43 +0800 Subject: [PATCH] Fix C-Eval ChatGLM loading issue (#10206) * Add c-eval workflow and modify running files * Modify the chatglm evaluator file * Modify the ceval workflow for triggering test * Modify the ceval workflow file * Modify the ceval workflow file * Modify ceval workflow * Adjust the ceval dataset download * Add ceval workflow dependencies * Modify ceval workflow dataset download * Add ceval test dependencies * Add ceval test dependencies * Correct the result print * Fix the nightly test trigger time * Fix ChatGLM loading issue --- python/llm/dev/benchmark/ceval/evaluators/chatglm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/llm/dev/benchmark/ceval/evaluators/chatglm.py b/python/llm/dev/benchmark/ceval/evaluators/chatglm.py index b501c9a2..717f386f 100644 --- a/python/llm/dev/benchmark/ceval/evaluators/chatglm.py +++ b/python/llm/dev/benchmark/ceval/evaluators/chatglm.py @@ -22,7 +22,7 @@ from thefuzz import process from transformers import AutoTokenizer from evaluators.evaluator import Evaluator -from bigdl.llm.transformers import AutoModelForCausalLM +from bigdl.llm.transformers import AutoModel from transformers.generation.utils import LogitsProcessorList from transformers.generation.logits_process import LogitsProcessor @@ -42,7 +42,7 @@ class ChatGLMEvaluator(Evaluator): self.model_path, trust_remote_code=True ) - self.model = AutoModelForCausalLM.from_pretrained( + self.model = AutoModel.from_pretrained( self.model_path, load_in_low_bit=self.qtype, optimize_model=True,