Merge branch 'main' into main

This commit is contained in:
rahul
2023-05-02 18:21:12 -04:00
committed by GitHub
3 changed files with 3 additions and 2 deletions
Vendored
BIN
View File
Binary file not shown.
+1
View File
@@ -2,3 +2,4 @@ __pycache__/
.venv
workspace.ipynb
dist
.DS_Store
+2 -2
View File
@@ -1,6 +1,6 @@
# Jsonformer: A Bulletproof Way to Generate Structured JSON from Language Models.
### Problem: Getting models to output structed JSON is hard
### Problem: Getting models to output structured JSON is hard
### Solution: Only generate the content tokens and fill in the fixed tokens
@@ -31,7 +31,7 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("databricks/dolly-v2-12b")
tokenizer = AutoTokenizer.from_pretrained("databricks/dolly-v2-12b")
schema = {
json_schema = {
"type": "object",
"properties": {
"name": {"type": "string"},