File size: 898 Bytes
a96237d 67d6ad1 a96237d 67d6ad1 a96237d 67d6ad1 a96237d 67d6ad1 a96237d 67d6ad1 a96237d 67d6ad1 a96237d 67d6ad1 a96237d 67d6ad1 a96237d 67d6ad1 a96237d 67d6ad1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | ---
base_model: Qwen/Qwen2.5-Coder-1.5B-Instruct
tags:
- text-to-sql
- qlora
- fine-tuned
---
# NL2SQL — Qwen2.5-Coder-1.5B fine-tuned for text-to-SQL
QLoRA fine-tuned version of Qwen2.5-Coder-1.5B-Instruct, trained on a custom
e-commerce schema to translate natural language questions into SQL queries.
- **Base model**: Qwen/Qwen2.5-Coder-1.5B-Instruct
- **Method**: QLoRA (4-bit), LoRA r=8, alpha=16
- **Training data**: ~270 examples (40 hand-written + 230 Groq-generated,
manually reviewed), grounded in a 6-table e-commerce schema
- **Eval**: execution accuracy against a live SQLite DB (see repo README)
## Usage
Prompt format:
\`\`\`
You are a SQL expert. Given a database schema and a question, write the SQL query that answers it.
### Schema:
{schema}
### Question:
{question}
### SQL:
\`\`\`
Full training code, dataset generation, and evaluation script: [github link] |