Skip to content

Commit 27cce16

Browse files
committed
bugfix
Signed-off-by: Benjamin Chislett <benjamin.chislett@centml.ai>
1 parent f559a22 commit 27cce16

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

vllm/v1/structured_output/backend_xgrammar.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ def validate_tokens(self, tokens: list[int]) -> list[int]:
188188
def rollback(self, num_tokens: int) -> None:
189189
self.matcher.rollback(num_tokens)
190190
self.num_processed_tokens -= num_tokens
191+
self._is_terminated = self.matcher.is_terminated()
191192

192193
def fill_bitmask(self, bitmask: torch.Tensor, idx: int) -> None:
193194
self.matcher.fill_next_token_bitmask(bitmask, idx)

0 commit comments

Comments
 (0)