llm-structured-output-benchmarks
Benchmark various LLM Structured Output frameworks: Instructor, Mirascope, Langchain, LlamaIndex, Fructose, Marvin, Outlines, etc on tasks like multi-label classification, named entity recognition, synthetic data generation, etc.
File Explorer
Download Latest Version (.zip)- .gitkeep
- multilabel_classification.pkl
- ner.pkl
- data_models.py
- generate_dataset.py
- __init__.py
- base.py
- fructose_framework.py
- instructor_framework.py
- llamaindex_framework.py
- lm_format_enforcer_framework.py
- marvin_framework.py
- metrics.py
- mirascope_framework.py
- modelsmith_framework.py
- outlines_framework.py
- vanilla_openai_framework.py
- FructoseFramework.pkl
- InstructorFramework.pkl
- LlamaIndexFramework.pkl
- LMFormatEnforcerFramework.pkl
- MarvinFramework.pkl
- MirascopeFramework.pkl
- ModelsmithFramework.pkl
- OutlinesFramework.pkl
- VanillaOpenAIFramework.pkl
- InstructorFramework.pkl
- LlamaIndexFramework.pkl
- LMFormatEnforcerFramework.pkl
- MarvinFramework.pkl
- MirascopeFramework.pkl
- VanillaOpenAIFramework.pkl
- InstructorFramework.pkl
- LlamaIndexFramework.pkl
- LMFormatEnforcerFramework.pkl
- MarvinFramework.pkl
- MirascopeFramework.pkl
- ModelsmithFramework.pkl
- OutlinesFramework.pkl
- VanillaOpenAIFramework.pkl
- .gitkeep
- .gitignore
- config.yaml
- LICENSE
- main.py
- README.md
- requirements.txt
# Installation Guide
1. Get the code
git clone https://github.com/stephenleo/llm-structured-output-benchmarks
Downloads the entire project code from GitHub to your computer.
cd llm-structured-output-benchmarks
Moves into the project folder you just downloaded.
2. Python
Easy RecommendedPrerequisites
- Multilabel classification: `python -m main generate-results`
Runs the Python script (or module).
- NER: `python -m main generate-results --task ner`
Runs the Python script (or module).
- Synthetic data generation: `python -m main generate-results --task synthetic_data_generation`
Runs the Python script (or module).
- Benchmarking test is run using synthetic data generated by running: `python -m data_sources.generate_dataset generate-multilabel-data`.
Runs the Python script (or module).
- The synthetic data is generated by sampling and combining rows from the base data to achieve multiple classes per row according to some distribution for num classes per row. See `python -m data_sources.generate_dataset generate-multilabel-data --help` for more details.
Runs the Python script (or module).
If it runs without errors and prints output in the terminal, it worked.
Pulled directly from this repo's README.
// repository documentation
Was this content helpful?
(0 ratings)
