Skip to content

Commit

Permalink
Update total max tokens 20480.
Browse files Browse the repository at this point in the history
Signed-off-by: ldwang <[email protected]>
  • Loading branch information
ldwang committed Nov 29, 2023
1 parent 5f35072 commit 78a08ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion flagai/model/aquila2/modeling_aquila.py
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ def predict(self, text, tokenizer=None,
topk = 1
temperature = 1.0
if sft:
tokens = covert_prompt_to_input_ids_with_history(text, history=history, tokenizer=tokenizer, max_token=2048, convo_template=convo_template)
tokens = covert_prompt_to_input_ids_with_history(text, history=history, tokenizer=tokenizer, max_token=20480, convo_template=convo_template)
tokens = torch.tensor(tokens)[None,].to(device)
else :
tokens = tokenizer.encode_plus(text)["input_ids"]
Expand Down
2 changes: 1 addition & 1 deletion flagai/model/aquila2_hf/predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ def predict(model, text, tokenizer=None,
topk = 1
temperature = 1.0
if sft:
tokens = covert_prompt_to_input_ids_with_history(text, history=history, tokenizer=tokenizer, max_token=2048, convo_template=convo_template)
tokens = covert_prompt_to_input_ids_with_history(text, history=history, tokenizer=tokenizer, max_token=20480, convo_template=convo_template)
tokens = torch.tensor(tokens)[None,].to(device)
else :
tokens = tokenizer.encode_plus(text)["input_ids"]
Expand Down

0 comments on commit 78a08ef

Please sign in to comment.