Spaces:
Build error
Build error
songxxzp
commited on
Commit
•
65546ae
1
Parent(s):
3dabe01
Use int4
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ mem = psutil.virtual_memory()
|
|
8 |
|
9 |
tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True)
|
10 |
|
11 |
-
model = AutoModelForSeq2SeqLM.from_pretrained("THUDM/chatglm-6b
|
12 |
|
13 |
def chat(query, history=[]):
|
14 |
_, history = model.chat(tokenizer, query, history, max_length=512)
|
|
|
8 |
|
9 |
tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True)
|
10 |
|
11 |
+
model = AutoModelForSeq2SeqLM.from_pretrained("THUDM/chatglm-6b-int4", trust_remote_code=True).cpu().float()
|
12 |
|
13 |
def chat(query, history=[]):
|
14 |
_, history = model.chat(tokenizer, query, history, max_length=512)
|