/ Модель

Характеристики

Контекст
262 144 токена
Лицензия
Apache 2.0
Архитектура
qwen3_5 · dense
Базовая модель
Qwen3.5-9B
Библиотека
transformers
Опубликована
24 ноя 2026

KeenSQL1.0

Генерация текстаТекст → текст5 профессий

KeenSQL1.0 — текстовый агент на базе Qwen3.5-9B, который исследует схему SQLite и преобразует вопросы на естественном языке в SQL.

167скачиваний за 30 дней2лайкавеса обновлены25 ноя 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

KeenSQL1.0 — дообученный компанией Keendata агент для преобразования запросов на естественном языке в SQL для баз SQLite. Это финальный чекпойнт обучения с подкреплением на основе Qwen3.5-9B: плотная архитектура Qwen3.5 с гибридным линейным и полным вниманием, около 9 млрд параметров, веса в формате bfloat16. Модель принимает текстовый вопрос, предоставленную схему базы данных и при необходимости дополнительные сведения, затем в агентном цикле может исследовать схему, выполнять пробные запросы через инструменты и выдаёт итоговый SQL-оператор. Хотя в чекпойнте сохранена неиспользуемая башня зрения базовой модели, KeenSQL1.0 на практике работает только с текстом.

На тесте BIRD dev авторы сообщают точность исполнения 70,53% при выборе большинства из восьми генераций; наибольший выигрыш относительно начальной SFT-модели наблюдался на более сложных вопросах. Для работы нужны собственный шаблон чата модели и цикл агента с поддержкой инструментов; стандартный шаблон Qwen3.5 и обычный чат без протокола инструментов снижают качество. Модель обучалась и проверялась только на SQLite, сама к базе не подключается. Она не проходила дополнительную настройку безопасности, поэтому сгенерированный SQL следует проверять до выполнения. Лицензия — Apache-2.0.

Сценарии применения

  • перевод вопросов пользователя в SQL-запросы к SQLite
  • ответы на вопросы по данным в базе SQLite через агентный цикл
  • исследование схемы и проверка SQL пробными запросами
  • генерация SQL для аналитики по реляционным базам SQLite

Ограничения

Обучена и оценивалась только для SQLite и требует предоставленной схемы, собственного шаблона чата и агентного цикла с инструментами. Модель не подключается к базе самостоятельно и не настроена дополнительно на безопасность; проверяйте SQL перед выполнением.

Для каких профессий подходит5

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

KeenSQL1.0

A 9B tool-using Text-to-SQL agent for SQLite databases. Given a natural-language question, a database, and optional evidence, the model runs a multi-turn agent loop — inspecting the schema, executing probe queries, then emitting a final SQL answer — and returns a single SQL statement.

KeenSQL1.0 is the final checkpoint (global step 240) of a reinforcement fine-tuning run started from a full-parameter SFT of Qwen3.5-9B, trained with GRPO plus a KL-to-reference penalty on execution-based rewards.

Model details

Base architectureQwen3.5 (hybrid linear/full attention, Qwen3_5ForConditionalGeneration)
Parameters~9B
Precisionbfloat16
Hidden / layers4096 / 32
Attention16 Q heads, 4 KV heads, head_dim 256, mRoPE (partial 0.25)
Vocabulary248,320
Context262,144
Training start pointSFT checkpoint at global step 286 (full-parameter SFT of Qwen3.5-9B)
Training steps240 optimizer steps (1 update per step)
Batch8 question groups × 3 candidates × 8 rollouts per step
OptimizerAdamW, lr 1e-6 with 7-step warmup, cosine decay to 0.3×
KL controllertarget 0.03 nats/token, adaptive coefficient in [0.02, 0.5]

The checkpoint also carries an (unused) vision tower from the Qwen3.5 multimodal architecture; this model is text-only in practice.

⚠️ Use this model's own chat template

chat_template.jinja (also embedded in tokenizer_config.json) is a modified variant, not the stock Qwen3.5 template. It emits a plain assistant header on every turn and adds no think block.

The stock template gives the assistant message that follows the last non-tool user turn a closed empty think block, which acts as a perfect "this is the final turn" flag — a signal that a rollout cannot reproduce, because whether a turn ends the episode is decided by tokens sampled after the header is already fixed in the context.

Training, rollout and evaluation all use the plain-header shape. Loading this model with the default Qwen template produces a train/inference format mismatch and will degrade accuracy substantially.

from transformers import AutoTokenizer

tok = AutoTokenizer.from_pretrained("<this-repo>", trust_remote_code=True)
# chat_template is already set from tokenizer_config.json — do not override it
assert "plain-header" in tok.chat_template

Agent protocol

The model expects to be driven by an agent loop with these properties:

ItemValue
Max turns8 tool calls + 1 final answer
Max tokens per turn2048
Max observation size2048 tokens per tool return
Toolsqlite_query (single SQL statement; returns rows or an error)
Final answera turn containing a sql block instead of a tool call

Turns must alternate: one tool call per turn, observation fed back as a user message wrapped in <observation>. The model was trained with this exact wrapper and turn budget.

Sampling used for evaluation: temperature 0.7, top_p 0.95, top_k -1.

Evaluation

BIRD dev (1,534 questions, self-consistency)

sc_ex = execution accuracy after majority vote over k samples. pass@k = fraction of questions with at least one correct sample out of k.

Checkpointsc_ex (k=8)pass@8all-attempt protocol rate
SFT start point (step 286)0.68510.79920.8801
RFT step 1200.69300.76210.9720
KeenSQL1.0 (RFT step 240)0.70530.79010.8911

At higher sampling budgets (step 240): sc_ex@16 = 0.7112, sc_ex@32 = 0.7125, pass@32 = 0.8305.

By difficulty (BIRD dev, sc@8)

DifficultyQuestionsSFT startKeenSQL1.0Δ
simple9250.73510.7514+1.63
moderate4640.62070.6466+2.59
challenging1450.57240.6000+2.76

The gain grows with difficulty, which is what one wants from execution-reward training.

Internal held-out split (323 questions, n=2, temp 0.7)

Weighted execution accuracy: 0.6502 at the SFT start point → 0.7167 at its peak (step 120) → 0.6796 at step 240.

This internal split disagreed with the full BIRD dev set: it made step 120 look like the best checkpoint (0.7167) while on BIRD dev step 240 scored higher (0.7053 vs 0.6930). The internal split is only 323 questions from a narrow set of databases, so its step-to-step swings (roughly ±1.5 points) are dominated by sampling noise.

How to read these numbers

  • The gain over the SFT start point is modest but consistent: +2.0 points sc_ex on BIRD dev, concentrated on the harder questions.
  • pass@8 is slightly lower than the SFT start point (0.7901 vs 0.7992), while sc_ex@8 is higher. In other words RFT improved per-sample reliability under majority voting rather than the capability ceiling — expected, since the SFT start point already solved 80% of questions at least once in 8 tries.
  • Output diversity increased during training (mean entropy 0.23 nats/token, up from 0.19), so self-consistency needs k≥8 to pay off. At k=2 expect considerably lower numbers.

Limitations

  • SQLite only. Trained and evaluated on SQLite databases. Other dialects untested.
  • Schema must be provided in the prompt; the model does not connect to a database.
  • Needs the agent loop. Loaded as a plain chat model without the tool protocol and turn budget, quality drops sharply.
  • Late-training drift. From roughly step 120 onward the KL-to-reference penalty was pushed to its operating point, output diversity rose, and self-consistency consensus fell. If you need maximum stability rather than maximum accuracy, evaluate step 120 as well.
  • Small validation set. The internal split used to monitor training was too small to distinguish nearby checkpoints reliably; the BIRD dev numbers above are the trustworthy ones.
  • Not safety-tuned beyond whatever the base SFT model carried. No guarantee against generating destructive SQL — never run its output against a production database without review.

Files

FileNotes
model.safetensorssingle-file bf16 weights, 760 tensors, ~17.5 GB
config.jsonQwen3.5 text config (+ unused vision_config)
tokenizer.json, tokenizer_config.jsonfast tokenizer, custom chat template embedded
chat_template.jinjasame template as a standalone file
generation_config.jsondefault generation parameters
processor_config.jsonQwen3VLProcessor (multimodal; unused for text-only SQL)
keensql-bird.sifApptainer image for BIRD-Test evaluation (~10 GB). Debian bookworm, Python 3.11.17, torch 2.11.0+cu129, vLLM 0.24.0, transformers 5.9.0. Weights are bind-mounted, not baked in

Requires a transformers release that supports the qwen3_5 architecture (the checkpoint was exported with transformers 5.9.0).

BIRD-Test evaluation image

keensql-bird.sif is the self-contained environment for the BIRD-Test submission. The Experiment Team only needs apptainer run --nv; nothing is installed and no network access is required at evaluation time.

# fetch the image next to the submission code
HF_HUB_DISABLE_XET=1 hf download Keendata/KeenSQL1.0 keensql-bird.sif --local-dir container

# serve the model (weights bind-mounted at /model)
apptainer run --nv \
    --bind /data/KeenSQL/model:/model \
    --env MODEL=/model/KeenSQL1.0 --env PORT=8001 --env TP=1 \
    --env SERVED_NAME=KeenSQL1.0 \
    --env MAX_MODEL_LEN=32768 --env MAX_NUM_SEQS=64 \
    --env MAX_NUM_BATCHED_TOKENS=32768 --env GPU_UTIL=0.90 \
    /data/KeenSQL/container/keensql-bird.sif serve

The image's launcher forces VLLM_USE_FLASHINFER_SAMPLER=0 and --enforce-eager, both required for this build. Requires NVIDIA driver

= 575.51.03 (580.178.04 verified path); see the submission README for the full pipeline.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
Qwen3_5ForConditionalGeneration
Ревизия весов
8485fe6

0 моделей