Skip to content

Commit

Permalink
Delete device='cuda'
Browse files Browse the repository at this point in the history
  • Loading branch information
duzx16 committed Jun 26, 2023
1 parent 07957ba commit 3ee8ff7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cli_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import readline

tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm2-6b", trust_remote_code=True)
model = AutoModel.from_pretrained("THUDM/chatglm2-6b", trust_remote_code=True, device='cuda')
model = AutoModel.from_pretrained("THUDM/chatglm2-6b", trust_remote_code=True).cuda()
model = model.eval()

os_name = platform.system()
Expand Down
2 changes: 1 addition & 1 deletion web_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import mdtex2html

tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm2-6b", trust_remote_code=True)
model = AutoModel.from_pretrained("THUDM/chatglm2-6b", trust_remote_code=True, device='cuda')
model = AutoModel.from_pretrained("THUDM/chatglm2-6b", trust_remote_code=True).cuda()
model = model.eval()

"""Override Chatbot.postprocess"""
Expand Down

0 comments on commit 3ee8ff7

Please sign in to comment.