Instructions to use runelab-ai/Hati-Glint-SQL-9B-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use runelab-ai/Hati-Glint-SQL-9B-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="runelab-ai/Hati-Glint-SQL-9B-v1") 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("runelab-ai/Hati-Glint-SQL-9B-v1") model = AutoModelForMultimodalLM.from_pretrained("runelab-ai/Hati-Glint-SQL-9B-v1", 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 runelab-ai/Hati-Glint-SQL-9B-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "runelab-ai/Hati-Glint-SQL-9B-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "runelab-ai/Hati-Glint-SQL-9B-v1", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/runelab-ai/Hati-Glint-SQL-9B-v1
- SGLang
How to use runelab-ai/Hati-Glint-SQL-9B-v1 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 "runelab-ai/Hati-Glint-SQL-9B-v1" \ --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": "runelab-ai/Hati-Glint-SQL-9B-v1", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "runelab-ai/Hati-Glint-SQL-9B-v1" \ --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": "runelab-ai/Hati-Glint-SQL-9B-v1", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use runelab-ai/Hati-Glint-SQL-9B-v1 with Docker Model Runner:
docker model run hf.co/runelab-ai/Hati-Glint-SQL-9B-v1
- Hati Glint SQL (Hati-Glint-SQL-9B-v1) - Turkish Text-to-SQL Model / Tรผrkรงe SQL Modeli
Hati Glint SQL (Hati-Glint-SQL-9B-v1) - Turkish Text-to-SQL Model / Tรผrkรงe SQL Modeli
Ask in Turkish, get SQL that runs. ยท Veritabanฤฑnฤฑza Tรผrkรงe sorun, รงalฤฑลan SQL sorgusu alฤฑn.
The strongest open Turkish text-to-SQL model under 10B in our evaluation, fine-tuned from Qwen3.5-9B by RuneLab.ai.
- Model Page & Interactive Benchmarks (TR): Hati Glint SQL: Tรผrkรงe SQL Modeli (Tรผrkรงe Text-to-SQL) - runelab.ai
- Model Page & Interactive Benchmarks (EN): Hati Glint SQL: Turkish Text-to-SQL Model - runelab.ai
- Interactive Explainer (TR): Veritabanฤฑnฤฑza Tรผrkรงe Sorun (Canlฤฑ Text-to-SQL ลekilleriyle)
- Interactive Explainer (EN): Ask Your Database in Turkish (With Live Interactive Figures)
- Tรผrkรงe รถzet iรงin: Tรผrkรงe SQL Modeli รzeti
Summary
Hati Glint SQL (Hati-Glint-SQL-9B-v1) is a 9B open-weight Turkish text-to-SQL model (Tรผrkรงe SQL modeli / metinden SQL รผretme modeli) that turns Turkish and English natural-language questions into SQLite queries that run. It is built for AI agents, business intelligence (BI), and on-premise deployment, and it is the top-scoring open Turkish text-to-SQL model under 10B among the models we tested on TURSpider and BIRDTurk.
It is more than a SQL specialist. It keeps the strong Turkish ability of its base model, Qwen3.5-9B, so it works as a general Turkish assistant, and it calls tools more accurately than the base model on tool families it never saw in training, which matters for business-process automation. It is also token-efficient: it answers directly in about 38 to 53 tokens, and when it thinks it uses about 3 to 3.6 times fewer reasoning tokens than the base model. Short outputs keep an agent's context small and its responses fast (more on this below).
- Highest score on both Turkish text-to-SQL benchmarks (TURSpider and BIRDTurk) among the open models under 10B we tested, in both direct-answer and reasoning mode.
- +9.1 / +7.2 execution accuracy over its base model (TURSpider 64.1 โ 73.2; BIRDTurk 40.1 โ 47.3), direct answers.
- With thinking: 76.8 on TURSpider and 54.4 on BIRDTurk, using about 3โ3.6ร fewer reasoning tokens than the base model.
- Agent mode with execution feedback: 77.9 / 55.4.
- Better tool calling: 76.9 โ 78.9 exact-call accuracy (+2.0) on 1,000 Turkish tool calls from tool families not seen in training.
- General Turkish and English ability stays close to the base model (TurkishMMLU 65.11, Belebele-TR 86.22, XCOPA-TR 91.60); English Spider improves by +4.8.
Thinking mode: about 3ร shorter, and more questions right. With thinking on, Hati Glint SQL scores 76.8 / 54.4 (TURSpider / BIRDTurk) against 71.2 / 48.1 for the base model, while writing 3 to 3.6 times fewer tokens (299 vs 1,089 on TURSpider, 522 vs 1,582 on BIRDTurk). For a company, that means faster answers and roughly a third of the generated tokens, and so of the decoding work, per question. (Counted on output tokens; the prompt is the same size for both models.)
Why it matters
- Turkish data questions, answered in Turkish. Companies want to ask their data questions in Turkish, but most text-to-SQL models are trained on English and lose accuracy on Turkish questions and Turkish table and column names.
- Your data stays with you. Customer, financial and HR data often can't leave the company (for example under KVKK). A 9B model runs on a single GPU in your own infrastructure, with no external API.
- Token efficiency means speed, cost and quality. Agents make many calls, and every token an agent reads or writes stays in its context window next to the schema, the tool results and the conversation history. A model that reasons in about 522 tokens instead of about 1,582 (BIRDTurk, thinking mode) leaves more room for what matters, answers sooner, costs less, and a shorter, less cluttered context generally helps a model stay on task. Direct mode answers immediately; thinking mode covers harder questions with 3โ3.6ร fewer reasoning tokens than the base model.
- One model for the whole workflow. The same model chats in Turkish, writes SQL and calls tools, so a business agent doesn't need three models.
- Open and adaptable. It's open-weight and Apache 2.0, so teams can deploy, inspect and fine-tune it on their own schemas.
Intended use
- Turkish natural-language questions over company databases (BI, reporting, analytics agents).
- The SQL step in personal and business AI agents.
- On-premise deployment where data must not leave the company.
- General Turkish assistant work: chat, question answering, writing and translation help, where a 9B on-premise model is enough. It keeps the Turkish ability of Qwen3.5-9B (see General ability).
- Tool and function calling in business processes: agents that look up stock, create tickets, update records or trigger workflows in ERP, CRM, finance, HR and support systems.
Out-of-scope use
- Running generated SQL with write permissions or without review (use read-only connections).
- SQL dialects other than SQLite, which weren't evaluated in this release.
- Access control or security decisions.
- Tasks that need current events or specialist knowledge beyond what a 9B model holds, unless you add retrieval.
Key Results
Click a chart to enlarge it, or explore the interactive benchmark charts on runelab.ai/en/models/hati-glint-sql (Tรผrkรงe sayfa). Scores and confidence intervals are in the Evaluation section below.
Why the name
In Norse mythology, Hati is the wolf that chases the moon across the sky. The Hati & Skรถll model family by RuneLab follows the moon from its first glint to full moon: Glint, Crescent, Halfmoon and Fullmoon. Glint SQL is the Glint tier, specialised for SQL.
Quickstart
Install (tested on Windows 11 and Ubuntu 24.04 with an NVIDIA GPU that has about 17 GB free for the bf16 weights):
pip install torch --index-url https://download.pytorch.org/whl/cu128 # CUDA build; a bare `pip install torch` can install a CPU-only wheel on Windows
pip install "transformers==5.19.0" "accelerate==1.15.0" huggingface_hub
For faster generation, see Faster generation (optional) below: two extra packages make transformers about 16 to 20% faster in our test.
1. The easiest way: a chat pipeline
Hati Glint SQL is a regular chat model. A few lines are enough to talk to it in Turkish or English:
from transformers import pipeline
pipe = pipeline(
"text-generation",
model="runelab-ai/Hati-Glint-SQL-9B-v1",
dtype="bfloat16",
device_map="cuda",
)
messages = [
{"role": "user", "content": "Merhaba! Tรผrkiye'nin baลkenti neresidir?"},
]
result = pipe(messages, max_new_tokens=200, do_sample=False)
print(result[0]["generated_text"][-1]["content"]) # the assistant's reply
The sections below load the model with AutoModelForCausalLM instead; if you continue in the same session, free the pipeline first (del pipe) so two copies don't share your GPU.
2. Text-to-SQL
The model was trained with one prompt: the database as compact CREATE TABLE text with up to three sample values per column, then the question (and, optionally, a BIRD-style Evidence: line). The agent/ folder of this repository builds that prompt from any SQLite file, so you don't write it by hand.
import sqlite3, sys, torch
from huggingface_hub import snapshot_download
from transformers import AutoModelForCausalLM, AutoTokenizer
REPO = "runelab-ai/Hati-Glint-SQL-9B-v1"
sys.path.insert(0, snapshot_download(REPO, allow_patterns=["agent/*"]) + "/agent") # prompt builder and agent wrapper shipped in this repo
from hati_agent.sqlprompt import build_messages, extract_sql
# a small Turkish example database
con = sqlite3.connect("okul.sqlite")
con.executescript("""
DROP TABLE IF EXISTS not_defteri; DROP TABLE IF EXISTS ogrenci; -- safe to run twice
CREATE TABLE ogrenci (ogrenci_no INTEGER PRIMARY KEY, ad TEXT, sinif INTEGER, sehir TEXT);
CREATE TABLE not_defteri (ogrenci_no INTEGER, ders TEXT, not_degeri REAL, FOREIGN KEY (ogrenci_no) REFERENCES ogrenci (ogrenci_no));
INSERT INTO ogrenci VALUES (1, 'Ayลe', 3, 'ฤฐzmir'), (2, 'Mehmet', 4, 'Ankara'), (3, 'Elif', 3, 'ฤฐstanbul');
INSERT INTO not_defteri VALUES (1, 'Matematik', 85), (2, 'Matematik', 70), (3, 'Fizik', 92);
""")
con.commit(); con.close()
tok = AutoTokenizer.from_pretrained(REPO)
model = AutoModelForCausalLM.from_pretrained(REPO, dtype=torch.bfloat16, device_map="cuda") # bf16, about 17 GB
question = "Matematik dersinde 80'den yรผksek not alan รถฤrencilerin adlarฤฑ nelerdir?"
messages = build_messages("okul.sqlite", question) # add evidence="..." for BIRD-style external knowledge
# direct mode (default): the chat template renders thinking OFF; greedy decoding
text = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
enc = tok(text, return_tensors="pt").to(model.device)
out = model.generate(**enc, max_new_tokens=512, do_sample=False)
print(extract_sql(tok.decode(out[0, enc.input_ids.shape[1]:], skip_special_tokens=True)))
Output of the example above in our test run:
SELECT o.ad FROM ogrenci o JOIN not_defteri n ON o.ogrenci_no = n.ogrenci_no WHERE n.ders = 'Matematik' AND n.not_degeri > 80
What the model sees for this example
system: You are an expert SQL assistant. Given a SQLite database schema and a question (Turkish or English), write exactly one SQLite SELECT query that answers the question. Reply with the SQL query only: no explanation, no markdown.
user:
Database schema (SQLite):
CREATE TABLE ogrenci (ogrenci_no INTEGER PRIMARY KEY, ad TEXT /* 'Ayลe', 'Mehmet', 'Elif' */, sinif INTEGER, sehir TEXT /* 'ฤฐzmir', 'Ankara', 'ฤฐstanbul' */);
CREATE TABLE not_defteri (ogrenci_no INTEGER, ders TEXT /* 'Matematik', 'Fizik' */, not_degeri REAL, FOREIGN KEY (ogrenci_no) REFERENCES ogrenci(ogrenci_no));
Question: Matematik dersinde 80'den yรผksek not alan รถฤrencilerin adlarฤฑ nelerdir?
Thinking mode. Thinking is inherited from Qwen3.5-9B. Switch it on with enable_thinking=True and sample (temperature=0.6, top_p=0.95, top_k=20); the SQL is the text after </think>.
text = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True, enable_thinking=True) # thinking ON
enc = tok(text, return_tensors="pt").to(model.device)
out = model.generate(**enc, max_new_tokens=8192, do_sample=True, temperature=0.6, top_p=0.95, top_k=20)
answer = tok.decode(out[0, enc.input_ids.shape[1]:], skip_special_tokens=True).split("</think>")[-1] # only the text after </think> is the answer
print(extract_sql(answer))
3. Tool calling
Tools are passed through the chat template in the standard tools= argument; the model answers with a native Qwen3.5 tool call that your code parses and executes. This continues the session of section 2 (it reuses tok and model).
tools = [{"type": "function", "function": {"name": "stok_sorgula", "description": "Depodaki bir รผrรผnรผn stok adedini sorgular.",
"parameters": {"type": "object", "properties": {"urun_kodu": {"type": "string", "description": "รrรผn kodu"}, "depo": {"type": "string", "description": "Depo adฤฑ"}}, "required": ["urun_kodu"]}}}]
messages = [{"role": "user", "content": "ฤฐzmir deposunda KLV-204 kodlu รผrรผnden kaรง adet var?"}]
text = tok.apply_chat_template(messages, tools=tools, tokenize=False, add_generation_prompt=True)
enc = tok(text, return_tensors="pt").to(model.device)
out = model.generate(**enc, max_new_tokens=200, do_sample=False)
print(tok.decode(out[0, enc.input_ids.shape[1]:], skip_special_tokens=False)) # the tool call to execute
Output in our test run (a native Qwen3.5 tool call that your code parses and executes):
<tool_call>
<function=stok_sorgula>
<parameter=urun_kodu>
KLV-204
</parameter>
<parameter=depo>
ฤฐzmir
</parameter>
</function>
</tool_call>
4. vLLM
Tested with pip install vllm==0.31.0. Save it as a script: vLLM starts worker processes, so keep the __main__ guard. It uses the okul.sqlite created above.
import gc, sys
from huggingface_hub import snapshot_download
from transformers import AutoTokenizer
from vllm import LLM, SamplingParams
REPO = "runelab-ai/Hati-Glint-SQL-9B-v1"
sys.path.insert(0, snapshot_download(REPO, allow_patterns=["agent/*"]) + "/agent") # prompt builder shipped in this repo
from hati_agent.sqlprompt import build_messages, extract_sql
if __name__ == "__main__":
tok = AutoTokenizer.from_pretrained(REPO)
messages = build_messages("okul.sqlite", "Matematik dersinde 80'den yรผksek not alan รถฤrencilerin adlarฤฑ nelerdir?")
llm = LLM(REPO, dtype="bfloat16", max_model_len=12288) # same weights, batched serving
text = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) # direct mode
res = llm.generate([text], SamplingParams(temperature=0, max_tokens=512))
print(extract_sql(res[0].outputs[0].text))
# thinking mode: apply the template with enable_thinking=True and use
# SamplingParams(temperature=0.6, top_p=0.95, top_k=20, max_tokens=8192); keep the text after </think>
del llm; gc.collect() # lets vLLM's worker processes shut down, so the script exits
5. Agent mode: let the database correct the model
Real databases are full of surprises: a column that is named differently than you expected, an alias that doesn't exist, a function SQLite doesn't have. A model that can't see the database guesses; an agent that can see the error message doesn't have to. The hati_agent wrapper in this repository closes that loop:
- the model writes the SQL;
- the query runs in a read-only sandbox (a temporary copy of the database, a read-only connection, one SELECT or WITH statement, a 30 second timeout, at most 200 rows). Nothing that writes is ever executed;
- if it errors, times out or can't be extracted, the exact error message goes back to the model and it answers again, at most twice.
from hati_agent import HatiSQLAgent
agent = HatiSQLAgent(REPO, thinking=False, retries=2) # thinking=True for thinking mode
result = agent.ask("okul.sqlite", question, evidence=None)
print(result.sql, result.ok, result.rows, len(result.attempts)) # final SQL, did it run, rows, number of generations
Why we recommend it. Hati Glint SQL answers in a few dozen tokens, so a retry costs almost nothing: on average the loop adds only 2.3 (TURSpider) and 11.0 (BIRDTurk) tokens per question. In return, direct answers gain +1.0 and +2.6 points: the feedback fixed 10 and 40 questions and did not break any that were already right. With thinking on, it reaches 77.9 / 55.4. It needs no extra model, no fine-tuning and no extra GPU, and the generated query never touches your real data (it runs on a read-only temporary copy). If you are building an analytics agent on Turkish data, this is the setting we would start with. Results are in Agent mode and reasoning length.
Command line: python -m hati_agent.example --db okul.sqlite --question "..." [--thinking] (run from the agent/ folder). Six unit tests with a stub model run without a GPU: python -m unittest discover -s tests.
Memory and serving
The bf16 weights need about 16.8 GB of GPU memory. With vLLM 0.31.0 on one A100 80GB, a single request generated about 85 tokens per second, and 64 requests at once (each generating 256 tokens, greedy) reached about 3,700 output tokens per second. Batched thinking-mode generation on real questions, with long prompts and varied answer lengths, reached about 2,700 output tokens per second.
The first transformers load prints a few "falling back to its reference PyTorch implementation" messages: the optional causal-conv1d and flash-linear-attention kernels are not installed. Without them the model has the same quality and generation is slower; see Faster generation (optional). On Windows, set PYTHONIOENCODING=utf-8 before printing Turkish text.
Faster generation (optional)
By default transformers runs the linear-attention layers of Qwen3.5-based models in plain PyTorch, which is what the "falling back to its reference PyTorch implementation" messages say. Two optional packages provide fast kernels for those layers. transformers uses them automatically when they are installed, so your code does not change.
pip install flash-linear-attention # simple install
pip install causal-conv1d --no-build-isolation # optional: compiles from source and needs the CUDA toolkit (nvcc); about 9 minutes in our test
| Setup (NVIDIA A100 80GB, bf16, one stream, greedy) | Tokens per second | Change |
|---|---|---|
| No extra packages (default) | 21.8 | 0% |
flash-linear-attention |
25.2 | +16% |
flash-linear-attention and causal-conv1d |
26.1 | +20% |
Memory use does not change. In our checks the SQL answers and the tool call were identical with and without the kernels. Tested on Linux (Ubuntu 24.04, CUDA 12.8, transformers 5.19.0). vLLM brings its own kernels, so there is nothing extra to install for it.
Evaluation
Methodology. TURSpider (1,034 questions) and BIRDTurk (1,534 questions), the dev splits of the two Turkish text-to-SQL benchmarks; metric: execution accuracy (EX) with the official evaluators, greedy decoding, a single attempt, one shared harness for every model (same databases, scorers and execution limits). Scores in the comparison tables are followed by 95% confidence intervals. Direct means every model gets the same prompt and answers with SQL immediately; best setting means each model also gets its own official prompt or its thinking mode and its highest score is shown with the setting named. Thinking-mode rows use temperature=0.6, top_p=0.95, top_k=20 and score only the text after </think>. In this harness OmniSQL-7B and Arctic-Text2SQL-R1-7B reproduce their published English BIRD dev scores within 0.2 points. No question or database of these dev sets was used in training.
For an interactive step-by-step walkthrough of how Hati Glint SQL translates Turkish questions into SQLite queries and why the database computes the numbers, read Ask your database in Turkish (Veritabanฤฑnฤฑza Tรผrkรงe sorun).
Text-to-SQL results (execution accuracy)
| Setting | Benchmark | Qwen3.5-9B (base) | Hati Glint SQL | ฮ vs base |
|---|---|---|---|---|
| Direct | TURSpider | 64.12 | 73.21 | +9.09 |
| Direct | BIRDTurk | 40.09 | 47.26 | +7.17 |
| Thinking | TURSpider | 71.18 | 76.79 | +5.61 |
| Thinking | BIRDTurk | 48.11 | 54.37 | +6.26 |
| Agent mode, direct + feedback | TURSpider | 66.63 | 74.18 | +7.54 |
| Agent mode, direct + feedback | BIRDTurk | 43.35 | 49.87 | +6.52 |
| Agent mode, thinking + feedbackยน | TURSpider | 66.63 | 77.85 | +11.22 |
| Agent mode, thinking + feedbackยน | BIRDTurk | 43.35 | 55.35 | +11.99 |
ยน Qwen3.5-9B with feedback is the base model in direct mode; the base model was not run in thinking mode with feedback.
Noise. Gaps of about 2โ3 points are within the 95% confidence interval: on TURSpider direct (vs XiYanSQL-7B) and BIRDTurk reasoning (vs Arctic-R1-7B), Hati Glint SQL's lead is within noise.
Comparison with other models
Direct answers (same prompt for every model, thinking off):
| Model | TURSpider | BIRDTurk |
|---|---|---|
| Hati Glint SQL | 73.21 [70.4, 75.8] | 47.26 [44.8, 49.8] |
| XiYanSQL-QwenCoder-7B | 71.08 [68.2, 73.8] | 42.76 [40.3, 45.3] |
| Qwen2.5-Coder-7B-Instruct | 68.47 [65.6, 71.2] | 37.09 [34.7, 39.5] |
| OmniSQL-7B | 67.12 [64.2, 69.9] | 39.37 [37.0, 41.8] |
| Arctic-Text2SQL-R1-7B | 66.25 [63.3, 69.1] | 43.42 [41.0, 45.9] |
| Qwen3.5-9B (base model) | 64.12 [61.1, 67.0] | 40.09 [37.7, 42.6] |
| Trendyol-LLM-8B-T1 | 61.61 [58.6, 64.5] | 29.86 [27.6, 32.2] |
Each model at its best (its own prompt or thinking mode; the setting is named):
| Model | TURSpider | Setting | BIRDTurk | Setting |
|---|---|---|---|---|
| Hati Glint SQL | 76.79 [74.1, 79.3] | thinking | 54.37 [51.9, 56.8] | thinking |
| Arctic-Text2SQL-R1-7B | 72.73 [69.9, 75.4] | official prompt | 52.41 [49.9, 54.9] | official prompt |
| Qwen3.5-9B (base model) | 71.18 [68.3, 73.9] | thinking | 48.11 [45.6, 50.6] | thinking |
| XiYanSQL-QwenCoder-7B | 71.08 [68.2, 73.8] | our prompt / official prompt (same score) | 42.76 [40.3, 45.3] | our prompt |
| OmniSQL-7B | 70.70 [67.8, 73.4] | official prompt | 45.96 [43.5, 48.5] | official prompt |
| Qwen2.5-Coder-7B-Instruct | 68.47 [65.6, 71.2] | direct | 37.09 [34.7, 39.5] | direct |
| Trendyol-LLM-8B-T1 | 61.61 [58.6, 64.5] | direct | 34.29 [32.0, 36.7] | thinking |
| Hati Glint SQL, OmniSQL templateยฒ | 77.08 [74.4, 79.5] | cross-model prompt | 58.08 [55.6, 60.5] | cross-model prompt |
| Qwen3.5-9B, OmniSQL templateยฒ | 73.98 [71.2, 76.6] | cross-model prompt | 57.37 [54.9, 59.8] | cross-model prompt |
ยฒ Both models are given OmniSQL's prompt template (a prompt neither of them was designed for). These two rows are diagnostics, shown for completeness and not ranked.
Agent mode and reasoning length
Agent mode is execution feedback with up to two retries (the error message is returned to the model). Tokens are output tokens per question.
| Mode | TURSpider | BIRDTurk | Tokens per question (TURSpider / BIRDTurk) |
|---|---|---|---|
| Hati Glint SQL, thinking + feedback | 77.85 [75.2, 80.3] | 55.35 [52.8, 57.8] | 306 / 593 |
| Hati Glint SQL, direct + feedback | 74.18 [71.4, 76.8] | 49.87 [47.4, 52.4] | 40 / 64 |
| Hati Glint SQL, direct, no feedback (reference) | 73.21 [70.4, 75.8] | 47.26 [44.8, 49.8] | 38 / 53 |
| Qwen3.5-9B (base), direct + feedback | 66.63 [63.7, 69.4] | 43.35 [40.9, 45.8] | 43 / 68 |
| Qwen3.5-9B (base), direct, no feedback (reference) | 64.12 [61.1, 67.0] | 40.09 [37.7, 42.6] | 38 / 53 |
In thinking mode Hati Glint SQL is both more accurate and about 3ร shorter than the base model (76.8 / 54.4 vs 71.2 / 48.1). Fewer generated tokens mean faster answers and roughly a third of the decoding work per question.
| Average output tokens per answer, thinking mode | TURSpider | BIRDTurk |
|---|---|---|
| Hati Glint SQL | 299 | 522 |
| Qwen3.5-9B (base) | 1,089 | 1,582 |
| Fewer tokens than the base model | 3.6ร | 3.0ร |
General benchmarks (Hati Glint SQL vs base)
Hati Glint SQL keeps the general Turkish and English ability of its base model and improves tool calling and English SQL. Tool calling is scored as exact-call accuracy: the model must choose the right tool and produce exactly the expected arguments, on tool families that were not part of training.
| Benchmark | What it measures | Items | Qwen3.5-9B (base) | Hati Glint SQL | ฮ vs base (paired 95% interval) |
|---|---|---|---|---|---|
| TurkishMMLU | Turkish knowledge | 900 | 66.22 | 65.11 | -1.11 [-2.56, +0.33] |
| Belebele-TR | Turkish reading comprehension | 900 | 86.67 | 86.22 | -0.44 [-1.11, +0.22] |
| XCOPA-TR | Turkish commonsense | 500 | 91.80 | 91.60 | -0.20 [-1.60, +1.20] |
| IFEval | instruction following | 200 | 80.50 | 80.50 | +0.00 [-4.51, +5.00] |
| MMLU | English knowledge | 1,995 | 78.80 | 78.60 | -0.20 [-0.90, +0.50] |
| Tรผrkรงe atasรถzleri | Turkish proverbs | 1,730 | 84.34 | 83.93 | -0.41 [-1.21, +0.41] |
| Spider (English) | English text-to-SQL | 1,034 | 79.40 | 84.24 | +4.84 [+2.90, +6.87] |
| Held-out Turkish tool-calling set | tool calling, tool families not seen in training | 1,000 | 76.90 | 78.90 | +2.00 [+0.70, +3.40] |
Reproducibility
We repeated the training with a different random seed; the second run landed within 1.4 points on every SQL benchmark and within 0.6 points on every general benchmark.
Results of the independent second run
| Benchmark | Released model | Independent repeat | Gap |
|---|---|---|---|
| TURSpider, direct | 73.21 | 71.86 | -1.35 |
| BIRDTurk, direct | 47.26 | 46.81 | -0.46 |
| TURSpider, thinking | 76.79 | 77.08 | +0.29 |
| BIRDTurk, thinking | 54.37 | 54.50 | +0.13 |
| TURSpider, direct + execution feedback | 74.18 | 73.50 | -0.68 |
| BIRDTurk, direct + execution feedback | 49.87 | 48.96 | -0.91 |
| TurkishMMLU | 65.11 | 65.67 | +0.56 |
| Belebele-TR | 86.22 | 86.67 | +0.45 |
| XCOPA-TR | 91.60 | 91.80 | +0.20 |
| IFEval | 80.50 | 81.00 | +0.50 |
| MMLU | 78.60 | 78.55 | -0.05 |
| Tรผrkรงe atasรถzleri | 83.93 | 84.16 | +0.23 |
| Spider (English) | 84.24 | 84.53 | +0.29 |
| Held-out Turkish tool-calling set | 78.90 | 79.10 | +0.20 |
Compared models
| Model | Hugging Face ID | Role |
|---|---|---|
| Hati Glint SQL | runelab-ai/Hati-Glint-SQL-9B-v1 |
this model (model page) |
| Qwen3.5-9B | Qwen/Qwen3.5-9B |
base model |
| Arctic-Text2SQL-R1-7B | Snowflake/Arctic-Text2SQL-R1-7B |
SQL specialist (reasoning) |
| OmniSQL-7B | seeklhy/OmniSQL-7B |
SQL specialist |
| XiYanSQL-QwenCoder-7B | XGenerationLab/XiYanSQL-QwenCoder-7B-2504 |
SQL specialist |
| Qwen2.5-Coder-7B-Instruct | Qwen/Qwen2.5-Coder-7B-Instruct |
general coding model |
| Trendyol-LLM-8B-T1 | Trendyol/Trendyol-LLM-8B-T1 |
Turkish general model |
Evaluation data. TURSpider, BIRDTurk and Spider are scored on the split these benchmarks call "dev", the only split published with answers. No question or database from it was used for training, and it was not used to select the checkpoint: checkpoints were chosen on held-out panels built from the training side.
Limitations
- SQLite only.
- TurkishMMLU is 1.1 points below the base model (66.22 โ 65.11); the other general benchmarks are within about 0.5 points.
- Thinking mode is inherited from the base model and was not trained.
- It was not trained to describe itself: asked who it is, it may answer as Qwen3.5, and like any 9B model it can make occasional factual or Turkish spelling mistakes in free-form chat.
- Generated SQL can be wrong; review it before acting on the results.
Training details
LoRA supervised fine-tuning of Qwen3.5-9B (r=32, alpha=64, dropout 0.05) on the attention, MLP and Gated DeltaNet projections, in bf16, with a learning rate of 1e-4 on a cosine schedule with 3% warmup and an effective batch of 16; the adapter is merged into the base weights, and the checkpoint was selected on a held-out panel built from the training side (about 2 epochs). Every SQL target was execution-verified against the gold query, including on perturbed copies of the database. The model learned mainly from its own verified answers, with hard questions upsampled, plus replay of base-model answers to keep general ability. Data: Spider (CC BY-SA 4.0) for English text-to-SQL; Aya dataset (Apache-2.0), LR-Sum (CC BY 4.0), MASSIVE (CC BY 4.0), QASPER (CC BY 4.0) and Doc2Dial (CC BY 3.0) for replay prompts. Contamination: train/dev split by database, no dev or test database used in training, overlap checks clean. See NOTICE for attributions.
- Release date: October 10, 2026.
- License: Apache 2.0
Citation
@misc{runelab2026hatiglintsql,
title = {Hati Glint SQL: A Turkish Text-to-SQL Fine-Tune of Qwen3.5-9B},
author = {{RuneLab.ai}},
year = {2026},
url = {https://runelab.ai/en/models/hati-glint-sql},
howpublished = {\url{https://huggingface.co/runelab-ai/Hati-Glint-SQL-9B-v1}}
}
Please also cite Qwen3.5, TURSpider and BIRDTurk as their authors request.
About RuneLab.ai
RuneLab.ai is a Turkey-based AI company building local and cloud language models, enterprise AI systems, and technical training programs.
- Hati & Skรถll AI Models: Hati Glint SQL (Turkish Text-to-SQL Model) and Kenning Turkish Legal (Turkish Legal Embedding Model).
- RuneLab Blog: Interactive explainers on Turkish Text-to-SQL, Turkish Legal Search, RAG, Multi-Agent Systems, LLM Quantization, Speculative Decoding, and Model Distillation.
- NexTech: enterprise AI strategy and end-to-end projects.
- RuneLab Academy: AI training for individuals and corporate teams.
- Products: RuneDesk (document assistant), RuneBox (on-premise AI infrastructure), RuneGate (model gateway), RuneVoice (voice AI) and Vitki (adaptive learning, early access).
More at huggingface.co/runelab-ai ยท info@runelab.ai ยท runelab.ai
Tรผrkรงe: Hati Glint SQL โ Tรผrkรงe SQL Modeli (Tรผrkรงe Text-to-SQL)
- Model Sayfasฤฑ ve Etkileลimli Kฤฑyaslamalar: Hati Glint SQL: Tรผrkรงe SQL Modeli (Tรผrkรงe Text-to-SQL) โ runelab.ai
- Etkileลimli Teknik Rehber: Veritabanฤฑnฤฑza Tรผrkรงe Sorun: Tรผrkรงe SQL Modeli Hati Glint SQL
- Tรผm RuneLab Modelleri: Hati & Skรถll Yapay Zekรข Modelleri โ runelab.ai/models
รzet
Hati Glint SQL (Hati-Glint-SQL-9B-v1), Tรผrkรงe doฤal dil sorularฤฑnฤฑ รงalฤฑลan SQLite sorgularฤฑna รงeviren 9B parametreli, aรงฤฑk aฤฤฑrlฤฑklฤฑ bir Tรผrkรงe SQL modelidir (Tรผrkรงe text-to-SQL / metinden SQL รผretme modeli). Yapay zeka ajanlarฤฑ, iล zekasฤฑ (BI), veri analitiฤi ve kurum iรงi (on-premise) kullanฤฑm iรงin geliลtirilmiลtir; Qwen3.5-9B temel modelinin RuneLab.ai tarafฤฑndan fine-tune edilmiล sรผrรผmรผdรผr.
Yalnฤฑzca bir SQL uzmanฤฑ deฤildir: temel modelin gรผรงlรผ Tรผrkรงesini korur, bu yรผzden genel amaรงlฤฑ bir Tรผrkรงe asistan olarak da kullanฤฑlabilir; eฤitimde hiรง gรถrmediฤi araรง ailelerinde temel modele gรถre daha doฤru araรง รงaฤฤฑrฤฑr, bu da iล sรผreรงlerinin otomasyonu iรงin รถnemlidir. Ayrฤฑca token aรงฤฑsฤฑndan verimlidir: doฤrudan modda yaklaลฤฑk 38โ53 tokenle yanฤฑt verir, dรผลรผnme modunda ise temel modele gรถre yaklaลฤฑk 3โ3.6 kat daha az akฤฑl yรผrรผtme tokeni kullanฤฑr.
- Test ettiฤimiz 10B altฤฑ aรงฤฑk modeller arasฤฑnda en yรผksek Tรผrkรงe SQL skoru: TURSpider ve BIRDTurk'te, hem doฤrudan yanฤฑt hem de dรผลรผnme modunda.
- Temel modele gรถre doฤrudan yanฤฑtta +9.1 / +7.2 execution accuracy (TURSpider 64.1 โ 73.2; BIRDTurk 40.1 โ 47.3).
- Dรผลรผnme modunda TURSpider'da 76.8, BIRDTurk'te 54.4 (temel model: 71.2 / 48.1); รผstelik yaklaลฤฑk 3โ3.6 kat daha az token รผretir. ลirket iรงin bu, daha hฤฑzlฤฑ yanฤฑt ve soru baลฤฑna kabaca รผรงte bir รผretim yรผkรผ demektir.
- รalฤฑลtฤฑrma geri bildirimli ajan modunda 77.9 / 55.4.
- Daha iyi araรง รงaฤฤฑrma: eฤitimde gรถrรผlmeyen araรง ailelerinden 1.000 Tรผrkรงe รงaฤrฤฑda 76.9 โ 78.9 (+2.0).
- Genel Tรผrkรงe ve ฤฐngilizce yetenekleri temel modele yakฤฑn kalฤฑr; ฤฐngilizce Spider +4.8 iyileลir.
Neden รถnemli
- ลirketler verilerine Tรผrkรงe soru sormak ister; ancak รงoฤu text-to-SQL modeli ฤฐngilizce aฤฤฑrlฤฑklฤฑ eฤitilir ve Tรผrkรงe sorularda, Tรผrkรงe tablo ve sรผtun adlarฤฑnda doฤruluk kaybeder.
- Mรผลteri, finans ve ฤฐK verileri รงoฤu zaman ลirket dฤฑลฤฑna รงฤฑkamaz (รถrneฤin KVKK kapsamฤฑnda). 9B boyutundaki model tek bir GPU'da, kendi altyapฤฑnฤฑzda, harici bir API olmadan รงalฤฑลฤฑr.
- Token verimliliฤi hฤฑz, maliyet ve kalite demektir: bir ajanฤฑn okuduฤu ve yazdฤฑฤฤฑ her token baฤlam penceresinde kalฤฑr. Yaklaลฤฑk 522 tokenle dรผลรผnen bir model, yaklaลฤฑk 1,582 token harcayan bir modele gรถre baฤlamฤฑ daha az doldurur, daha hฤฑzlฤฑ yanฤฑt verir, daha ucuzdur ve kฤฑsa, daฤฤฑnฤฑk olmayan bir baฤlam modelin gรถreve odaklฤฑ kalmasฤฑna genellikle yardฤฑmcฤฑ olur.
- Tek model, tรผm iล akฤฑลฤฑ: aynฤฑ model Tรผrkรงe sohbet eder, SQL yazar ve araรง รงaฤฤฑrฤฑr.
- Aรงฤฑk aฤฤฑrlฤฑklฤฑ ve Apache 2.0 lisanslฤฑdฤฑr; ekipler modeli kendi ลemalarฤฑnda daฤฤฑtabilir, inceleyebilir ve fine-tune edebilir.
Kullanฤฑm alanlarฤฑ
- ลirket veritabanlarฤฑ รผzerinde Tรผrkรงe doฤal dil sorularฤฑ (BI, raporlama, analitik ajanlarฤฑ)
- Kiลisel ve kurumsal yapay zeka ajanlarฤฑnda SQL adฤฑmฤฑ
- Verinin ลirket dฤฑลฤฑna รงฤฑkmamasฤฑ gereken kurum iรงi (on-premise) daฤฤฑtฤฑmlar
- Genel Tรผrkรงe asistan iลleri: sohbet, soru-cevap, yazฤฑm ve รงeviri desteฤi
- ฤฐล sรผreรงlerinde araรง / fonksiyon รงaฤฤฑrma: ERP, CRM, finans, ฤฐK ve destek sistemlerinde stok sorgulama, kayฤฑt gรผncelleme, iล akฤฑลฤฑ tetikleme
Kapsam dฤฑลฤฑ
- รretilen SQL'in yazma yetkisiyle veya incelenmeden รงalฤฑลtฤฑrฤฑlmasฤฑ (salt okunur baฤlantฤฑ kullanฤฑn)
- SQLite dฤฑลฤฑndaki SQL lehรงeleri: bu sรผrรผmde deฤerlendirilmedi
- Eriลim kontrolรผ veya gรผvenlik kararlarฤฑ
- Gรผncel olaylar veya 9B bir modelin รถtesinde uzmanlฤฑk bilgisi gerektiren iลler (bilgi eriลimi eklemeden)
Sonuรงlar
Tรผm skorlar, deฤerlendirme kurulumu, karลฤฑlaลtฤฑrฤฑlan modeller ve grafikler yukarฤฑdaki Evaluation bรถlรผmรผndedir ve etkileลimli grafiklerle runelab.ai/models/hati-glint-sql sayfasฤฑnda incelenebilir. รzetle: doฤrudan yanฤฑtta TURSpider'da 73.21, BIRDTurk'te 47.26; dรผลรผnme modunda 76.79 / 54.37. Yaklaลฤฑk 2โ3 puanlฤฑk farklar %95 gรผven aralฤฑฤฤฑ iรงindedir: TURSpider doฤrudan yanฤฑtta (XiYanSQL-7B'ye karลฤฑ) ve BIRDTurk dรผลรผnme modunda (Arctic-R1-7B'ye karลฤฑ) Hati Glint SQL'in รผstรผnlรผฤรผ gรผrรผltรผ sฤฑnฤฑrฤฑndadฤฑr.
Bir metinden SQL รผreten modelin Tรผrkรงe soruyu nasฤฑl sorguya รงevirdiฤini adฤฑm adฤฑm denemek iรงin Veritabanฤฑnฤฑza Tรผrkรงe sorun yazฤฑsฤฑnฤฑ okuyabilirsiniz.
Sฤฑnฤฑrlamalar
- Yalnฤฑzca SQLite.
- TurkishMMLU temel modelden 1.1 puan dรผลรผktรผr; diฤer genel benchmark'larda fark yaklaลฤฑk 0.5 puan iรงindedir.
- Dรผลรผnme modu temel modelden gelir; ayrฤฑca eฤitilmemiลtir.
- Kendini tanฤฑtmak รผzere eฤitilmedi: kim olduฤu sorulduฤunda Qwen3.5 olarak yanฤฑt verebilir; her 9B model gibi serbest sohbette ara sฤฑra bilgi veya yazฤฑm hatalarฤฑ yapabilir.
- รretilen SQL yanlฤฑล olabilir; sonuรงlara gรถre harekete geรงmeden รถnce inceleyin.
Hฤฑzlฤฑ baลlangฤฑรง
Kod รถrnekleri (sohbet pipeline'ฤฑ, text-to-SQL, dรผลรผnme modu, araรง รงaฤฤฑrma, vLLM ve ajan sarmalayฤฑcฤฑsฤฑ) yukarฤฑdaki Quickstart bรถlรผmรผndedir; รถrnek veritabanฤฑ ve sorular Tรผrkรงedir.
RuneLab.ai hakkฤฑnda
RuneLab.ai, Tรผrkiye merkezli bir yapay zeka ลirketidir.
- Hati & Skรถll Yapay Zekรข Modelleri: Hati Glint SQL (Tรผrkรงe SQL Modeli / Text-to-SQL) ve Kenning Turkish Legal (Tรผrkรงe Hukuk Embedding Modeli).
- RuneLab Blog: Veritabanฤฑnฤฑza Tรผrkรงe Sorun (Text-to-SQL), Doฤru Maddeyi Bulmak (Tรผrkรงe Hukuk Arama), RAG Yanฤฑtlarฤฑ Nasฤฑl Bulur?, Tek Ajan mฤฑ, รok Ajan mฤฑ?, Quantization (Nicemleme), Speculative Decoding ve Model Distillation (Damฤฑtma).
- NexTech: kurumsal yapay zeka stratejisi ve uรงtan uca projeler.
- RuneLab Akademi: bireylere ve kurumsal ekiplere yapay zeka eฤitimi.
- รrรผnler: RuneDesk (dokรผman asistanฤฑ), RuneBox (kurum iรงi yapay zeka altyapฤฑsฤฑ), RuneGate (model geรงidi), RuneVoice (sesli yapay zeka) ve Vitki (adaptif รถฤrenme, erken eriลim).
Daha fazlasฤฑ: huggingface.co/runelab-ai ยท info@runelab.ai ยท runelab.ai
- Downloads last month
- 159
Model tree for runelab-ai/Hati-Glint-SQL-9B-v1
Evaluation results
- EX (direct) on TURSpiderself-reported73.210
- EX (thinking) on TURSpiderself-reported76.790
- EX (agent, thinking + feedback) on TURSpiderself-reported77.850
- EX (direct) on BIRDTurkself-reported47.260
- EX (thinking) on BIRDTurkself-reported54.370
- EX (agent, thinking + feedback) on BIRDTurkself-reported55.350
- EX (direct) on Spider (English)self-reported84.240







