Hati Glint SQL (Hati-Glint-SQL-9B-v1)

Illustration: a friendly white and silver wolf in a dark navy vest sits at a wooden table on a moonlit lakeside deck, drawing a database schema of three linked tables on a parchment map; a lantern, a mug and a book stand beside it. The words Hati Glint by RuneLab appear on the left.

Ask in Turkish, get SQL that runs.

The strongest open Turkish text-to-SQL model under 10B in our evaluation, fine-tuned from Qwen3.5-9B by RuneLab.ai. Türkçe özet için: Türkçe

Summary

Hati Glint SQL is a 9B open-weight model that turns Turkish questions into SQL that runs. It is built for AI agents and for on-premise use, and it is the top-scoring open Turkish text-to-SQL model under 10B among the models we tested.

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).

Bar chart of BIRDTurk execution accuracy for direct answers: Hati Glint SQL 47.26, Arctic-R1-7B 43.42, the base Qwen3.5-9B 40.09.

  • 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.)

Bar chart of average output tokens per answer in thinking mode: Hati Glint SQL 299 (TURSpider) and 522 (BIRDTurk) against 1,089 and 1,582 for the base model.

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. Scores and confidence intervals are in the Evaluation section below.

Bar chart of TURSpider execution accuracy for direct answers: Hati Glint SQL leads at 73.21, ahead of XiYanSQL-7B at 71.08; the base Qwen3.5-9B scores 64.12. Bar chart of TURSpider execution accuracy at each model's best setting: Hati Glint SQL with thinking leads at 76.79; two hatched diagnostic bars on the right use OmniSQL's prompt template. Bar chart of BIRDTurk execution accuracy at each model's best setting: Hati Glint SQL with thinking scores 54.37, Arctic-R1-7B 52.41; two hatched diagnostic bars on the right use OmniSQL's prompt template. Bar chart of TURSpider accuracy in agent mode: Hati Glint SQL with thinking and feedback 77.85, direct with feedback 74.18, base model with feedback 66.63. Bar chart of BIRDTurk accuracy in agent mode: Hati Glint SQL with thinking and feedback 55.35, direct with feedback 49.87, base model with feedback 43.35. Eight small bar charts comparing the base model and Hati Glint SQL on TurkishMMLU, Belebele-TR, XCOPA-TR, IFEval, MMLU, Türkçe atasözleri, Spider and a held-out Turkish tool-calling set; the bars are nearly equal except Spider and tool calling, where Hati Glint SQL is higher.

Why the name

In Norse mythology, Hati is the wolf that chases the moon across the sky. The Hati family follows the moon from its first glint to full moon: Glint, Crescent, Halfmoon and Fullmoon. Glint SQL is the Glint tier, specialised for SQL.

Illustration of the Hati family as four standing white and silver wolves in navy clothes on a dark navy background, growing in size from left to right: Glint, a small wolf in a vest; Crescent, a taller wolf with a short cape; Halfmoon, a tall wolf in a long cloak and tunic; and Fullmoon, a large, broad wolf in a heavy cloak.

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:

  1. the model writes the SQL;
  2. 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;
  3. 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.

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.

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
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},
  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 NexTech

RuneLab.ai is a Turkey-based AI company.

  • NexTech: enterprise AI strategy and end-to-end projects.
  • RuneLab Academy: AI training for individuals and teams.
  • Products: RuneDesk (document assistant), RuneBox (on-premise AI infrastructure), RuneGate (model gateway) and Vitki (adaptive learning, early access).

More at huggingface.co/runelab-ai · info@runelab.ai · www.runelab.ai


Türkçe

Özet

Hati Glint SQL, Türkçe soruları çalışan SQL'e çeviren 9B parametreli, açık ağırlıklı bir modeldir. Yapay zeka ajanları 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. Ö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.

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 NexTech hakkında

RuneLab.ai, Türkiye merkezli bir yapay zeka şirketidir.

  • NexTech: kurumsal yapay zeka stratejisi ve uçtan uca projeler.
  • RuneLab Akademi: bireylere ve ekiplere yapay zeka eğitimi.
  • Ürünler: RuneDesk (doküman asistanı), RuneBox (kurum içi yapay zeka altyapısı), RuneGate (model geçidi) ve Vitki (adaptif öğrenme, erken erişim).

Daha fazlası: huggingface.co/runelab-ai · info@runelab.ai · www.runelab.ai

Downloads last month
121
Safetensors
Model size
10B params
Tensor type
BF16
·
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for runelab-ai/Hati-Glint-SQL-9B-v1

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

Evaluation results