Unverified Commit e7391949 authored by Russell Bryant's avatar Russell Bryant Committed by GitHub
Browse files

[Core] Update to outlines >= 0.1.8 (#10576)


Signed-off-by: default avatarRussell Bryant <rbryant@redhat.com>
parent 250ee65d
...@@ -18,7 +18,7 @@ prometheus_client >= 0.18.0 ...@@ -18,7 +18,7 @@ prometheus_client >= 0.18.0
prometheus-fastapi-instrumentator >= 7.0.0 prometheus-fastapi-instrumentator >= 7.0.0
tiktoken >= 0.6.0 # Required for DBRX tokenizer tiktoken >= 0.6.0 # Required for DBRX tokenizer
lm-format-enforcer >= 0.10.9, < 0.11 lm-format-enforcer >= 0.10.9, < 0.11
outlines >= 0.0.43, < 0.1 outlines >= 0.1.8
xgrammar >= 0.1.6; platform_machine == "x86_64" xgrammar >= 0.1.6; platform_machine == "x86_64"
typing_extensions >= 4.10 typing_extensions >= 4.10
filelock >= 3.16.1 # need to contain https://github.com/tox-dev/filelock/pull/317 filelock >= 3.16.1 # need to contain https://github.com/tox-dev/filelock/pull/317
......
...@@ -99,7 +99,7 @@ class RegexLogitsProcessor(BaseLogitsProcessor): ...@@ -99,7 +99,7 @@ class RegexLogitsProcessor(BaseLogitsProcessor):
def _get_guide(cls, regex_string: str, def _get_guide(cls, regex_string: str,
tokenizer: PreTrainedTokenizerBase) -> Guide: tokenizer: PreTrainedTokenizerBase) -> Guide:
tokenizer = _adapt_tokenizer(tokenizer) tokenizer = _adapt_tokenizer(tokenizer)
return RegexGuide(regex_string, tokenizer) return RegexGuide.from_regex(regex_string, tokenizer)
def __init__(self, regex_string: str, tokenizer: PreTrainedTokenizerBase): def __init__(self, regex_string: str, tokenizer: PreTrainedTokenizerBase):
"""Compile the FSM that drives the regex-structured generation. """Compile the FSM that drives the regex-structured generation.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment