Framework for accelerated structured output generation from LLMs
Top 73.4% on sourcepulse
This Python framework accelerates structured output generation from LLMs by decomposing target schemas into atomic, independently generatable components. It targets developers and researchers needing to extract structured data from unstructured text, offering up to 10x speed improvements over naive methods and enhanced determinism.
How It Works
Super JSON Mode leverages the inherent parallelism of LLMs by treating each key-value pair in a target schema as a separate, independent generation task. Instead of prompting the LLM to generate an entire JSON object at once, it queries the model for each field individually, significantly reducing token usage and inference time. This approach exploits the fact that many schema fields do not depend on each other for their extraction.
Quick Start & Requirements
pip install super-json-mode
Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The framework currently does not support schemas with inter-field dependencies (e.g., chain-of-thought where a response depends on a prior thought). Future work aims to address this by incorporating dependency graph support.
1 year ago
1 week