Instructions to use Delinev/qwen3-1.7b-text-to-sql-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Delinev/qwen3-1.7b-text-to-sql-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-1.7B") model = PeftModel.from_pretrained(base_model, "Delinev/qwen3-1.7b-text-to-sql-lora") - Notebooks
- Google Colab
- Kaggle
Qwen3-1.7B Text-to-SQL LoRA
LoRA adapter for generating SQL from an English question and a database schema.
Requires Qwen3-1.7B.
Use its chat template with enable_thinking=False.
Trained with SFT for 2 epochs: learning rate 1e-4, LoRA rank 16,
alpha 32, dropout 0.05, and all-linear target modules.
Results
| Metric | Base model | With adapter |
|---|---|---|
| Normalized exact match | 25.23% | 77.98% |
| SQL parse rate | 99.80% | 99.80% |
Evaluated on 999 held-out examples; one invalid reference was excluded. SQLGlot normalization used the MySQL dialect. Exact match does not prove semantic equivalence.
Limitations
May add unnecessary conditions, omit required filters, or mishandle NULL. Review generated SQL before use.
Data attribution
Uses a deduplicated, filtered subset of sql-create-context by b-mc2, listed under CC BY 4.0. Examples were converted to chat messages. The dataset derives from WikiSQL and Spider; credit belongs to their respective authors.
- Downloads last month
- 30