/ Модель

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

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

qwen3.5-2b-grpo-curriculum

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

Дообученная методом GRPO модель Qwen на 2 млрд параметров для агентного преобразования вопросов к базам данных в SQL с исследованием схемы через инструменты.

536скачиваний за 30 дней0лайковвеса обновлены20 сен 2026

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

cwolff выпустил cwolff/qwen3.5-2b-grpo-curriculum — дообученную методом GRPO агентную модель на базе Qwen/Qwen3.5-2B с 2 млрд параметров. Она предназначена для преобразования вопросов к базам данных в SQL: модель исследует схему с помощью инструментов, выполняет запросы и отправляет итоговый SQL. Для работы нужен внешний агентный цикл, который исполняет JSON-вызовы инструментов и передаёт результаты модели.

Обучение продолжило чекпойнт cwolff/qwen3.5-2b-grpo-sqale на выборке SQaLe3, включая сложные примеры; длина эпизода составляла 24 576 токенов. В README приведены результаты выполнения SQL на BIRD и других наборах, однако модель обучалась и оценивалась только с SQLite. У неё сохранена башня зрения базовой модели, но она не обучалась и не оценивалась, поэтому автор рекомендует считать модель текстовой. Модель распространяется под лицензией Apache-2.0.

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

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

Ограничения

Требует агентного цикла с исполнением вызовов инструментов и работает хуже при обычном запросе «схема на вход, SQL на выход». Обучена и оценивалась только на SQLite; модель с 2 млрд параметров уступает более крупным моделям на сложных запросах с несколькими соединениями.

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

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

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

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

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

Открыть на Hugging Face

Qwen3.5-2B · agentic GRPO with a length curriculum

A 2B text-to-SQL agent: it explores a database with tools, then submits a query, and was trained with GRPO against real SQLite execution.

It differs from its three siblings in four ways that matter:

  • Warm-started, not trained from the stock base — it continues cwolff/qwen3.5-2b-grpo-sqale from its step-1600 checkpoint.
  • Length curriculum. The sampling pool is reweighted by gold-query length quantile, shifting from short toward long queries over 400 steps.
  • Harder data. simple + moderate + hard, on a newer SQaLe3 pair.
  • Double the episode budget — 24,576 tokens against 12,288.

Sibling models, same family, no curriculum: grpo-bird · grpo-sqale · grpo-synsql

This repo serves the run's LAST checkpoint (step 600). It previously served step 300, which the trainer had selected on BIRD. Measured on a metric neither was selected for, the two are indistinguishable, and step 600 answers with less than half the tool calls — see Which checkpoint below.

Results

Measured on this repo as published, loaded straight into vLLM, through the same agentic harness for every row: exec_plan protocol, 6 tool turns, T=0.6 / top-p 0.95 / top-k 20, scored by executing against real databases.

benchmarkmodeofficialstrictn
BIRD devschema in prompt0.5370.497300
BIRD devschema withheld0.4730.433300
BIRD dev, challenging onlyschema in prompt0.3470.313144
BIRD dev, challenging onlyschema withheld0.3260.292144
SQaLe3 testwithheld, 64-table cap0.5730.540300
SQaLe3 testwithheld, full schema0.5830.533300
Spider 2.0-liteschema in prompt0.046—87
Spider 2.0-liteschema withheld0.046—87

BIRD and SQaLe3 use BIRD-official set semantics. Spider 2.0 uses its own upstream comparator on its local-SQLite subset (87 of 547 questions), is not numerically comparable to the other two, and is not a leaderboard number.

What the RL bought, on the hardest questions

BIRD tags 145 of its 1,534 dev questions challenging. On all of them, same harness, paired on the question:

modelparamsschema shownwithheld
Qwen3.5-2B (untrained)2B0.0830.132
this model2B0.3470.326
Qwen3.5-9B (untrained)9B0.4310.333
Qwen3.8-27B (untrained)27B0.6040.583

Against its own untrained base the gain is large and unambiguous — paired McNemar p < 0.0001 in both modes. Against an untrained 9B it is behind with the schema shown, but level when the schema is withheld (0.326 vs 0.333, p = 0.74). That is the regime it was trained in (EXPLORE_SHARE=1.0), and it is where a 2B trades evenly with a model 4.5× its size. The 9B's submit rate collapses from 0.34 to 0.06 when it has to discover the schema itself; this model's holds.

Which checkpoint

The run saved a BIRD-selected checkpoint at step 300 and ran to step 600. Both were measured on everything:

benchmarkstep 300step 600 (this)note
BIRD, schema shown0.5770.537step 300 was selected on this
BIRD challenging, shown0.3190.347neither was selected on this
SQaLe3, full schema0.5400.583step 600 was selected on this
mean tool calls (BIRD shown)29.115.1

Each checkpoint wins the metric it was chosen on — symmetric selection bias, and a reason to trust neither number as a comparison. On the neutral metric the paired difference is +0.028 (95% CI [−0.034, +0.090], p = 0.52): no difference. Step 600 ships because it is equal there and roughly half the inference cost. If you want the higher BIRD-overall number, take step 300 from the run directory; it is not better, it is differently selected.

Does the published repo match what training measured?

Training builds its vLLM engine from the base model and syncs the checkpoint's weights in; this repo is the rebuilt, directly-loadable one. Compared paired over the same 300 questions:

modeweight-sync paththis repopaired deltaMcNemar p
schema shown0.5530.537−0.017, 95% CI [−0.050, +0.020]0.46
withheld0.5230.473−0.050, 95% CI [−0.090, −0.010]0.020

The withheld row is significant, so state it plainly: on that mode the directly-loaded repo scored 5 points below the weight-sync path. The weights are bit-identical to the training checkpoint — verified tensor by tensor, not inferred — so there is no mechanism for the two to differ, and this is one of two significant results across ten such paired tests on this model family (the other went the opposite way). The most likely explanation is run-to-run sampling variance under continuous batching, which is large for a model that truncates a third of its episodes. It is reported rather than buried; if it matters to you, re-run the eval at a different seed.

Honest caveats

  • The run did not finish. 1,000 steps were planned; it was cancelled at ~step 656 after 1d19h. This is step 600.
  • It still over-explores. 15 mean tool calls with the schema shown and 29 withheld — half what step 300 used, but well above the ~13 of its siblings — and 17%/11% of BIRD episodes hit the token cap. On Spider 2.0 truncation is 78%, so most of those episodes never finish.
  • Spider 2.0 is near zero (0.046 = 4 of 87), inside the noise floor at this n. An untrained Qwen3.8-27B scores 0.414 on the same subset.
  • BIRD withheld is below its grpo-bird sibling (0.473 vs 0.547).

Serving

vllm serve cwolff/qwen3.5-2b-grpo-curriculum --max-model-len 24576

generation_config.json stops on both <|im_end|> (248046) and <|endoftext|> (248044), matching the stop set used during RL rollouts. Give it a larger context than its siblings — it was trained at a 24,576-token episode budget and uses it.

How to prompt it

It expects an agent loop and will underperform badly without one. Each assistant turn emits a single JSON object and nothing else; your harness executes it and feeds the result back as the next user turn.

{"tool": "list_tables"}
{"tool": "describe_table", "args": {"table_name": "singer"}}
{"tool": "run_query", "args": {"sql": "SELECT COUNT(*) FROM singer"}}
{"tool": "submit_sql", "args": {"sql": "SELECT COUNT(*) FROM singer"}}

Tools: list_tables, describe_table, foreign_keys, join_path, sample_rows, run_query, distinct_values, submit_sql. submit_sql ends the episode. Assistant turns open with a <think> block — keep thinking on. The exact system prompt is EXEC_PLAN_TOOL_INSTRUCTIONS in shared/tools/protocol.py; use that string rather than paraphrasing.

Training

Initgrpo1800_sqale step 1600 (itself GRPO from stock Qwen3.5-2B)
AlgorithmGRPO, token-level loss, sum/1024 aggregation, no advantage normalisation
KLk3 estimator toward a frozen reference, target 0.03
Clippingsequence-level importance ratio from vLLM logprobs, 0.2 / 0.28 (DAPO)
Batch18 questions × 8 candidates = 144 episodes/step, 1 inner epoch
LR5e-6, cosine, 3% warmup
Curriculumlength quantiles 0.5/0.8/0.95; pool weights 0.40→0.15 (short) and 0.10→0.40 (long) over 400 steps, floor 0.15
Environmentexec_plan, 6 tool turns, 24,576-token episodes, explore share 1.0, 64-table cap
DataSQaLe3 simple,moderate,hard (cwolff/queries_new3 / schemas_new3)
Hardware3× H100, 3-rank torchrun data parallel
Steps600 of a planned 1000 (run cancelled at ~656)

Reward executes the candidate against a real SQLite database built from the row payloads and compares to the gold result — not string match against a reference query.

Limitations

  • 2B parameters; it will lose to a frontier model on hard multi-join questions.
  • Trained and evaluated on SQLite only.
  • Single-turn "schema in, SQL out" prompting is out of distribution.
  • Inherits the base model's vision tower, carried over untouched and never trained or evaluated here. Treat it as a text model.
  • Provenance: Slurm job 26862235, output grpo_curriculum_len, checkpoint checkpoint-step-600 (byte-identical to the run's best/). Exported by merging the run's 320 trained language-model tensors with the base model's vision tower and MTP head under the base config.json.

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей