GGUF
English
text-to-sql
sqlite
qwen3
unsloth
conversational

Qwen3-1.7B-SQL (GGUF)

Fine-tuned Qwen/Qwen3-1.7B (QLoRA r=16, 3 epochs via Unsloth) for generating raw SQLite queries from database schemas.

Benchmark (check.py)

Model Syntax Valid (sqlglot) Execution Match (SQLite)
Qwen3-1.7B-Q4_K_M (Base) 0/5 0/5
Qwen3-1.7B-Q4_K_M (Base with thinking filter) 3/5 3/5
Qwen3-1.7B-SQL.Q4_K_M (Fine-tuned) 5/5 4/5

Usage (llama-cpp-python)

from llama_cpp import Llama

llm = Llama(model_path="Qwen3-1.7B-SQL.Q4_K_M.gguf", n_ctx=4096, n_gpu_layers=-1)
resp = llm.create_chat_completion(
    messages=[
        {"role": "system", "content": "You are a SQL assistant.\nOutput only valid SQLite.\n\n<SCHEMA>"},
        {"role": "user", "content": "Select all columns for users older than 30."},
    ],
    temperature=0.0,
)
print(resp["choices"][0]["message"]["content"])
Downloads last month
115
GGUF
Model size
2B params
Architecture
qwen3
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for enji-hex/Qwen3-1.7b-SQL-GGUF

Finetuned
Qwen/Qwen3-1.7B
Quantized
(560)
this model

Dataset used to train enji-hex/Qwen3-1.7b-SQL-GGUF