Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
loxs123 committed Jan 11, 2024
1 parent 8e2b6ee commit 5b24706
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions projects/ChatGLM/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ def reset_conversation(self):
if __name__ == "__main__":
# ----- load huggingface checkpoint -----
text = "浏览器输入www.baidu.com 并且显示网页,从计算机网络的角度说明实现的全过程"
text2 = "5600分为A、B、C三部分,如果A比C的比例是1/7:1/7:1/14,那么A比C多多少?\n选项:\n(A) 300\n(B) 992 \n(C) 1120\n(D) 552\n(E) 312 让我们先想想。一些随机推理:"
text2 = (
"5600分为A、B、C三部分,如果A比C的比例是1/7:1/7:1/14,那么A比C多多少?\n"
"选项:\n(A) 300\n(B) 992 \n(C) 1120\n(D) 552\n(E) 312 让我们先想想。一些随机推理:"
)
texts = [
"a dog is flying on the sky",
"Wikipedia is a free online",
Expand All @@ -159,7 +162,7 @@ def reset_conversation(self):
tensor_parallel=1,
pipeline_parallel=1,
pipeline_num_layers=28,
model_path=os.environ['CHATGLM_HF_DIR'],
model_path=os.environ["CHATGLM_HF_DIR"],
mode="huggingface",
)
pipeline.model = pipeline.model.half()
Expand Down

0 comments on commit 5b24706

Please sign in to comment.