Skip to content

Commit

Permalink
fix stop
Browse files Browse the repository at this point in the history
  • Loading branch information
AllentDan committed Jan 13, 2025
1 parent 59988d4 commit 3fe5fe4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lmdeploy/pytorch/engine/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,12 +613,12 @@ def update_running(self, running: SeqList, next_token_ids: torch.Tensor,
continue
eos_token_id = self.model_config.eos_token_id
update_token, eos_stop = self.extract_tokens(token, eos_token_id)
stop = stop or eos_stop
if stop:
update_token = _EMPTY_TOKEN
else:
msg.num_new_tokens += len(update_token)
msg.update_token_ids(update_token, model_meta=model_meta)
stop = stop or eos_stop
if stop:
msg.status = MessageStatus.STOPPED

Expand Down

0 comments on commit 3fe5fe4

Please sign in to comment.