SQLCoder-34B-Alpha
Property | Value |
---|---|
Author | Defog |
License | CC BY-SA 4.0 |
Language | English |
Framework | PyTorch |
What is sqlcoder-34b-alpha?
SQLCoder-34B-Alpha is a cutting-edge large language model specifically designed for converting natural language questions into SQL queries. Built on top of CodeLlama and fine-tuned with over 20,000 human-curated questions, this 34B parameter model has demonstrated superior performance, even surpassing GPT-4 in SQL generation tasks.
Implementation Details
The model is implemented using the PyTorch framework and requires substantial computational resources - typically a 4xA10 GPU setup with float16 weights. For more accessible deployment, 8-bit and 4-bit quantized versions are available for consumer GPUs with 20GB+ memory, including RTX 4090, RTX 3090, and Apple M2 Pro/Max/Ultra chips.
- Built on CodeLlama architecture with 34B parameters
- Trained on 10 different database schemas
- Supports text-generation-inference pipeline
- Achieves 84% accuracy on novel datasets
Core Capabilities
- Exceptional performance in date-related queries (80% accuracy)
- Superior handling of GROUP BY operations (94.3% accuracy)
- Strong JOIN query generation (82.9% accuracy)
- Advanced ratio calculations (74.3% accuracy)
- Complex WHERE clause construction (82.9% accuracy)
Frequently Asked Questions
Q: What makes this model unique?
SQLCoder-34B-Alpha stands out for its unprecedented accuracy in SQL generation, surpassing both GPT-4 and GPT-4-turbo on the sql-eval framework. It's particularly noteworthy that this performance is achieved on novel datasets not seen during training.
Q: What are the recommended use cases?
The model is ideal for converting natural language questions into SQL queries in production environments, database analysis, and automated query generation. It's particularly effective for complex queries involving multiple operations like joins, grouping, and date manipulations.