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
There are two ways to use Outlines Structured Generation with HuggingFace Transformers:
36
+
-1) Use Outlines generation wrapper, `outlines.models.transformers`
37
+
-2) Use `OutlinesLogitsProcessor` with `transformers.AutoModelForCausalLM`
38
+
39
+
Outlines supports a myriad of logits processors for structured generation. In these example, we will use the `RegexLogitsProcessor` which guarantees generated text matches the specified pattern.
prompt="Instruct: You are a leading role play gamer. You have seen thousands of different characters and their attributes.\nPlease return a JSON object with common attributes of an RPG character. Give me a character description\nOutput:"
0 commit comments