Downloads · 30 days
17
6% of all-time downloads
saadxsalman/SS-350M-SQL-Strict-GGUF
SS-350M-SQL-Strict-GGUF is a machine learning model from saadxsalman. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for llama.cpp. The card lists the license as apache-2.0.
This repository contains the GGUF quantization of SS-350M-SQL-Strict.
Downloads · 30 days
17
6% of all-time downloads
All-time downloads
263
Public
Repo size
379 MB
Likes
0
Public
Click a slice to open those files.
.gguf379 MB · 100%
From the Hugging Face model README
This repository contains the GGUF quantization of SS-350M-SQL-Strict.
SS-350M-SQL-Strict-GGUF is a specialized, ultra-lightweight Small Language Model (SLM) optimized for Text-to-SQL translation on edge devices. Built upon the LiquidAI LFM2.5-350M architecture, this model is engineered for "Strict" output: it generates only raw SQL code, eliminating conversational filler, explanations, or Markdown formatting.
llama.cppTo ensure the "Strict" behavior and prevent hallucinations, you must follow the ChatML prompt format.
<|im_start|>system
You are a SQL translation engine. Return ONLY raw SQL. Schema: {YOUR_SCHEMA}<|im_end|>
<|im_start|>user
{YOUR_QUESTION}<|im_end|>
<|im_start|>assistant
System: Table 'employees' (id, name, department, salary)
User: Find the total salary of the 'Sales' department.
SELECT SUM(salary) FROM employees WHERE department = 'Sales';
You can run this model locally using the following command:
./llama-cli -m SS-350M-SQL-Strict.Q8_0.gguf \
-p "<|im_start|>system\nYou are a SQL engine. Return ONLY raw SQL. Schema: Table 'inventory' (item, quantity)\n<|im_end|>\n<|im_start|>user\nHow many items are in stock?\n<|im_end|>\n<|im_start|>assistant\n" \
--temp 0 \
-n 128
The base model was fine-tuned using 4-bit QLoRA on the Gretel Synthetic SQL dataset. A key differentiator in its training was the use of Completion-Only Loss masking, which focused 100% of the model's learning capacity on SQL syntax rather than prompt structure.
If you use this model or the underlying LFM architecture, please cite:
@article{saadsalman2026sqlstrict,
author = {Saad Salman},
title = {SS-350M-SQL-Strict: Edge-Optimized Text-to-SQL},
year = {2026}
}