distil-labs/distil-text2sql: Query your data in plain English with a fine-tuned Text2SQL model
A fine-tuned 4B parameter language model converts natural language questions into SQL queries with 80% accuracy, matching a 685B teacher model while being 170x smaller. The model runs locally without API dependencies, supports CSV data querying, and includes a 0.6B variant for edge deployment. Training used synthetic data expansion from 50 seed examples to 10,000 examples, achieving better exact match scores than the teacher model. Available in multiple formats including 4-bit quantized GGUF at 2.5GB for local deployment.