ldwang commited on
Commit
7f2a151
1 Parent(s): 2d064fb

Update predict.py

Browse files
Files changed (1) hide show
  1. 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=2048, convo_template=convo_template)
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"]