Remove device="cuda"
This commit is contained in:
parent
d09927fa52
commit
3444756a17
@ -157,7 +157,7 @@ async def predict(query: str, history: List[List[str]], model_id: str):
|
||||
|
||||
if __name__ == "__main__":
|
||||
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.eval()
|
||||
|
||||
uvicorn.run(app, host='0.0.0.0', port=8000, workers=1)
|
||||
|
Loading…
Reference in New Issue
Block a user