artificialguybr/llama3-8b-sql-create-context
The artificialguybr/llama3-8b-sql-create-context model is a fine-tuned Llama 3 8B parameter language model developed by artificialguybr. It is specifically designed for text-to-SQL generation, converting natural language questions into SQL queries. This model excels at generating accurate SQL based on provided CREATE TABLE statements, preventing hallucination of column and table names. Its primary strength lies in enabling applications to generate SQL queries from natural language inputs where the database schema is known.
Loading preview...
Model Overview
The artificialguybr/llama3-8b-sql-create-context model is a specialized fine-tuned version of the NousResearch/Meta-Llama-3-8B base model. Developed by artificialguybr, this model is engineered for text-to-SQL generation, translating natural language questions into precise SQL queries.
Key Capabilities
- SQL Query Generation: Converts natural language inputs into SQL queries, leveraging a provided
CREATE TABLEstatement as context. - Schema-Awareness: Designed to prevent hallucination of column and table names by relying on explicit schema definitions.
- Contextual Understanding: Utilizes the
CREATE TABLEstatement to understand the database structure, enabling accurate query generation without needing actual data rows.
Training and Performance
The model was fine-tuned on the b-mc2/sql-create-context dataset, which combines examples from the WikiSQL and Spider datasets, totaling 78,577 examples. This dataset is specifically curated to enhance the model's ability to generate SQL queries accurately based on schema context. During training, it achieved a final validation loss of 0.0201.
Intended Uses
This model is ideal for applications requiring:
- Automated SQL query generation from natural language in environments with known table schemas.
- Integration into data analysis and visualization pipelines.
- Providing a robust foundation for further fine-tuning on specific SQL dialects or use cases.