Grounded SQL / Run it Yourself
bring your own data
Run it yourself, on your own database
Everything on this site runs from the public repo below. Clone it, get the data and the adapter, and point the Gradio UI at your own schema instead of the demo's.
Before you start
- Python 3.10+ and
pip install -r requirements.txt - An NVIDIA GPU for fine-tuning (QLoRA's 4-bit quantization fits on a single consumer GPU); inference falls back to CPU automatically if no CUDA device is found
- ~7GB free for the INT8-quantized model at serve time, more if you train your own adapter
Clone the repo
Full source: data pipeline, training, retrieval, evaluation, and serving.
Download the dataset
Training used the Spider benchmark: 8,659 question/SQL pairs across 166 databases. Grab the official release, or bring your own .sqlite files and schema.
Get the model
Download the fine-tuned LoRA adapter directly, or train your own overnight run from scratch on a single GPU.
Serve it
Redis-cached FastAPI backend, GPU-enabled via Docker Compose, or run the API directly.
Ask it anything
Launch the Gradio UI, paste your own schema (or upload your own .sqlite file) instead of the demo databases, and ask questions about your own data in plain English.