netist commited on
Commit
ce83cf5
·
1 Parent(s): 182bf2c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -1,8 +1,12 @@
1
- from transformers import AutoModel, AutoTokenizer
2
  import gradio as gr
3
 
4
- tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True)
5
- model = AutoModel.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True).half().cuda()
 
 
 
 
6
  #tokenizer = AutoTokenizer.from_pretrained("silver/chatglm-6b-slim", trust_remote_code=True)
7
  #model = AutoModel.from_pretrained("silver/chatglm-6b-slim", trust_remote_code=True).half().cuda()
8
 
 
1
+ #from transformers import AutoModel, AutoTokenizer
2
  import gradio as gr
3
 
4
+ from transformers import AutoModelForSeq2SeqLM
5
+
6
+ model = AutoModelForSeq2SeqLM.from_pretrained("silver/chatglm-6b-int4-qe-slim")
7
+
8
+ #tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True)
9
+ #model = AutoModel.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True).half().cuda()
10
  #tokenizer = AutoTokenizer.from_pretrained("silver/chatglm-6b-slim", trust_remote_code=True)
11
  #model = AutoModel.from_pretrained("silver/chatglm-6b-slim", trust_remote_code=True).half().cuda()
12