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