Spaces:
Runtime error
Runtime error
NewBreaker
commited on
Merge branch 'main' of https://huggingface.co/spaces/NewBreaker/chatglm-6b-int4
Browse files
app.py
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
from transformers import AutoTokenizer, AutoModel
|
2 |
import gradio as gr
|
3 |
|
4 |
-
tokenizer = AutoTokenizer.from_pretrained(".\\models\\chatglm-6b-int4", trust_remote_code=True, revision="")
|
5 |
-
model = AutoModel.from_pretrained(".\\models\\chatglm-6b-int4", trust_remote_code=True, revision="").half().cuda().cpu()
|
6 |
|
7 |
|
8 |
# from transformers import AutoTokenizer, AutoModel
|
@@ -12,9 +12,9 @@ model = AutoModel.from_pretrained(".\\models\\chatglm-6b-int4", trust_remote_cod
|
|
12 |
|
13 |
|
14 |
# kernel_file = "./models/chatglm-6b-int4/quantization_kernels.so"
|
15 |
-
|
16 |
# model = AutoModel.from_pretrained("./models/chatglm-6b-int4", trust_remote_code=True, revision="").half().cuda()
|
17 |
-
|
18 |
|
19 |
|
20 |
|
|
|
1 |
from transformers import AutoTokenizer, AutoModel
|
2 |
import gradio as gr
|
3 |
|
4 |
+
# tokenizer = AutoTokenizer.from_pretrained(".\\models\\chatglm-6b-int4", trust_remote_code=True, revision="")
|
5 |
+
# model = AutoModel.from_pretrained(".\\models\\chatglm-6b-int4", trust_remote_code=True, revision="").half().cuda().cpu()
|
6 |
|
7 |
|
8 |
# from transformers import AutoTokenizer, AutoModel
|
|
|
12 |
|
13 |
|
14 |
# kernel_file = "./models/chatglm-6b-int4/quantization_kernels.so"
|
15 |
+
tokenizer = AutoTokenizer.from_pretrained("./models/chatglm-6b-int4", trust_remote_code=True, revision="")
|
16 |
# model = AutoModel.from_pretrained("./models/chatglm-6b-int4", trust_remote_code=True, revision="").half().cuda()
|
17 |
+
model = AutoModel.from_pretrained("./models/chatglm-6b-int4", trust_remote_code=True, revision="").float()
|
18 |
|
19 |
|
20 |
|