Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ args = {
|
|
23 |
model = OpenLLAMAPEFTModel(**args)
|
24 |
delta_ckpt = torch.load(args['delta_ckpt_path'], map_location=torch.device('cpu'))
|
25 |
model.load_state_dict(delta_ckpt, strict=False)
|
26 |
-
model = model.half().cuda().eval()
|
27 |
print(f'[!] init the 13b model over ...')
|
28 |
|
29 |
"""Override Chatbot.postprocess"""
|
|
|
23 |
model = OpenLLAMAPEFTModel(**args)
|
24 |
delta_ckpt = torch.load(args['delta_ckpt_path'], map_location=torch.device('cpu'))
|
25 |
model.load_state_dict(delta_ckpt, strict=False)
|
26 |
+
model = model.half().cuda().eval() if torch.cuda.is_available() else model.eval()
|
27 |
print(f'[!] init the 13b model over ...')
|
28 |
|
29 |
"""Override Chatbot.postprocess"""
|