Spaces:
Runtime error
Runtime error
Refactor to use upstream automodel.
Browse files
app.py
CHANGED
@@ -2,8 +2,8 @@ import torch
|
|
2 |
|
3 |
from transformers import AutoTokenizer, GenerationConfig, AutoModel
|
4 |
|
5 |
-
model = AutoModel.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True, revision="
|
6 |
-
tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True, revision="
|
7 |
|
8 |
from peft import PeftModel
|
9 |
peft_path = 'ljsabc/Fujisaki_GLM' # change it to your own
|
|
|
2 |
|
3 |
from transformers import AutoTokenizer, GenerationConfig, AutoModel
|
4 |
|
5 |
+
model = AutoModel.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True, revision="658202d").float()
|
6 |
+
tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True, revision="658202d")
|
7 |
|
8 |
from peft import PeftModel
|
9 |
peft_path = 'ljsabc/Fujisaki_GLM' # change it to your own
|