You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The cached function actually depends on the regex and the tokenizer. The tokenizer is not a parameter of the function, though, which leads to cached state maps being shared across different tokenizers, which leads to errors.
Steps/code to reproduce the bug:
importoutlinesregex=r"((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)"model=outlines.models.transformers("stabilityai/stablelm-2-zephyr-1_6b")
prompt="What is the IP address of the Google DNS servers? "generator=outlines.generate.regex(
model,
regex,
)
structured=generator(prompt, max_tokens=30)
print(structured)
model=outlines.models.transformers("microsoft/phi-2")
generator=outlines.generate.regex(
model,
regex,
)
structured=generator(prompt, max_tokens=30)
print(structured)
Describe the issue as clearly as possible:
https://github.com/outlines-dev/outlines/blob/4f8433d8d6633b0780c3a6c27981f9adffbe49f5/outlines/fsm/guide.py#L115
The cached function actually depends on the regex and the tokenizer. The tokenizer is not a parameter of the function, though, which leads to cached state maps being shared across different tokenizers, which leads to errors.
Steps/code to reproduce the bug:
Expected result:
Error message:
No response
Outlines/Python version information:
Version information
Context for the issue:
No response
The text was updated successfully, but these errors were encountered: