Skip to content

Commit

Permalink
Format code and minor bug fix (#2716)
Browse files Browse the repository at this point in the history
  • Loading branch information
merrymercy authored Nov 22, 2023
1 parent 99d19ac commit 0bbeddc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion fastchat/conversation.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ def get_conv_template(name: str) -> Conversation:
roles=("### Instruction:", "### Response:"),
sep="\n",
stop_str="<|EOT|>",
sep_style=SeparatorStyle.ADD_NEW_LINE_SINGLE
sep_style=SeparatorStyle.ADD_NEW_LINE_SINGLE,
)
)

Expand Down
1 change: 1 addition & 0 deletions fastchat/serve/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ def generate_stream(
token_logprobs = [None] # The first token has no logprobs.
sent_interrupt = False
finish_reason = None
stopped = False
for i in range(max_new_tokens):
if i == 0: # prefill
if model.config.is_encoder_decoder:
Expand Down

0 comments on commit 0bbeddc

Please sign in to comment.