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