DuckDB-NSQL-7B-v0.1
Property | Value |
---|---|
Parameter Count | 6.74B |
Model Type | Text-to-SQL Generation |
Base Model | Llama-2-7B |
License | Llama2 |
Tensor Type | BF16 |
What is DuckDB-NSQL-7B-v0.1?
DuckDB-NSQL-7B is an advanced language model specifically designed for SQL generation tasks. Built on Meta's Llama-2 7B architecture, it has been extensively fine-tuned on 200,000 DuckDB text-to-SQL pairs, making it particularly effective at converting natural language queries into valid DuckDB SQL statements.
Implementation Details
The model leverages cross-entropy loss training on 80GB A100 GPUs, utilizing both data and model parallelism. It underwent 10 epochs of fine-tuning using a combination of synthetically generated queries and transpiled SQL from NSText2SQL dataset.
- Training data includes 200k synthetic pairs generated using Mixtral-8x7B-Instruct
- Implements DuckDB v0.9.2 documentation-guided training
- Utilizes sqlglot for SQL transpilation
- Supports comprehensive DuckDB SQL syntax, including extension commands
Core Capabilities
- Generates valid DuckDB SQL from natural language queries
- Handles complex table schemas and relationships
- Supports both basic SELECT statements and advanced SQL operations
- Compatible with official DuckDB extensions
- Optimized for short-hand DuckDB syntax
Frequently Asked Questions
Q: What makes this model unique?
Unlike traditional text-to-SQL models, DuckDB-NSQL-7B can generate any valid DuckDB SQL statement, not just SELECT queries. It's specifically optimized for DuckDB's syntax and features, making it highly specialized for this particular database system.
Q: What are the recommended use cases?
The model is ideal for developers and analysts who need to quickly convert natural language questions into DuckDB SQL queries, particularly when working with complex schemas or requiring DuckDB-specific optimizations.