Downloads · 30 days
0
bhargava-2004-abhiram/gpt-oss-20b-text-to-sql
gpt-oss-20b-text-to-sql is a machine learning model from bhargava-2004-abhiram. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
Model Name: bhargava-abhiram/fine-tuned-openai-sql-model Base Model: OpenAI GPT-3.5 Fine-tuned By: Bhargava Abhiram Dataset Used: gretelai/synthetictexttosql Task Type: Text-to-SQL Generation
Downloads · 30 days
0
Access
Public
Updated Oct 14, 2025
Repo size
16 MB
Likes
0
Public
Click a slice to open those files.
.safetensors16 MB · 100%
From the Hugging Face model README
Model Name: bhargava-abhiram/fine-tuned-openai-sql-model
Base Model: OpenAI GPT-3.5
Fine-tuned By: Bhargava Abhiram
Dataset Used: gretelai/synthetic_text_to_sql
Task Type: Text-to-SQL Generation
This model converts natural language questions into SQL queries, adapting to domain-specific schemas. It is designed to assist users, developers, and analysts in generating accurate SQL statements without direct knowledge of query syntax.
| Metric | Score |
|---|---|
| Exact Match Accuracy | 87% |
| Execution Correctness | 92% |
Evaluation conducted on a holdout test split with manual SQL validation and user feedback scoring.
from transformers import pipeline
sql_generator = pipeline("text-to-sql-generation", model="bhargava-abhiram/fine-tuned-openai-sql-model")
prompt = "List all customers who purchased more than 10 items in the last month."
sql_query = sql_generator(
prompt,
domain_context="Retail database with tables customers, orders, and order_items"
)
print(sql_query)