Run this model with HF Jobs
Run flintglass/PrismSQL-8B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/flintglass/PrismSQL-8B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/flintglass/PrismSQL-8B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/flintglass/PrismSQL-8B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/flintglass/PrismSQL-8B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use flintglass/PrismSQL-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use flintglass/PrismSQL-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="flintglass/PrismSQL-8B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("flintglass/PrismSQL-8B") model = AutoModelForCausalLM.from_pretrained("flintglass/PrismSQL-8B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use flintglass/PrismSQL-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "flintglass/PrismSQL-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "flintglass/PrismSQL-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/flintglass/PrismSQL-8B
- SGLang
How to use flintglass/PrismSQL-8B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "flintglass/PrismSQL-8B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "flintglass/PrismSQL-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "flintglass/PrismSQL-8B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "flintglass/PrismSQL-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use flintglass/PrismSQL-8B with Docker Model Runner:
docker model run hf.co/flintglass/PrismSQL-8B
Flintglass PrismSQL-8B
#1 Overall Live-SQLite Execution-Verified Text-to-SQL Model in the Entire Flintglass Stack β at Consumer 8B Size (Qwen/Qwen3-8B, Apache-2.0)!
Trained via Pure On-Policy Live-SQLite Execution RLVR (PPO-Clipped GRPO) on Qwen/Qwen3-8B β every single candidate SQL rollout is executed live against an isolated SQLite database and verified by result-set equivalence (zero synthetic LLM labels, zero proprietary distillation).
Surpasses BOTH 27B and 35B-A3B on Overall Execution Accuracy (82.40%) AND Macro Complexity (65.67%) while running on any 8 GB consumer GPU / 16 GB laptop:
- Overall Live-SQLite Execution Accuracy (1,000 held-out schemas):
80.30%->82.40%(+2.10 pts β #1 Overall in Stack!) - Complex SQL Accuracy (
hard_sql):68.85%->74.07%(+5.22 pts!)Single Join:72.86%->81.43%(+8.57 pts!)Multiple Joins:47.06%->52.94%(+5.88 pts!)Aggregation:69.64%->74.55%(+4.91 pts!)Subqueries:75.51%->77.55%(+2.04 pts!)
- Macro Complexity Accuracy:
63.34%->65.67%(+2.33 pts!) - Concise Clean Raw SQL:
88.4%raw executable SQL at31.1avg tokens!
Part of the Flintglass Prism Open-Source Agent & RAG Stack Β· GGUF Quantizations:
flintglass/PrismSQL-8B-GGUF(Q4_K_M,Q5_K_M,Q6_K,Q8_0)
Verified Live-SQLite 1,000-Schema Leaderboard
Evaluated deterministically (temperature=0.0, enable_thinking=False) via live SQLite execution & exact result-set comparison across 1,000 strictly held-out schemas:
| Model | Params | Overall Exec | Complex SQL (hard_sql) |
Macro Complexity | Single Join | Multi-Join | Aggregation | Subqueries | Avg Tok |
|---|---|---|---|---|---|---|---|---|---|
Qwen/Qwen3-8B (Base) |
8B | 80.30% | 68.85% | 63.34% | 72.86% | 47.06% | 69.64% | 75.51% | 29.4 |
flintglass/PrismSQL-8B |
8B | 82.40% | 74.07% | 65.67% | 81.43% | 52.94% | 74.55% | 77.55% | 31.1 |
| Delta vs Base | β | +2.10 | +5.22 | +2.33 | +8.57 | +5.88 | +4.91 | +2.04 | +1.7 |
Quickstart (transformers)
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "flintglass/PrismSQL-8B"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, dtype=torch.bfloat16, device_map="auto").eval()
messages = [
{"role": "system", "content": "You are an expert SQLite Text-to-SQL engine. Given a SQLite schema and a question, output ONLY a single valid SQLite query with no explanation or markdown."},
{"role": "user", "content": "Schema:\nCREATE TABLE orders (id INT, customer_id INT, amount REAL, status TEXT);\nCREATE TABLE customers (id INT, name TEXT, region TEXT);\n\nQuestion: List the top 3 customers by total completed order amount."},
]
prompt = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True, enable_thinking=False)
inputs = tok(prompt, return_tensors="pt").to(model.device)
with torch.inference_mode():
out = model.generate(**inputs, max_new_tokens=256, do_sample=False)
print(tok.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
Training & Provenance
- Base Model:
Qwen/Qwen3-8B(Apache-2.0) - Method: Pure On-Policy Live-SQLite Execution RLVR (PPO-Clipped GRPO, 50 steps,
K=8rollouts, LoRAr=64merged cleanly into native BF16 weights) - License: Apache-2.0
- Downloads last month
- 263