b-mc2/sql-create-context
Viewer • Updated • 78.6k • 10.1k • 503
How to use rishhh/schemasage-sql-qwen3-4b-longer-200 with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-4B-Instruct-2507")
model = PeftModel.from_pretrained(base_model, "rishhh/schemasage-sql-qwen3-4b-longer-200")Experimental 200-step QLoRA adapter for SchemaSage-SQL. This is an evaluation-stage artifact, not a production release.
Qwen/Qwen3-4B-Instruct-2507a10g-large6a0ccb203aba298b21d143ad64 held-out examples from gretelai/synthetic_text_to_sql test.
| Metric | Value |
|---|---|
| Exact match | 0.2812 |
| Normalized exact match | 0.2969 |
| SQL parse validity | 1.0000 |
| Schema adherence rate | 0.9219 |
| Hallucinated table rate | 0.0312 |
| Hallucinated column rate | 0.0781 |
| Unsafe query rate | 0.0938 |
| Execution accuracy | 0.8750 |
| Execution comparable examples | 40 |
| Mean generated SQL length | 13.34 |
| Mean latency seconds | 5.99 |
The longer run improves exact match and execution accuracy over the 10-step smoke adapter, but it is not release-ready because unsafe query rate regressed. The training data includes destructive SQL targets, and the model learned to imitate them. Next stage should clean or transform unsafe examples into refusals before additional training.
See reports/longer_adapter_eval_analysis.md for detailed findings.
Base model
Qwen/Qwen3-4B-Instruct-2507