Abdullahkousa2 commited on
Commit
9546d85
·
verified ·
1 Parent(s): d6bfc8b

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +34 -6
README.md CHANGED
@@ -1,10 +1,38 @@
1
  ---
2
- title: Sqlforge
3
- emoji: 📊
4
- colorFrom: purple
5
- colorTo: blue
6
  sdk: docker
7
- pinned: false
 
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: SQLForge — Text-to-SQL
3
+ emoji: 🛠️
4
+ colorFrom: yellow
5
+ colorTo: indigo
6
  sdk: docker
7
+ app_port: 8000
8
+ pinned: true
9
+ license: mit
10
+ short_description: Fine-tuned text-to-SQL LLM with a self-correcting demo
11
  ---
12
 
13
+ # SQLForge 🛠️ Text-to-SQL
14
+
15
+ 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**.
16
+
17
+ This Space runs a **Qwen2.5-Coder-1.5B** model fine-tuned with QLoRA on the [Spider](https://yale-lily.github.io/spider) benchmark.
18
+
19
+ | | Execution accuracy (full Spider dev set) |
20
+ |---|:---:|
21
+ | Base model (zero-shot) | 57.45% |
22
+ | **Fine-tuned (SQLForge)** | **65.57%** — **+8.1 pts** |
23
+
24
+ ## How to use
25
+
26
+ 1. Pick one of the example databases.
27
+ 2. Click an example question or type your own.
28
+ 3. Hit **Generate SQL** — you'll see the query, the live results, and (on hard questions) the self-correction trace.
29
+
30
+ > ⏱️ 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.
31
+
32
+ ## Links
33
+
34
+ - 💻 **Source & training pipeline:** [github.com/abdullahkousa2/sqlforge](https://github.com/abdullahkousa2/sqlforge)
35
+ - 📦 **Library:** `pip install sqlforge`
36
+ - 📈 **Experiment tracking:** [Weights & Biases](https://wandb.ai/akousa360-arab-international-university-/sqlforge-text2sql)
37
+
38
+ Built with QLoRA · 🤗 Transformers · PEFT · FastAPI. Evaluated with real execution accuracy, not string matching.