Spaces:
Runtime error
Runtime error
Update interaction.py
Browse files- interaction.py +2 -2
interaction.py
CHANGED
@@ -14,9 +14,9 @@ class MindBot(object):
|
|
14 |
# self.device = torch.device("cuda")
|
15 |
# device_ids = [1, 2]
|
16 |
if if_int8:
|
17 |
-
self.model = SteamGenerationMixin.from_pretrained(model_path, device_map='auto', load_in_8bit=True,use_auth_token=
|
18 |
else:
|
19 |
-
self.model = SteamGenerationMixin.from_pretrained(model_path, device_map='auto',use_auth_token=
|
20 |
|
21 |
self.tokenizer = AutoTokenizer.from_pretrained(tokenizer_path)
|
22 |
# sp_tokens = {'additional_special_tokens': ['<human>', '<bot>']}
|
|
|
14 |
# self.device = torch.device("cuda")
|
15 |
# device_ids = [1, 2]
|
16 |
if if_int8:
|
17 |
+
self.model = SteamGenerationMixin.from_pretrained(model_path, device_map='auto', load_in_8bit=True,use_auth_token='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').eval()
|
18 |
else:
|
19 |
+
self.model = SteamGenerationMixin.from_pretrained(model_path, device_map='auto',use_auth_token='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').half().eval()
|
20 |
|
21 |
self.tokenizer = AutoTokenizer.from_pretrained(tokenizer_path)
|
22 |
# sp_tokens = {'additional_special_tokens': ['<human>', '<bot>']}
|