A Quick Llama Text2SQL Evaluation Library
Project description
A Quick Library for Llama Text2SQL Accuracy Evaluation
This library provides a simple interface for evaluating the accuracy of Llama models on the Text2SQL task. It uses the BIRD DEV dataset and provides a simple API for running the evaluation pipeline using the Llama API.
Quick Start
Downloading Data
# Navigate to data directory
cd src/llama_text2sql_eval/data
# Run the download script
bash download_dev_unzip.sh
# This should create:
# - data/dev_20240627/dev.json
# - data/dev_20240627/dev_databases/
*** Setting up API Key
export LLAMA_API_KEY="your_key_here"
Running the Pipeline
python test.py
### API-based Testing
```python
# Simple test without running actual models
from llama_text2sql_eval import LlamaText2SQLEval
# Initialize the evaluator
evaluator = LlamaText2SQLEval()
# Run the complete pipeline
results = evaluator.run(
model="Llama-3.3-70B-Instruct",
api_key=os.getenv("LLAMA_API_KEY")
)
if results:
print(f"Overall Accuracy: {results['overall_accuracy']:.2f}%")
print(f"Simple: {results['simple_accuracy']:.2f}%")
print(f"Moderate: {results['moderate_accuracy']:.2f}%")
print(f"Challenging: {results['challenging_accuracy']:.2f}%")
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llama_text2sql_eval-0.0.0.1.tar.gz.
File metadata
- Download URL: llama_text2sql_eval-0.0.0.1.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4aad2b07a9a07f781f67de89ec801718afde2dda8a50b05c4ab490adccf7cc1b
|
|
| MD5 |
dd0a479a580578123cb0e1a8b4d5154e
|
|
| BLAKE2b-256 |
c4e08fe354f44d749dbbb07b209eabc76f8ff79e8a021199e1adb590e7ea417e
|
File details
Details for the file llama_text2sql_eval-0.0.0.1-py3-none-any.whl.
File metadata
- Download URL: llama_text2sql_eval-0.0.0.1-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9c55925dc0985deba98b4885c5e96a7de5db74c36d43a3a84be67238f696520
|
|
| MD5 |
752c2424b5ce912dee6f004baf012277
|
|
| BLAKE2b-256 |
3a260e539b895783da00e1904cebc9330556e989f275867210ca11980925bca2
|