Closed sigjhl closed 3 days ago
Same issue, using
# Best import of all time
from outlines import models, generate
import torch
# Load a language model into memory
model = models.transformers(
"microsoft/Phi-3-mini-4k-instruct",
device="cuda",
model_kwargs={"torch_dtype": torch.bfloat16},
)
# Choices
choices = ["Smith", "Jones"]
# Generate a response
response = generate.choice(model, choices)
print(response)
version info:
outlines==0.1.4
outlines_core==0.1.17
Describe the issue as clearly as possible:
On 0.1.4, generate.regex and generate.json fails to execute. This is a fresh conda env with only python==3.11, transformers, and outlines==0.14 installed.
Rolling back to 0.1.3 works as intended.
Steps/code to reproduce the bug:
Expected result:
Error message:
No response
Outlines/Python version information:
Version information
Context for the issue:
No response