Skip to content

Commit

Permalink
[Core] Update to outlines >= 0.1.8 (vllm-project#10576)
Browse files Browse the repository at this point in the history
Signed-off-by: Russell Bryant <rbryant@redhat.com>
  • Loading branch information
russellb authored and ZenPuzzle committed Dec 24, 2024
1 parent 57d862b commit dd7b147
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions requirements-common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ prometheus_client >= 0.18.0
prometheus-fastapi-instrumentator >= 7.0.0
tiktoken >= 0.6.0 # Required for DBRX tokenizer
lm-format-enforcer >= 0.10.9, < 0.11
outlines >= 0.0.43, < 0.1
xgrammar
outlines >= 0.1.8
xgrammar >= 0.1.6; platform_machine == "x86_64"
typing_extensions >= 4.10
filelock >= 3.10.4 # filelock starts to support `mode` argument from 3.10.4
partial-json-parser # used for parsing partial JSON outputs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class RegexLogitsProcessor(BaseLogitsProcessor):
def _get_guide(cls, regex_string: str,
tokenizer: PreTrainedTokenizerBase) -> Guide:
tokenizer = _adapt_tokenizer(tokenizer)
return RegexGuide(regex_string, tokenizer)
return RegexGuide.from_regex(regex_string, tokenizer)

def __init__(self, regex_string: str, tokenizer: PreTrainedTokenizerBase):
"""Compile the FSM that drives the regex-structured generation.
Expand Down

0 comments on commit dd7b147

Please sign in to comment.