SQLCoder-7B
Property | Value |
---|---|
Base Model | Mistral-7B |
License | CC BY-SA 4.0 |
Language | English |
Task | Text-to-SQL Generation |
What is SQLCoder-7B?
SQLCoder-7B is a specialized language model designed to convert natural language questions into SQL queries. Built on the Mistral-7B architecture, it achieves remarkable 71% accuracy on novel datasets, surpassing GPT-3.5-turbo and competing with leading commercial models. The model was trained on over 20,000 human-curated questions across 10 different database schemas.
Implementation Details
The model has been optimized for various hardware configurations, supporting both full precision and quantized versions. It can run on consumer GPUs with 20GB+ memory, including RTX 4090, RTX 3090, and Apple M2 Pro/Max/Ultra chips. The model supports bfloat16, 8-bit, and 4-bit quantization for efficient deployment.
- Trained on 20,000+ curated questions
- Supports multiple quantization options
- Tested on A100 40GB GPU
- Compatible with transformers library
Core Capabilities
- Date handling queries: 64% accuracy
- Group by operations: 82.9% accuracy
- Order by operations: 74.3% accuracy
- Complex ratio calculations: 54.3% accuracy
- Join operations: 74.3% accuracy
- Where clause queries: 74.3% accuracy
Frequently Asked Questions
Q: What makes this model unique?
SQLCoder-7B stands out for its ability to match and sometimes exceed the performance of commercial models like GPT-3.5-turbo in SQL generation tasks, while being open-source and freely available for commercial use under the CC BY-SA 4.0 license.
Q: What are the recommended use cases?
The model excels in converting natural language questions into SQL queries, making it ideal for database query interfaces, data analysis tools, and business intelligence applications where natural language interaction with databases is required.