Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom json schema - ASAP #290

Open
crazycoderF12 opened this issue Feb 20, 2024 · 2 comments
Open

custom json schema - ASAP #290

crazycoderF12 opened this issue Feb 20, 2024 · 2 comments

Comments

@crazycoderF12
Copy link

is it possible to train the model to generate structured output with custom json schema? Pleases help me ASAP

@crazycoderF12
Copy link
Author

@felixvor

@felixvor
Copy link

It would be very interesting to see how a complicated json structure can impact the model performance, but to make it short: Sure it is possible, you can pretty much fine tune the model to generate any text you want!

In pre-training the model only learns to generate OCR text strings based on images (no json at all), the example notebooks then use the pre-trained weights to fine-tune the model on various schemas (including json) for classification, entity extraction and question answering. I would recommend to follow the conventions of converting your json into an html-like structure and converting from/to json before/after calling the model but all of that is covered in the examples as well.

Good luck with your experiments, keep us posted about your results!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants