/ Модель

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

Контекст
131 072 токена
Лицензия
Apache 2.0
Архитектура
GLiClass · dense
Базовая модель
Qwen3-0.6B
Опубликована
21 июл 2026

scx-router-v0.1

Классификация без дообученияТекст → label3 профессии

Компактная модель SCX и Knowledgator классифицирует запросы и помогает направлять их к подходящей языковой модели.

508скачиваний за 30 дней12лайковвеса обновлены22 июл 2026

Бенчмарки

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

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

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

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

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

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

SCX разработала эту модель совместно с Knowledgator. Это компактный классификатор на базе GLiClass, дообученный на Qwen/Qwen3-0.6B и предназначенный для маршрутизации запросов к языковым моделям и других задач классификации без генерации текста. Модель оценивает набор заданных меток за один проход; список кандидатов и категории можно менять при запуске без дополнительного обучения.

Модель поддерживает маршрутизацию к одной из восьми LLM, определение типа и сложности задачи, потребности в рассуждении и ожидаемой длины ответа, а также классификацию возможной галлюцинации. Для диалоговых сценариев предусмотрен KV-кэш по сессиям, который позволяет повторно классифицировать новые сообщения, кодируя только добавленные токены. README приводит результаты бенчмарков, но отмечает, что часть сквозных оценок относится к предыдущему чекпойнту и не была повторена для текущего.

Модель принимает текст и выдаёт метки классов с оценками. В метаданных указан английский язык; размер базовой модели — 0,6 млрд параметров. Лицензия — Apache-2.0. Классификация зависит от выбранного набора меток, а близкие по смыслу категории могут путаться; качество маршрутизации также зависит от кандидатов и порога принятия решения.

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

  • Выбор одной из восьми LLM для обработки пользовательского запроса
  • Определение типа задачи: например, суммаризация, перевод или программирование
  • Оценка сложности запроса и необходимости рассуждений
  • Прогнозирование ожидаемой длины ответа
  • Проверка ответа на признаки галлюцинации
  • Классификация текста по пользовательскому набору меток

Ограничения

Классификатор может путать концептуально близкие категории, а качество маршрутизации зависит от состава моделей-кандидатов и порога оценки. Некоторые сквозные бенчмарки в README относятся к предыдущему чекпойнту, а не к этой версии.

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

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

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

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

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

Открыть на Hugging Face

⭐ GLiClass Model Router

Developed by SCX in collaboration with Knowledgator.

A lightweight GLiClass-based model router that scores which of 8 candidate LLMs should handle a request, its task type, difficulty, reasoning need, expected output length, and whether a response looks hallucinated. Additionally, the model supports zero-shot classification and works naturally with chat-like inputs.

Why use it

  • No generation, one pass — a calibrated probability per label, not a decoded token stream.
  • Zero-shot labels — swap the model roster, task taxonomy, or add a custom label set at inference time, no retraining required.
  • Streaming-native — a decoder KV cache per session means a multi-turn conversation is re-routed every turn at the cost of encoding only the new tokens, not the whole history.
  • One checkpoint, many signals — model routing, 28-way task type, difficulty, reasoning mode, output length, and hallucination detection all come from the same ~0.6B model.
  • Small footprint — cheap enough to co-locate with a gateway or run alongside the models it's routing to.

Installation

pip install gliclass -U

Usage

Single input

One text, scored against a label set in a single forward pass — the same call pattern for any label family (model routing, task type, difficulty, reasoning mode, output length, hallucination, or a custom label set).

from gliclass import GLiClassModel, ZeroShotClassificationPipeline
from transformers import AutoTokenizer

model_path = "scx-admin/scx-router-v0.1"  # or a local path to this checkpoint

model = GLiClassModel.from_pretrained(model_path)
tokenizer = AutoTokenizer.from_pretrained(model_path)

pipeline = ZeroShotClassificationPipeline(
    model, tokenizer, classification_type="multi-label", device="cuda:0"
)

text = "Write a Python function that merges two sorted linked lists."
labels = [
    "coder", "DeepSeek-V3.1", "gemma-4-31B-it", "gpt-oss-120b",
    "Llama-4-Maverick-17B-128E-Instruct", "MAGPiE",
    "Meta-Llama-3.3-70B-Instruct", "Qwen3-32B",
]

for r in pipeline(text, labels, threshold=0.5)[0]:
    print(r["label"], "=>", round(r["score"], 3))

Streamed input — message by message

StreamingZeroShotClassificationPipeline keeps one KV cache per session_id. Each call appends only the newest message; tokens_added and cached_length show exactly what got encoded versus reused from cache.

from gliclass import GLiClassModel, StreamingZeroShotClassificationPipeline
from transformers import AutoTokenizer

model = GLiClassModel.from_pretrained(model_path)
tokenizer = AutoTokenizer.from_pretrained(model_path)

router = StreamingZeroShotClassificationPipeline(
    model, tokenizer, classification_type="multi-label", device="cuda:0"
)

session_id = "chat-42"
turns = [
    "I need help refactoring some Rust code.",
    "Specifically the borrow checker keeps rejecting this function.",
    "fn parse(&mut self, buf: &[u8]) -> Result<Token, Error> { ... } -- here's the body.",
]

for turn in turns:
    out = router(turn, labels, session_ids=session_id, threshold=0.5)[0]
    print(f"+{out['tokens_added']} new tokens -> cache now {out['cached_length']} tokens")
    if out["triggered"]:
        for pred in sorted(out["predictions"], key=lambda p: -p["score"]):
            print(f"  {pred['label']:<38s} {pred['score']:.3f}")

# only each turn's own tokens are encoded -- earlier turns stay in the KV cache

Task-type classification — 28-way, single-label:

task_types = [
    "analysis", "classification", "clustering", "code", "comparison", "critique",
    "decision support", "evaluation", "explanation", "fact checking", "forecasting",
    "generation", "information extraction", "information retrieval", "instruction following",
    "math & reasoning", "multi-turn", "planning", "problem solving", "programming", "qa",
    "reasoning", "recommendation", "rewriting", "summarization", "translation",
    "verification", "visualization",
]

pipeline = ZeroShotClassificationPipeline(model, tokenizer, classification_type="single-label", device="cuda:0")
result = pipeline("Compare these two vendor contracts and flag the riskier clauses.", task_types)[0]
print(result[0]["label"], result[0]["score"])  # -> "comparison" 0.9xx

Difficulty & expected output length — feeds token-budget decisions:

difficulty_labels = ["very easy", "easy", "medium", "hard", "extra hard"]
length_labels = [
    "1-64 output tokens", "65-128 output tokens", "129-256 output tokens",
    "257-512 output tokens", "513-1024 output tokens", "1025-2048 output tokens",
    "2049-4095 output tokens",
]

text = "Derive the closed-form solution for this second-order linear recurrence and prove convergence."
difficulty = pipeline(text, difficulty_labels)[0][0]
length = pipeline(text, length_labels)[0][0]
print(difficulty["label"], length["label"])

Reasoning-mode routing — toggle extended thinking on/off:

reasoning_labels = ["reasoning", "nonreasoning"]
mode = pipeline("What's a good one-line commit message for this typo fix?", reasoning_labels)[0][0]
enable_thinking = mode["label"] == "reasoning"

Hallucination detection — score a candidate response, not the request. Treat this as a directional signal (F1 ≈ 65%, see benchmarks below) rather than a sole filtering gate:

hallucination_labels = ["correct", "hallucinated"]
answer_text = "The Eiffel Tower was completed in 1889 for the World's Fair."
verdict = pipeline(answer_text, hallucination_labels)[0][0]
print(verdict["label"], verdict["score"])

General zero-shot classification — custom labels, not just routing. The pre-training mix also covers topics, sentiment, emotion, NLI, guardrails and toxicity, so arbitrary label sets work too:

labels = ["travel", "finance", "health", "sports", "technology"]
result = pipeline("The new mid-range EV just posted a 480-mile range on a single charge.", labels)[0]
for r in sorted(result, key=lambda x: -x["score"]):
    print(r["label"], round(r["score"], 3))

Benchmarks

Threshold 0.5 unless noted. Per-family macro F1 is the unweighted mean of the listed per-class F1 scores.

Model routing — macro F1 ≈ 75.9%

Precision is consistently high (0.74–0.84) across all 8 candidates; recall is the swing factor, favoring frequently-correct generalists (Gemma 4 31B, Llama 4 Maverick) over narrower specialists (Qwen3 32B, MAGPiE).

ModelPRF1
Gemma 4 31B0.80640.95010.8723
Llama 4 Maverick0.78920.75290.7706
GPT-OSS 120B0.83960.70630.7672
Coder0.81400.70000.7527
Llama 3.3 70B0.76380.72390.7433
DeepSeek V3.10.74750.72200.7346
MAGPiE0.73940.72340.7313
Qwen3 32B0.75050.64990.6966

End-to-end gain by LiveBench dataset

Router vs mean-of-8-models accuracy by LiveBench dataset

Reference numbers from the most recent end-to-end routing benchmark (results/report.json, 100 tasks per subset, checkpoint models/decoder_kv/post_train) — this end-to-end benchmark has not yet been re-run for lasty, so treat it as prior context rather than a lasty-specific result. Gains are largest where the 8 candidate models disagree the most (livebench/language +26.2 pts, livebench/math +18.3 pts) and smallest where they already cluster together (livebench/data_analysis +0.1 pts).

LiveBench datasetRouterMean of 8 modelsGain
livebench/language0.7790.517+26.2 pts
livebench/math0.7380.555+18.3 pts
livebench/instruction_following0.8630.768+9.5 pts
livebench/reasoning0.6010.551+5.0 pts
livebench/coding0.5000.456+4.4 pts
livebench/data_analysis0.5400.539+0.1 pts

Task-type routing — macro F1 ≈ 83.7%

28-way taxonomy, single-label, alphabetical order. Near-perfect on well-separated categories (analysis, code, IE, QA, reasoning, summarization, translation); weakest on task types that overlap conceptually with others — problem solving is frequently folded into programming/math & reasoning, and decision support/evaluation/critique overlap with each other and with verification.

Task typePRF1
Analysis1.00001.00001.0000
Classification0.99741.00000.9987
Clustering1.00000.86000.9247
Code1.00001.00001.0000
Comparison0.63850.83000.7217
Critique0.63390.71000.6698
Decision support0.57940.62000.5990
Evaluation0.81540.53000.6424
Explanation0.80170.97000.8778
Fact checking0.95600.87000.9110
Forecasting0.96550.84000.8984
Generation0.99281.00000.9964
Information extraction / IE1.00001.00001.0000
Information retrieval0.97870.46000.6259
Instruction following1.00000.92310.9600
Math & reasoning0.45210.66000.5366
Multi-turn1.00000.99360.9968
Planning0.72130.88000.7928
Problem solving0.30770.08000.1270
Programming0.57740.97000.7239
QA1.00001.00001.0000
Reasoning0.99771.00000.9988
Recommendation0.76600.72000.7423
Rewriting0.90321.00000.9492
Summarization1.00001.00001.0000
Translation1.00001.00001.0000
Verification0.77450.79000.7822
Visualization1.00000.93000.9637

Difficulty routing — macro F1 ≈ 78.9%

Most top-1 misses land one ordinal step away (hard ↔ extra hard); top-k accuracy is a fairer read than exact top-1 match for an ordinal scale like this.

DifficultyPRF1
Very easy0.82460.94000.8785
Easy0.83130.69000.7541
Medium0.83810.88000.8585
Hard0.78670.59000.6743
Extra hard0.70730.87000.7803

Reasoning-mode routing — average F1: 89.73%

The strongest head in this checkpoint.

ModePRF1
Reasoning0.91000.87090.8900
Non-reasoning0.93000.88060.9046

Output-length routing — macro F1 ≈ 78.8%

Precision drops sharply in the 1,025–2,048 token bucket — the model over-predicts this bucket, likely because it sits between the more distinctive "short answer" and "long-form generation" regimes.

Output lengthPRF1
1–64 tokens0.90480.95000.9268
65–128 tokens0.81820.81000.8141
129–256 tokens0.74560.85000.7944
257–512 tokens0.84380.81000.8265
513–1,024 tokens0.85370.70000.7692
1,025–2,048 tokens0.54370.87000.6692
2,049–4,095 tokens0.74000.68660.7123

Details

Model families

  • Model routing — which of 8 candidate LLMs is likely to solve the request (multi-label): coder, DeepSeek-V3.1, gemma-4-31B-it, gpt-oss-120b, Llama-4-Maverick-17B-128E-Instruct, MAGPiE, Meta-Llama-3.3-70B-Instruct, Qwen3-32B.
  • Task type — a 28-way taxonomy: analysis, classification, clustering, code, comparison, critique, decision support, evaluation, explanation, fact checking, forecasting, generation, information extraction, information retrieval, instruction following, math & reasoning, multi-turn, planning, problem solving, programming, qa, reasoning, recommendation, rewriting, summarization, translation, verification, visualization.
  • Difficulty — 5 levels: very easy, easy, medium, hard, extra hard.
  • Reasoning mode — whether extended reasoning should be enabled: reasoning vs nonreasoning.
  • Expected output length — token-range buckets from 1-64 up to 2049-4095 output tokens.
  • Hallucination detection — whether a response is correct or hallucinated (new head in this checkpoint).
  • General zero-shot classification — the pre-training mix also covers topics, sentiment, emotion, NLI, guardrails, toxicity, and safety taxonomies, so the model remains a capable general-purpose classifier beyond routing.

A new architecture, not just a new checkpoint

Model architecture

Every previously released GLiClass model (gliclass-small/base/large-v1.0 and successors) uses a bidirectional uni-encoder: the whole input is re-encoded from scratch on every call. This checkpoint introduces GLiClass's first decoder-KV architecture — a causal Qwen3-0.6B backbone where the conversation lives in an ordinary decoder KV cache. In a session, each new turn only pays to encode its own tokens; labels are then re-scored against the full cached context. That single change turns a stateless classifier into a streaming router.

ComponentValue
Architecture typedecoder-kv (GLiClassModel)
BackboneQwen/Qwen3-0.6B (28 layers, hidden size 1024, 16 attention heads / 8 KV heads, full attention, 40,960 max positions)
Parameters~0.6B (backbone + lightweight scorer head)
Special tokens<<LABEL>>, <<SEP>>, <<EXAMPLE>>
Class token poolingfirst
Scorer head16 attention heads, MLP hidden size 1024, 2 scorer-encoder layers

Labels are injected as <<LABEL>> label_text segments and scored against the text representation from the decoder. Because the text context lives in the KV cache, the model supports cheap incremental/streaming classification: in a multi-turn session, only new text tokens need to be encoded on each turn, while labels are (re-)scored against the full cached context.

How this compares to other router designs

Embedding models, encoder-only classifiers, and generative LLM routers each have a real strength. Decoder-KV is the one architecture that combines inference-time labels, a chat-aligned causal backbone, and incremental dialogue state without paying autoregressive generation cost on every routing decision.

ApproachPrimary benefitNew dialogue turnInference-time labelsChat alignmentAutoregressive generationRouting output
GLiClass decoder-KV (this checkpoint)Semantic label–text matching with a task-trained classification scorer.Reuses the session KV cache, encodes only new tokens, and re-scores labels against the full context.NativeStrong causal/chat-aligned backboneNot requiredOne non-generative forward pass produces an independent probability for each label.
Embedding / bi-encoderVery inexpensive semantic similarity; label embeddings can be precomputed.No token-level dialogue cache; the updated conversation is typically re-embedded in full.NativeUsually limitedNot requiredFast nearest-neighbor similarity score, but cosine similarity requires calibration and provides limited text–label interaction.
Encoder-only (e.g. DeBERTa)Strong bidirectional discrimination for a fixed taxonomy or NLI formulation.Requires a new full-sequence forward pass each turn; zero-shot use may require one pass per candidate label.Fixed classification head or pairwise NLIUsually limitedNot requiredProduces logits or pairwise scores, but repeated full-context and sometimes per-label encoding increases multi-turn cost.
Generative LLM routerChat-native and highly flexible; can also explain its routing decision.Prefix KV reuse helps, but the router must still autoregressively generate route tokens.Native through the promptStrongRequiredGenerates a route that must be parsed, adding latency, cost, and output non-determinism.

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

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

GPU в ailist

Универсальный рантайм · zero-shot-classification

Нельзя запустить

Архитектура GLiClass неизвестна transformers в образе рантайма.

Класс архитектуры
GLiClassModel
Ревизия весов
b45625d

0 моделей