Instructions to use KDDSTLC/lfed-qwen2.5-coder-14b-sql-lora-warehouse-r64 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use KDDSTLC/lfed-qwen2.5-coder-14b-sql-lora-warehouse-r64 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/qwen2.5-coder-14b-instruct-bnb-4bit") model = PeftModel.from_pretrained(base_model, "KDDSTLC/lfed-qwen2.5-coder-14b-sql-lora-warehouse-r64") - Notebooks
- Google Colab
- Kaggle
LFED SQL Assistant v2 โ Qwen2.5-Coder-14B-LoRA (Warehouse r=64)
Trained on the real DuckDB warehouse schema (main_core, main_analytics, main_staging โ ~30+ tables) for the Local First Education Data Framework.
Differences from v1
| v1 (r=32) | v2 (r=64) | |
|---|---|---|
| Training schema | 5 synthetic tables | Real warehouse (~30 tables) |
| LoRA rank | 32 | 64 |
| Adapter size | ~551 MB | ~1.1 GB |
| Target tables | students, enrollment, attendance, discipline, grades | main_core., main_analytics., main_staging.* |
Intended use
Converts natural-language questions about K-12 school data into read-only DuckDB SQL queries. Designed for the LFED Gradio app.
Training data
Synthetic NLโSQL pairs generated against the real warehouse schema using Qwen2.5-72B-Instruct-AWQ via vLLM on Modal A100-80GB. Every generated SQL was validated by executing it against the real DuckDB warehouse.
How to use
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base = "unsloth/qwen2.5-coder-14b-instruct-bnb-4bit"
adapter = "KDDSTLC/lfed-qwen2.5-coder-14b-sql-lora-warehouse-r64"
model = AutoModelForCausalLM.from_pretrained(base, device_map="auto")
model = PeftModel.from_pretrained(model, adapter, torch_device="cpu")
tokenizer = AutoTokenizer.from_pretrained(adapter)
Known limitations
- Trained on synthetic data against the real schema; may hallucinate columns
- Does not know about Rill metrics views (see project docs for the known gap)
- Requires CUDA for 4-bit inference (bnb); CPU/MPS needs a different base model
- Downloads last month
- 18
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support