Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
merrymercy committed Oct 2, 2024
1 parent 9d5fb3d commit 85d2d5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/sglang/srt/sampling/sampling_batch_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def update_penalties(self):
self.linear_penalties = penalizer.apply(self.linear_penalties)

def update_regex_vocab_mask(self):
has_regex = any(regex_fsm for regex_fsm in self.regex_fsms)
has_regex = self.regex_fsms and any(regex_fsm for regex_fsm in self.regex_fsms)

# Reset the vocab mask
self.vocab_mask = None
Expand Down

0 comments on commit 85d2d5b

Please sign in to comment.