sqlforge / README.md
Abdullahkousa2's picture
Upload README.md with huggingface_hub
9546d85 verified
|
Raw
History Blame Contribute Delete
1.56 kB
metadata
title: SQLForge  Text-to-SQL
emoji: 🛠️
colorFrom: yellow
colorTo: indigo
sdk: docker
app_port: 8000
pinned: true
license: mit
short_description: Fine-tuned text-to-SQL LLM with a self-correcting demo

SQLForge 🛠️ — Text-to-SQL

Ask a question in plain English → SQLForge writes the SQL, runs it against a real SQLite database, and shows you the results. When a query crashes, it reads the database error and self-corrects.

This Space runs a Qwen2.5-Coder-1.5B model fine-tuned with QLoRA on the Spider benchmark.

Execution accuracy (full Spider dev set)
Base model (zero-shot) 57.45%
Fine-tuned (SQLForge) 65.57%+8.1 pts

How to use

  1. Pick one of the example databases.
  2. Click an example question or type your own.
  3. Hit Generate SQL — you'll see the query, the live results, and (on hard questions) the self-correction trace.

⏱️ This Space runs on CPU, so generation takes a few seconds per query (the model itself runs in ~1–3s on a GPU). Accuracy is identical — only speed differs.

Links

Built with QLoRA · 🤗 Transformers · PEFT · FastAPI. Evaluated with real execution accuracy, not string matching.