From 6bf9f85f70df4598526550285401d9213690b040 Mon Sep 17 00:00:00 2001 From: zR <2448370773@qq.com> Date: Tue, 29 Oct 2024 01:41:10 +0800 Subject: [PATCH] remove wrong path --- basic_demo/trans_cli_demo.py | 4 ++-- basic_demo/trans_stress_test.py | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/basic_demo/trans_cli_demo.py b/basic_demo/trans_cli_demo.py index 2d5f25e..c843258 100644 --- a/basic_demo/trans_cli_demo.py +++ b/basic_demo/trans_cli_demo.py @@ -1,5 +1,5 @@ """ -This script creates a CLI demo with transformers backend for the glm-4-9b model, +This script creates a CLI demo with transformers backend for the glm-4-9b-chat model, allowing users to interact with the model through a command-line interface. Usage: @@ -19,7 +19,7 @@ import torch from threading import Thread from transformers import AutoTokenizer, AutoModelForCausalLM, StoppingCriteria, StoppingCriteriaList, TextIteratorStreamer -MODEL_PATH = "/share/home/zyx/Models/glm-4-9b-chat-hf" +MODEL_PATH = "THUDM/glm-4-9b-chat-hf" tokenizer = AutoTokenizer.from_pretrained(MODEL_PATH) diff --git a/basic_demo/trans_stress_test.py b/basic_demo/trans_stress_test.py index 77adf70..32afa98 100644 --- a/basic_demo/trans_stress_test.py +++ b/basic_demo/trans_stress_test.py @@ -1,3 +1,7 @@ +""" +Note: + Using with glm-4-9b-chat-hf will require `transformers>=4.46.0". +""" import argparse import time from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer, BitsAndBytesConfig