Run this model with HF Jobs
Run flintglass/Inkling-2-Mini-PrismSQL-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/Inkling-2-Mini-PrismSQL-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/Inkling-2-Mini-PrismSQL-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/Inkling-2-Mini-PrismSQL-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.
Instructions to use flintglass/Inkling-2-Mini-PrismSQL-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use flintglass/Inkling-2-Mini-PrismSQL-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="flintglass/Inkling-2-Mini-PrismSQL-v2") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("flintglass/Inkling-2-Mini-PrismSQL-v2") model = AutoModelForMultimodalLM.from_pretrained("flintglass/Inkling-2-Mini-PrismSQL-v2", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use flintglass/Inkling-2-Mini-PrismSQL-v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "flintglass/Inkling-2-Mini-PrismSQL-v2" # 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/Inkling-2-Mini-PrismSQL-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/flintglass/Inkling-2-Mini-PrismSQL-v2
- SGLang
How to use flintglass/Inkling-2-Mini-PrismSQL-v2 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/Inkling-2-Mini-PrismSQL-v2" \ --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/Inkling-2-Mini-PrismSQL-v2", "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/Inkling-2-Mini-PrismSQL-v2" \ --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/Inkling-2-Mini-PrismSQL-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use flintglass/Inkling-2-Mini-PrismSQL-v2 with Docker Model Runner:
docker model run hf.co/flintglass/Inkling-2-Mini-PrismSQL-v2
Flintglass Inkling-2-Mini-PrismSQL-v2
Pure On-Policy Live-SQLite Execution-Verified Text-to-SQL RLVR v2 on Apache-2.0 thinkingmachines/Inkling-2-Mini (26.4B Looped MoE) β delivering a 6-for-6 blowout sweep on OOD PrismSQL-Hard (64.99% -> 90.52%, +25.53 pts!!) including +47.54 pts on Window Functions (45.08% -> 92.62%), +28.81 pts on Complex Aggregation, +25.00 pts on Multi-Step CTEs, 99.3% raw executable SQL (+24.0 pts), -40% fewer output tokens, and 85.26% 2-Benchmark Average across 1,717 live SQLite tasks (+14.01 pts over Base)!
Part of the Flintglass Prism Open-Source Agent & RAG Stack Β· Verified GGUFs:
flintglass/Inkling-2-Mini-PrismSQL-v2-GGUF(17 GB Q4_K_M,22 GB Q6_K,613 MB mmproj) Β· Standalone LoRA: Included inlora/Β· Upgrades:flintglass/Inkling-2-Mini-PrismSQL
Verified 1-to-1 Live-SQLite Execution Results (1,717 Strictly Held-Out Tasks)
Every prediction is executed inside an isolated in-memory SQLite engine against the table DDL and seed rows, and verified by normalized result-set equivalence against gold SQL (temperature=0, reasoning_effort=0.0, zero LLM-as-a-judge):
1. Summary Comparison (1,717 Live SQLite Tasks)
| Benchmark Suite | Tasks | Inkling-2-Mini (Base) |
Inkling-2-Mini-PrismSQL-v2 |
Delta |
|---|---|---|---|---|
2-Benchmark Avg (Orig + Hard) |
1,717 | 71.25% | 85.26% | +14.01 pts |
OOD PrismSQL-Hard (Enterprise Analytical) |
717 | 64.99% (700.8 tok) |
90.52% (422.7 tok) |
+25.53 pts (-40% tok) |
OOD PrismSQL-Hard Macro (6 Cats) |
717 | 64.59% | 90.39% | +25.80 pts |
OOD PrismSQL-Hard Raw Executable SQL |
717 | 75.31% | 99.30% | +23.99 pts |
| Orig Held-Out Schemas (Overall Exec) | 1,000 | 77.50% (266.3 tok) |
80.00% (160.8 tok) |
+2.50 pts (-40% tok) |
| Orig Complex SQL (Non-Basic) | 459 | 67.10% | 70.59% | +3.49 pts |
| Orig Macro Complexity Avg (7 Cats) | 1,000 | 61.19% | 65.33% | +4.14 pts |
2. OOD PrismSQL-Hard 6-for-6 Analytical Sweep (717 Queries)
| Analytical SQL Category | Tasks | Inkling-2-Mini (Base) |
Inkling-2-Mini-PrismSQL-v2 |
Delta |
|---|---|---|---|---|
window_functions |
122 | 45.08% | 92.62% | +47.54 pts |
complex_aggregation |
118 | 47.46% | 76.27% | +28.81 pts |
cte_multi_step |
120 | 63.33% | 88.33% | +25.00 pts |
set_operations |
68 | 73.53% | 94.12% | +20.59 pts |
correlated_subqueries |
129 | 77.52% | 95.35% | +17.83 pts |
multiple_joins |
160 | 80.63% | 95.63% | +15.00 pts |
Overall PrismSQL-Hard Exec Acc |
717 | 64.99% | 90.52% | +25.53 pts |
Quickstart (transformers)
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "flintglass/Inkling-2-Mini-PrismSQL-v2"
tok = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_id, 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, total REAL, created_at TEXT);\nCREATE TABLE customers(id INT, country TEXT);\n\nQuestion:\nTop 5 countries by total revenue with a running cumulative share using window functions."},
]
prompt = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True, reasoning_effort=0.0)
inputs = tok(prompt, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=512, do_sample=False)
print(tok.decode(out[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))
Training & Provenance
- Base Model:
thinkingmachines/Inkling-2-Mini(Apache-2.0, 26.4B looped MoE; all 432/432 Tinker LoRA tensors cleanly dequantized from NVFP4/MXFP8 -> FP32 -> native BF16 across 13 shards with standalone PEFT LoRA preserved inlora/). - Algorithm: Pure On-Policy PPO-Clipped GRPO (
r=32,alpha=32, 40 steps,K=8rollouts/prompt, live in-memory SQLite execution reward blending original PrismSQL schemas +PrismSQL-Hardenterprise analytical corpus). - License: Apache-2.0. Built by Flintglass Labs.
- Downloads last month
- -
Model tree for flintglass/Inkling-2-Mini-PrismSQL-v2
Base model
thinkingmachines/Inkling-2-Mini