/ Модель

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

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

switchboard-router-4b

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

Switchboard Router 4B — англоязычный маршрутизатор запросов, который предлагает подходящий ценовой уровень языковой модели в формате JSON.

435скачиваний за 30 дней0лайковвеса обновлены27 окт 2026

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Switchboard Router 4B — плотная языковая модель семейства Qwen3, разработанная Switchboard и дообученная на базе Qwen/Qwen3-4B-Instruct-2507. Она анализирует отдельный запрос и возвращает JSON с рекомендуемым уровнем модели (small, mid или frontier), а также подсказкой о предметной области. Модель предназначена для маршрутизации запросов к классам языковых моделей с учётом ожидаемого качества и стоимости.

В проверке на 10 000 отложенных запросов авторы сообщают об экономии 67% относительно отправки всех запросов Claude Opus 5.5; 5% запросов были направлены на уровень дешевле необходимого. Модель обучена методом LoRA (ранг 32, адаптация проекций внимания и MLP с последующим объединением весов) на 63 749 примерах из routellm/gpt4_dataset. Репозиторий содержит веса BF16 в safetensors; для Ollama и llama.cpp опубликована отдельная сборка GGUF Q8_0. Лицензия — Apache-2.0.

Модель рассчитана преимущественно на англоязычные запросы. Она обрабатывает один запрос за раз и учитывает только первые 512 токенов, поэтому не анализирует полный контекст диалога. Автор предупреждает, что маршрутизация ошибается и не должна использоваться как граница безопасности; поле domain формируется по ключевым словам и служит лишь подсказкой. Обучающие метки основаны на ответах моделей 2023 года и оценках GPT-4, а не на человеческой разметке.

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

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

Ограничения

Модель может направить запрос на слишком дешёвый уровень; в авторской проверке таких случаев было 5%. Она обрабатывает только один запрос и первые 512 токенов, а результат зависит от меток, полученных на устаревших ответах моделей и оценках GPT-4; автор не рекомендует использовать её как границу безопасности.

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

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

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

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

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

Открыть на Hugging Face

Switchboard

switchboard-router-4b

Most prompts don't need a frontier model, the same way a plaster doesn't need a surgeon. Switchboard 4B reads a prompt and answers with one line of JSON: the cheapest tier that can handle it. Open weights, Apache 2.0.

Receipts, on 10,000 held-out prompts:

Switchboard 4BRandom routing
Cost vs. always Claude Opus 5.567.0% less
Sent to a model too small5.0%10.2%

Every raw answer is on the evaluation page.

This is the larger sibling of switchboard-router-0.5b. Same training data, same answer format, same test set. On 10,000 held-out prompts it saves more and sends fewer hard prompts to a cheap model.

Try the 0.5B in your browser: Switchboard demo · Run the 4B locally: GGUF for Ollama

Largest size: switchboard-router-32b, tested on the same 10,000 prompts. It sends fewer hard prompts to a cheap model than the 4B and saves a little less.

Run it

With Ollama (4.28 GB download, a GPU is recommended):

ollama run hf.co/switchboardllm/switchboard-router-4b-GGUF "Prove there are infinitely many primes of the form 4k+3"
{"tier":"frontier","domain":"math"}

With Transformers:

from transformers import AutoModelForCausalLM, AutoTokenizer
import json

repo = "switchboardllm/switchboard-router-4b"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, torch_dtype="bfloat16", device_map="auto")

msgs = [{"role": "user", "content": "Unscramble the following words: eglar, ngareo, kobo"}]
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(ids, max_new_tokens=24, do_sample=False)
print(json.loads(tok.decode(out[0, ids.shape[1]:], skip_special_tokens=True)))
# {'tier': 'frontier', 'domain': 'general'}

With Python, using the switchboard-router package:

from switchboard_router import Router

router = Router(backend="ollama", backend_model="hf.co/switchboardllm/switchboard-router-4b-GGUF")
router.pick_model("Write a haiku about rain")
# 'anthropic/claude-haiku-5.5'

Use greedy decoding (do_sample=False, or temperature 0).

What it answers

FieldValues
tiersmall, mid or frontier: the cheapest class of model expected to answer the prompt well
domaincode, math, writing or general: a hint, from keyword labels

If the output isn't valid JSON, send the prompt to frontier. A failed routing call should cost money, never quality.

4B vs 0.5B

Both models on the same 10,000 held-out prompts they never saw in training, in their natural mix:

0.5B (v0.1)4B4B minus 0.5B (95% CI)
Cost saved vs. always using Claude Opus 5.564.5%67.0%+2.5 pts (+1.8 to +3.3)
Hard prompts sent to frontier59.1%63.2%+4.1 pts (+1.4 to +6.7)
Sent too low (needed frontier, sent cheaper)5.5%5.0%-0.5 pts (-0.9 to -0.2)
Prompts served well (proxy)94.5%95.0%
Ranking AUC (hard vs. rest)0.7870.827
Tier accuracy60.3%64.0%
Invalid JSON outputs00
Time per decision (RTX 5070 Ti, Transformers)288 ms489 ms

Confidence intervals come from a paired bootstrap over the 10,000 prompts (2,000 resamples), and none of them include zero. The gain is real but moderate: the ceiling is set by the labels, and a perfect router on this data would save 76.2%.

How it's measured. Each prompt in routellm/gpt4_dataset comes with a 2023 Mixtral-8x7B answer scored 1-5 by a GPT-4 judge. A prompt counts as served well if Switchboard sent it to frontier, or sent it lower and that answer scored at least 4. Cost uses Surplus output prices per 1M tokens: Claude Haiku 5.5 ($0.50) for small, Claude Sonnet 5.5 ($10) for mid, Claude Opus 5.5 ($20) for frontier. Method and every 0.5B answer are on the evaluation page.

Builds

BuildSizeRuns withSame decision as this model
This repo (safetensors, BF16)8.04 GBTransformers, vLLMreference
GGUF Q8_04.28 GBOllama, llama.cpp339 of 347 test prompts

Q4_K_M agreed on only 302 of 347, so it is not published. The few disagreements left in Q8_0 are borderline prompts: the BF16 model itself changes 5 of 347 decisions between batched and one-at-a-time inference.

The model

BaseQwen3-4B-Instruct-2507 (Apache-2.0)
MethodLoRA, rank 32, on all attention and MLP projections, merged into BF16 weights
Training dataroutellm/gpt4_dataset (Apache-2.0, LMSYS), 63,749 rows, the same set as 0.5B v0.1
LabelsMixtral score 5 → small, 4 → mid, 1-3 → frontier; domain from keywords
Training1 epoch in 184 minutes on one RTX 5070 Ti. Best checkpoint by eval loss (0.0849). Loss on the JSON answer only.
Prompt formatThe 0.5B chat template, so both models are drop-in replacements for each other
Prompt lengthTrained on prompts cut to 512 tokens

Limitations

  • It still misroutes some prompts: 5.0% of held-out prompts were sent to a cheaper tier than they needed.
  • Labels come from 2023 models and a GPT-4 judge, not from people. Mostly English prompts.
  • It reads one prompt at a time, not the whole conversation, and only the first 512 tokens.
  • A prompt can try to talk it into a cheaper tier. Don't use it as a security boundary.
  • domain comes from keyword labels and is only a hint.
  • Switchboard is an independent project and is not affiliated with Anthropic, Alibaba, Robinhood, Surplus or the Switchboard oracle network.

License

Apache-2.0, inherited from Qwen3-4B-Instruct-2507 and routellm/gpt4_dataset.

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей