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.

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 at 31.1 avg 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=8 rollouts, LoRA r=64 merged cleanly into native BF16 weights)
  • License: Apache-2.0
Downloads last month
270
Safetensors
Model size
8B params
Tensor type
BF16
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for flintglass/PrismSQL-8B

Finetuned
Qwen/Qwen3-8B
Finetuned
(2,472)
this model
Quantizations
1 model

Collection including flintglass/PrismSQL-8B