Spaces:
Build error
Build error
Switched to HF automodel.
Browse files
app.py
CHANGED
@@ -18,9 +18,9 @@ T4级别的GPU已经可以很胜任这个任务了。
|
|
18 |
import torch
|
19 |
import sys
|
20 |
|
21 |
-
from transformers import AutoTokenizer, GenerationConfig,
|
22 |
|
23 |
-
model =
|
24 |
tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True)
|
25 |
|
26 |
# We have to use full precision, as some tokens are >65535
|
|
|
18 |
import torch
|
19 |
import sys
|
20 |
|
21 |
+
from transformers import AutoTokenizer, GenerationConfig, AutoModel
|
22 |
|
23 |
+
model = AutoModel.from_pretrained("ljsabc/Fujisaki-int4", trust_remote_code=True).float()
|
24 |
tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True)
|
25 |
|
26 |
# We have to use full precision, as some tokens are >65535
|