/ Модель

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

Контекст
262 144 токена
Параметры
3,4 млрд
Размер весов
8,4 ГБ
Лицензия
Apache 2.0
Архитектура
qwen3_5_text · dense
Базовая модель
Qwen3.5-4B
Библиотека
transformers
Опубликована
19 ноя 2026

decision-model-qwen3.5-4b

Генерация текстаТекст → текст
128скачиваний за 30 дней0лайковвеса обновлены25 ноя 2026

Описание модели

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

Дообученная текстовая модель Qwen3.5 оценивает варианты решений и выдаёт калиброванные вероятности, при необходимости используя режим рассуждения.

Decision Model 4B — дообученная Mercity текстовая модель на базе Qwen/Qwen3.5-4B с архитектурой Qwen3_5ForCausalLM и 3,4 млрд параметров. Она принимает свидетельства, критерий и варианты ответа, а затем оценивает вероятность каждого варианта за один проход. Для менее уверенных вопросов доступен режим рассуждения с последующим ответом; неопределённые случаи можно направлять в этот режим по разнице вероятностей двух лучших вариантов.

Модель обучена с помощью LoRA на вопросах выбора и цепочках рассуждений, затем дополнительно оптимизирована методом GRPO; адаптер объединён с весами. В README сообщается о повышении точности быстрого выбора на тестовом наборе с 62,7% у исходной модели до 72,5%. Модель рассчитана на заданный формат запросов и применение через decision.py или точное воспроизведение этого формата, а не на свободный чат. Контекст — 262 144 токена. Лицензия Apache-2.0.

К ограничениям относятся смещение к ответу «да», меньший прирост на данных, отличающихся от обучающих, и завышенная уверенность вероятностей после рассуждения. Проверка основана на отдельных запусках обучения и ограниченном этапе GRPO; в README также отмечена слабая оценка на HelpSteer2.

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

  • оценка вероятностей для вариантов ответа по заданным свидетельствам и критериям
  • ранжирование вариантов решения с помощью вероятностей
  • маршрутизация вопросов с низкой уверенностью на дополнительное рассуждение
  • оценка вариантов действий в процедурах и сценариях поддержки клиентов

Ограничения

Модель рассчитана на определённый формат запросов, а не на свободный чат; на данных, отличающихся от обучающих, прирост качества меньше. Для вопросов «да/нет» отмечено смещение к ответу «да», а вероятности после рассуждения могут быть чрезмерно уверенными.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Бенчмарки пользователейпока нет

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

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

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

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

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

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

    Модели ответят на каждую задачу, судья оценит ответы по шкале 0–100.

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

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

Открыть на Hugging Face

Decision Model 4B (Qwen3.5-4B)

A decision model: give it a piece of evidence, a criterion and a list of options, and it returns a calibrated probability for every option in one forward pass (about 40 ms on an A100). For questions it is unsure about, the same model can think first, writing a reasoning chain and then answering.

Base modelQwen/Qwen3.5-4B, text-only
TrainingLoRA (rank 32), supervised on 42K decision questions and 11K reasoning chains, then 60 steps of GRPO on thinking mode; merged into the weights
Formatbf16 safetensors, Qwen3_5ForCausalLM
Question typeschoice (pick 1 of 2-26 options), yes/no, score (a level on an ordered scale)
LanguageEnglish
LicenseApache 2.0

Results

Our evaluation set has 5,442 questions from four sources. Thinking-mode and routed numbers use a fixed 1,498-question subset of it.

Qwen3.5-4B (untrained)This model
Fast readout accuracy62.7%72.5%
Thinking-mode accuracy84.0%83.1%
Chains that never finish (loops)0.9%0.2%
Routed: 30% of questions to thinking73.0% at 1,069 thinking tokens/question81.8% at 729 thinking tokens/question
Fast-readout calibration error (ECE)0.030
S1MB Task Avg, fast readout (137 tasks)32.847.9
S1MB Task Avg, routed 30%55.2

Fast-readout accuracy by evaluation set (untrained → this model): procedural 46.8 → 89.5%, tasksource 60.4 → 72.3%, OpenDecisions 66.5 → 73.9%, LocalLLaMA 63.0 → 66.3%. Sources least like the training data gained the least.

On Jevals (suite 0.1.0, Decision Score), the fast readout scores 58.6 on PubMedQA, 61.3 on Banking77 and 2.4 on HelpSteer2. That puts it mid-pack, 6-10 points behind Jev, but among the best-calibrated entries on the board.

How it works

  • Fast readout. The prompt (thinking off) ends where the answer letter goes. The model's next-token logits for the option letters A, B, ... are divided by a per-question-type temperature (in calibration.json) and passed through a softmax. Nothing is generated.
  • Thinking mode. The same prompt with thinking on. The model writes a chain inside <think>...</think>, then the letter. Reading the letter probabilities right after the chain gives calibrated probabilities for this mode too.
  • Routing. Every question gets the fast readout. Questions whose margin is small go to thinking. The margin is the log-probability gap between the top two options. Routing the least certain 30% recovers 79% of the accuracy gap between fast and thinking mode, at a fraction of the cost.

Usage

Requires transformers>=5.19 (the version the checkpoint was saved with), torch and accelerate. Qwen3.5 uses Gated DeltaNet layers: install flash-linear-attention and causal-conv1d for fast kernels, or transformers falls back to a slow PyTorch path.

The prompt format matters: the model was trained on one fixed format, and decision.py in this repo builds it.

import json, os, sys
import torch
from huggingface_hub import hf_hub_download
from transformers import AutoModelForCausalLM, AutoTokenizer

repo = "Mercity/decision-model-qwen3.5-4b"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, dtype=torch.bfloat16, device_map="auto")
calib = json.load(open(hf_hub_download(repo, "calibration.json")))
sys.path.insert(0, os.path.dirname(hf_hub_download(repo, "decision.py")))
import decision as D

# Fast readout: one forward pass, a probability per option
evidence = "Order #1182: 3 x USB-C dock at $79 each, shipping $12."
criterion = "Does the order fit within a budget of $250?"
options = D.yes_no_options()                    # A = true, B = false
probs = D.fast_readout(model, tok, evidence, criterion, options, temperature=calib["readout"]["noul"])
print(probs)                                    # [p(true), p(false)]

Options are written as id: description, whichever parts exist. Use the helpers to build them:

choice = [D.option("refund", "Issue a refund."), D.option("replace", "Send a replacement."),
          D.option("escalate", "Hand the ticket to a human agent.")]           # qtype "choice"
score = D.score_options(["Benign: read-only actions.", "Low: routine writes.",
                         "Moderate: irreversible actions.", "High: destructive actions."])  # qtype "score"

Routed system (fast by default, thinking for low-margin questions):

def decide(evidence, criterion, options, qtype, cutoff=calib["routing"]["cutoff_route_30pct"]):
    probs = D.fast_readout(model, tok, evidence, criterion, options, temperature=calib["readout"][qtype])
    if D.margin(probs) >= cutoff:
        return {"answer": max(range(len(probs)), key=probs.__getitem__), "probs": probs, "mode": "fast"}
    rec = D.think(model, tok, evidence, criterion, options, max_new_tokens=8192,
                  temperature=0.6, top_p=0.95, top_k=20)        # Qwen3.5's recommended thinking settings
    post = D.post_chain_readout(model, tok, rec, len(options), temperature=calib["thinking"][qtype])
    if post is None:                                            # chain did not finish: keep the fast answer
        return {"answer": max(range(len(probs)), key=probs.__getitem__), "probs": probs, "mode": "fast"}
    return {"answer": max(range(len(post)), key=post.__getitem__), "probs": post, "mode": "thinking",
            "chain": rec["text"]}

qtype is "choice", "noul" (yes/no) or "score". The cutoff in calibration.json sent 30% of our evaluation questions to thinking; the share on your traffic will differ, so set the cutoff from a sample of your own questions. Our evaluation allowed chains up to the 32K context. The RL stage capped chains at 8,192 tokens, and 0.2% of chains did not finish.

Serving with vLLM. Our numbers come from vLLM. For the fast readout, request one token restricted to the option letters and read their log-probabilities:

from vllm import LLM, SamplingParams
llm = LLM(repo, dtype="bfloat16", max_model_len=32768, max_logprobs=26, logprobs_mode="processed_logprobs")
ids = D.letter_ids(tok, len(options))
prompt = tok.apply_chat_template(D.messages(evidence, criterion, options), tokenize=False,
                                 add_generation_prompt=True, enable_thinking=False)
out = llm.generate(prompt, SamplingParams(max_tokens=1, temperature=1.0, allowed_token_ids=ids, logprobs=len(ids)))
lp = out[0].outputs[0].logprobs[0]
logprobs = [lp[i].logprob for i in ids]     # then softmax(logprobs / temperature)

Training

  1. Supervised (V2). One LoRA (rank 32, alpha 64) on every linear layer, including the Gated DeltaNet projections. It was trained jointly on two losses:

    • a readout loss: cross-entropy of the option-letter softmax against the target distribution;
    • a chain loss: next-token loss on reasoning chains.

    The data was 41,994 readout questions (Mercity/decision-model-data, configs readout and chains): 18,000 generated procedural decisions (tasksource/procedural-typed-decisions) and 23,994 converted from 717 tasksource datasets. Half were shown in shuffled option order. It also used 10,974 filtered chains: the model's own shortest correct chains, plus chains from Qwen3.5-35B-A3B for 662 hard questions. Learning rate 2e-4 (from a 3-rate sweep), 1,309 steps, 47.8M tokens, 2 h 46 min on one A100 80GB.

  2. GRPO on thinking mode. Supervised chain training had made 5.1% of chains loop. RL fixed that (questions: config rl of the dataset):

    • 60 steps on 240 questions (63% never seen in training), 8 chains per question, chains capped at 8,192 tokens;
    • reward +1 right / -1 wrong, -1.5 for no answer, and a length penalty past 4,096 tokens;
    • DAPO-style token-level loss with no KL term;
    • learning rate 1e-5 for steps 1-40, then 2.5e-5 for steps 41-60.

    Loops fell to 0.2%, thinking accuracy recovered by 1.9 points, and thinking tokens roughly halved.

  3. Calibration. Per-type temperatures fitted on 515 held-out questions, never on evaluation data (calibration.json).

Limitations

  • Built for one prompt format. It is not a chat model. Use decision.py or reproduce its format exactly.
  • Out-of-distribution gains are smaller. On LocalLLaMA (real-world agent traces with panel votes) it gains 3 points over the base model, against 43 on procedural tasks.
  • Yes bias on yes/no questions. It answers yes on 62% of our yes/no questions, where the gold rate is 50%.
  • Overconfident after thinking. Probabilities read after a chain are overconfident. Thinking raises accuracy but can lower Brier-type scores (Jevals HelpSteer2: 2.4 fast vs -20.1 thinking).
  • Limited validation. Results are from single training runs, and the RL stage was short (60 steps). We scored S1MB and Jevals with our own reimplementations of their published scoring rules, checked against their published numbers.

More

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
Qwen3_5ForCausalLM
Ревизия весов
5c4ddd2

0 моделей