From bdb803a3e331842373434ab83a521b06ebe8a9f4 Mon Sep 17 00:00:00 2001 From: Shishuai Wang <822074+snowolf@users.noreply.github.com> Date: Thu, 30 Mar 2023 23:00:51 +0800 Subject: [PATCH] update model to v2 --- other_model/chatyuan/code/inference.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/other_model/chatyuan/code/inference.py b/other_model/chatyuan/code/inference.py index dd65a27..9dda59f 100644 --- a/other_model/chatyuan/code/inference.py +++ b/other_model/chatyuan/code/inference.py @@ -55,11 +55,11 @@ def answer(text, sample=True, top_p=0.45, temperature=0.7,model=None): def model_fn(model_dir): """ - Load the model for inference,load model from os.environ['model_name'],diffult use stabilityai/stable-diffusion-2 + Load the model for inference,load model from os.environ['model_name'],default use stabilityai/stable-diffusion-2 """ print("=================model_fn=================") - model = T5ForConditionalGeneration.from_pretrained("ClueAI/ChatYuan-large-v1") + model = T5ForConditionalGeneration.from_pretrained("ClueAI/ChatYuan-large-v2") model = model.to("cuda") return model