41 lines
878 B
Markdown
41 lines
878 B
Markdown
|
|
---
|
||
|
|
tags:
|
||
|
|
- text-to-sql
|
||
|
|
- education
|
||
|
|
- local-first
|
||
|
|
- llama-cpp
|
||
|
|
- duckdb
|
||
|
|
- gguf
|
||
|
|
- qwen
|
||
|
|
- qlora
|
||
|
|
language: en
|
||
|
|
license: apache-2.0
|
||
|
|
pipeline_tag: text-generation
|
||
|
|
---
|
||
|
|
|
||
|
|
# LFED — Qwen2.5-Coder-7B Text-to-SQL (GGUF)
|
||
|
|
|
||
|
|
Fine-tuned on Q4_K_M for duckdb SQL generation from natural-language
|
||
|
|
questions about school district data (enrollment, attendance, chronic absenteeism).
|
||
|
|
|
||
|
|
**Base model**: Qwen2.5-Coder-7B-Instruct
|
||
|
|
**Fine-tuning**: Unsloth QLoRA (r=16, alpha=16) on ~1,200 synthetic NL→SQL pairs
|
||
|
|
**Format**: GGUF Q4_K_M (~4.4 GB)
|
||
|
|
**Use with**: llama.cpp, Ollama, LM Studio
|
||
|
|
|
||
|
|
## Usage
|
||
|
|
|
||
|
|
```python
|
||
|
|
from llama_cpp import Llama
|
||
|
|
|
||
|
|
llm = Llama(
|
||
|
|
model_path="lfed-qwen2.5-coder-7b-sql-Q4_K_M.gguf",
|
||
|
|
n_ctx=4096,
|
||
|
|
)
|
||
|
|
```
|
||
|
|
|
||
|
|
## Schema
|
||
|
|
|
||
|
|
- `enrollment(school_year, school_name, grade_level, student_count)`
|
||
|
|
- `attendance(student_id, school_name, school_year, absence_count, is_chronically_absent)`
|