Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fastchat/serve/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def generate_stream(
if model.config.is_encoder_decoder:
max_src_len = context_len
else: # truncate
max_src_len = context_len - max_new_tokens - 1
max_src_len = context_len - max_new_tokens

input_ids = input_ids[-max_src_len:]
output_ids = list(input_ids)
Expand Down
Loading