Update predict.py
Browse files- predict.py +1 -1
predict.py
CHANGED
@@ -353,7 +353,7 @@ def predict(model, text, tokenizer=None,
|
|
353 |
topk = 1
|
354 |
temperature = 1.0
|
355 |
if sft:
|
356 |
-
tokens = covert_prompt_to_input_ids_with_history(text, history=history, tokenizer=tokenizer, max_token=
|
357 |
tokens = torch.tensor(tokens)[None,].to(device)
|
358 |
else :
|
359 |
tokens = tokenizer.encode_plus(text)["input_ids"]
|
|
|
353 |
topk = 1
|
354 |
temperature = 1.0
|
355 |
if sft:
|
356 |
+
tokens = covert_prompt_to_input_ids_with_history(text, history=history, tokenizer=tokenizer, max_token=1000000, convo_template=convo_template)
|
357 |
tokens = torch.tensor(tokens)[None,].to(device)
|
358 |
else :
|
359 |
tokens = tokenizer.encode_plus(text)["input_ids"]
|