Instructions to use saadxsalman/SS-350M-SQL-Strict-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use saadxsalman/SS-350M-SQL-Strict-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="saadxsalman/SS-350M-SQL-Strict-GGUF", filename="SS-350M-SQL-Strict.Q8_0.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use saadxsalman/SS-350M-SQL-Strict-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf saadxsalman/SS-350M-SQL-Strict-GGUF:Q8_0 # Run inference directly in the terminal: llama-cli -hf saadxsalman/SS-350M-SQL-Strict-GGUF:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf saadxsalman/SS-350M-SQL-Strict-GGUF:Q8_0 # Run inference directly in the terminal: llama-cli -hf saadxsalman/SS-350M-SQL-Strict-GGUF:Q8_0
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf saadxsalman/SS-350M-SQL-Strict-GGUF:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf saadxsalman/SS-350M-SQL-Strict-GGUF:Q8_0
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf saadxsalman/SS-350M-SQL-Strict-GGUF:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf saadxsalman/SS-350M-SQL-Strict-GGUF:Q8_0
Use Docker
docker model run hf.co/saadxsalman/SS-350M-SQL-Strict-GGUF:Q8_0
- LM Studio
- Jan
- Ollama
How to use saadxsalman/SS-350M-SQL-Strict-GGUF with Ollama:
ollama run hf.co/saadxsalman/SS-350M-SQL-Strict-GGUF:Q8_0
- Unsloth Studio new
How to use saadxsalman/SS-350M-SQL-Strict-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for saadxsalman/SS-350M-SQL-Strict-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for saadxsalman/SS-350M-SQL-Strict-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for saadxsalman/SS-350M-SQL-Strict-GGUF to start chatting
- Pi new
How to use saadxsalman/SS-350M-SQL-Strict-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf saadxsalman/SS-350M-SQL-Strict-GGUF:Q8_0
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "saadxsalman/SS-350M-SQL-Strict-GGUF:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use saadxsalman/SS-350M-SQL-Strict-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf saadxsalman/SS-350M-SQL-Strict-GGUF:Q8_0
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default saadxsalman/SS-350M-SQL-Strict-GGUF:Q8_0
Run Hermes
hermes
- Docker Model Runner
How to use saadxsalman/SS-350M-SQL-Strict-GGUF with Docker Model Runner:
docker model run hf.co/saadxsalman/SS-350M-SQL-Strict-GGUF:Q8_0
- Lemonade
How to use saadxsalman/SS-350M-SQL-Strict-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull saadxsalman/SS-350M-SQL-Strict-GGUF:Q8_0
Run and chat with the model
lemonade run user.SS-350M-SQL-Strict-GGUF-Q8_0
List all available models
lemonade list
SS-350M-SQL-Strict-GGUF
This repository contains the GGUF quantization of SS-350M-SQL-Strict.
Model Summary
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.
Technical Specifications
- Architecture: Liquid Foundation Model (LFM) 2.5
- Parameters: 350 Million
- Quantization: Q8_0 (8-bit)
- Model Size: ~370 MB
- Context Length: 32,768 tokens
- Inference Engine: Optimized for
llama.cpp
Key Features
- Zero Filler: Returns raw SQL queries immediately (no "Sure, here is your code").
- High Speed: Leverages LFM's linear-complexity architecture for near-instantaneous generation on CPUs.
- Low Footprint: Runs comfortably on devices with < 1GB RAM, making it ideal for mobile or embedded database interfaces.
Prompting Specification (ChatML)
To ensure the "Strict" behavior and prevent hallucinations, you must follow the ChatML prompt format.
Template
<|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
Example Input
System: Table 'employees' (id, name, department, salary)
User: Find the total salary of the 'Sales' department.
Example Output
SELECT SUM(salary) FROM employees WHERE department = 'Sales';
Local Deployment with llama.cpp
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
Training Logic
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.
Limitations & Dialect
- Dialect: Defaulted to Standard SQL.
- Complexity: Best suited for schemas with fewer than 20 tables.
- Reasoning: This is a translation engine; it does not "think" step-by-step or explain its logic. If the input is ambiguous, it will attempt the most likely SQL translation.
Citation
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}
}
- Downloads last month
- 141
8-bit
Model tree for saadxsalman/SS-350M-SQL-Strict-GGUF
Base model
LiquidAI/LFM2.5-350M-Base