Skip to content

Commit

Permalink
chore: fix coallesce type
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Pham <[email protected]>
  • Loading branch information
aarnphm committed Dec 3, 2024
1 parent 975e040 commit 59221e6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vllm/model_executor/guided_decoding/xgrammar_decoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@ class XGrammarLogitsProcessor:
config: GrammarConfig

ctx: xgr.CompiledGrammar | None = None
token_bitmask: torch.Tensor = None # type: ignore[assignment]
matchers: list[xgr.GrammarMatcher] = field(default_factory=list)
batch_size: int = 1
token_bitmask: torch.Tensor = None
prefilled: bool = False
batch_size: int = field(default=1)
prefilled: bool = field(default=False)

def __getstate__(self) -> dict[str, Any]:
return {'config': self.config}
Expand All @@ -193,7 +193,7 @@ def __setstate__(self, state: dict[str, Any]):
self.ctx = None
self.matchers = []
self.batch_size = 1
self.token_bitmask = None
self.token_bitmask = None # type: ignore[assignment]
self.prefilled = False

def _ensure_ctx(self):
Expand Down

0 comments on commit 59221e6

Please sign in to comment.