Run this model with HF Jobs

Run flintglass/PrismSQL-9B-v2 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-9B-v2. 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-9B-v2 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-9B-v2. 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-9B-v2. 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-9B-v2

Flintglass PrismSQL-9B-v2 sets a new #1 all-time live-SQLite execution accuracy record in the entire Flintglass PrismSQL stack (82.70% Overall / 76.25% Complex Hard SQL!) β€” built on Qwen/Qwen3.5-9B via pure on-policy Live-SQLite Execution-Verified GRPO (RLVR) combining our original PrismSQL training pool with our brand-new flintglass/PrismSQL-Hard-Corpus (4,843 dual-model verified analytical multi-table SQLite queries).

  • Beats Base Qwen/Qwen3.5-9B on BOTH Strictly Held-Out Suites (1,717 Live-SQLite Queries!):
    • PrismSQL Live-SQLite Test (1,000 queries): 80.00% -> 82.70% (+2.70 pts vs Base, +0.70 pts vs PrismSQL-9B v1 β€” beating even PrismSQL-8B 82.40% & PrismSQL-27B!)
    • Complex Hard SQL (joins, aggregations, subqueries, windows, set ops): 68.85% -> 76.25% (+7.40 pts vs Base, +1.74 pts vs v1!) in just 30.0 avg tokens!
    • OOD PrismSQL-Hard (717 hard analytical multi-table queries): 74.62% -> 77.68% (+3.06 pts vs Base, 100.0% raw executable SQL!)
  • GGUF Quantizations (llama.cpp / Ollama / LM Studio): flintglass/PrismSQL-9B-v2-GGUF (Q4_K_M, Q5_K_M, Q6_K, Q8_0 β€” live llama-cli verified!)
  • License: 100% Apache-2.0.

Benchmark Results (1,717 Live-SQLite Execution-Verified Queries)

1. PrismSQL Live-SQLite Test (1,000 Queries)

Model Overall Exec Acc Complex Hard SQL Single Join Multi-Join Aggregation Subqueries Window Funcs Avg Tok
Qwen/Qwen3.5-9B (Base) 80.00% 68.85% 75.0% 64.7% 68.8% 69.4% 40.9% 30.1
flintglass/PrismSQL-9B (v1) 82.00% 74.51% 80.7% 70.6% 75.9% 71.4% 45.5% 28.6
flintglass/PrismSQL-9B-v2 (Ours) 82.70% (+2.70) 76.25% (+7.40) 85.0% (+10.0) 70.6% (+5.9) 76.8% (+8.0) 73.5% (+4.1) 45.5% (+4.6) 30.0

2. OOD PrismSQL-Hard Analytical Benchmark (717 Multi-Table Queries)

Model Overall Exec Acc Multiple Joins Set Ops Complex Agg Correlated Subqueries Multi-Step CTEs Window Funcs Raw SQL
Qwen/Qwen3.5-9B (Base) 74.62% β€” β€” β€” β€” β€” β€” β€”
flintglass/PrismSQL-9B-v2 (Ours) 77.68% (+3.06) 86.25% 82.35% 76.27% 75.19% 74.17% 71.31% 100.0%

Quickstart (transformers & vLLM)

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

model_id = "flintglass/PrismSQL-9B-v2"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto", trust_remote_code=True)

messages = [
    {"role": "system", "content": "You are an expert SQL engineer. Given a SQLite database schema and a question, output ONLY the executable SQLite SQL query that answers the question. Do not include explanations."},
    {"role": "user", "content": "Database Schema:\nCREATE TABLE orders (id INT, customer_id INT, region TEXT, amount REAL, order_date TEXT);\n\nQuestion:\nRank the top 3 customers by total spend within each region using a window function."},
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True, enable_thinking=False)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
    out = model.generate(**inputs, max_new_tokens=256, do_sample=False)
print(tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))

Released under Apache-2.0 by Flintglass Labs.

Downloads last month
301
Safetensors
Model size
9B 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-9B-v2

Finetuned
Qwen/Qwen3.5-9B
Finetuned
(1,684)
this model
Quantizations
1 model

Collection including flintglass/PrismSQL-9B-v2