Skip to content

Commit

Permalink
Update generate_chat.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ftgreat authored Jun 21, 2023
1 parent 95fb880 commit 2b10f41
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/Aquila/Aquila-chat/generate_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
conv.append_message(conv.roles[1], None)

tokens = tokenizer.encode_plus(f"{conv.get_prompt()}", None, max_length=None)['input_ids']
## TODO for ICL inference using plain text
## tokens = tokenizer.encode_plus(f"{text}", None, max_length=None)['input_ids']
tokens = tokens[1:-1]

with torch.no_grad():
Expand Down

0 comments on commit 2b10f41

Please sign in to comment.