/ Модель

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

Контекст
256 токенов
Параметры
33,9 млн
Лицензия
CC BY-SA 4.0
Архитектура
llama · dense
Базовая модель
Viveka-34M
Библиотека
transformers
Опубликована
29 окт 2026

router-34M

Классификация текстаТекст → label3 профессии

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

110скачиваний за 30 дней1лайквеса обновлены5 ноя 2026

Бенчмарки

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

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

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

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

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

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

router-34M — англоязычный классификатор текста, созданный Vrishvardhan Sharma на базе Viveka-34M. Он распределяет запросы по трём категориям: chat для повседневных вопросов и задач письма, science для вопросов о естественных науках и технологиях, maths для математических задач. Модель предназначена для маршрутизации запросов к подходящим моделям в локальном или автономном ассистенте; её можно запускать через Transformers, а в репозитории также есть копия ONNX для CPU.

Модель основана на архитектуре Llama и содержит 33,9 млн параметров. Метаданные указывают контекст в 256 токенов; согласно README, длинные сообщения обрабатываются до 128 токенов. Автор сообщает о точности 98,1% на тестовой выборке из 1 999 вопросов и 31 правильной классификации из 33 сложных примеров. Модель дообучена на наборах вопросов по математике, науке и общим инструкциям.

Лицензия — CC BY-SA 4.0. Модель работает только с английским языком. Среди ограничений — ошибки на коротких вопросах по математической теории, которые могут быть отнесены к науке; при низкой уверенности README рекомендует передавать запрос общей чат-модели.

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

  • маршрутизация вопросов в локальном ИИ-ассистенте
  • распределение запросов по категориям чата, науки и математики
  • выбор специализированной модели для решения математических задач
  • определение научных вопросов перед передачей модели-эксперту
  • предварительная классификация запросов на CPU без подключения к сети

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

router-34M

Which model should answer this? router-34M reads a message and sorts it into one of four buckets, so an assistant can hand it to the right model. It is Viveka-34M fine-tuned as a classifier, small enough to decide in about 40 milliseconds on an ordinary laptop CPU.

LabelMeaningIn Vrishvardhan's offline assistant it goes to
chatsmall talk, everyday questions, and writing tasks (write, summarise, translate, plan)Gemma 4 E2B
sciencephysics, chemistry, biology, space and technology questionsthe general chat model, until his science model is ready
mathsequations, word problems, proofsQwen2.5 Math 7B
codewriting, explaining or fixing codeQwen2.5 Coder 3B

It runs next to thinker-34M, which decides whether a question needs careful thinking.

Results

98.1% correct on 1,999 held-out questions it never saw in training (version 4, November 2026). Version 4 has new labels (science replaced instructions), so this is not the same test as before: version 3 scored 94.1%, version 2 90.9% and version 1 89.2% with the old labels.

It is also tested on 33 tricky messages (very short greetings, plain sums, proofs, science questions, MicroPython questions...), none of them used in training: version 4 gets 31 of 33 right. Examples:

MessageLabel
hichat
Write a poem about rainchat
Why is the sky blue?science
A ball is dropped from 45 m. How long does it take to hit the ground?science
Solve 3x + 5 = 20.maths
Prove that the square root of 2 is irrational.maths
micropython 1.28.0code

Use

from transformers import pipeline
clf = pipeline('text-classification', model='vrishv/router-34M')
print(clf('Solve 3x + 5 = 20.'))

An ONNX copy (model.onnx) is included for CPUs without PyTorch, e.g. with onnxruntime and tokenizers:

import numpy as np, onnxruntime as ort
from tokenizers import Tokenizer
from huggingface_hub import hf_hub_download
tok = Tokenizer.from_file(hf_hub_download('vrishv/router-34M', 'tokenizer.json'))
sess = ort.InferenceSession(hf_hub_download('vrishv/router-34M', 'model.onnx'))
ids = tok.encode('Solve 3x + 5 = 20.').ids[:128]
logits = sess.run(None, {'input_ids': np.array([ids]), 'attention_mask': np.ones((1, len(ids)), dtype=np.int64)})[0]
print(['chat', 'science', 'maths', 'code'][int(logits.argmax())])

Training

Version 4 is built on the IAM-free Viveka-34M (v3) and was fine-tuned on a Kaggle T4 GPU, split 90 / 5 / 5:

LabelExamples from
chatDolly 15k questions and writing, brainstorming, summarising and extraction tasks (CC BY-SA 3.0), Tulu 3 persona instruction-following prompts (ODC-BY), Google Synthetic-Persona-Chat (CC BY 4.0), SQuAD questions (CC BY-SA 4.0), the geography questions of Jigyasa. Questions that are clearly science were left out of chat.
scienceJigyasa Simple, Medium and Big (Apache 2.0, all topics except geography), AI2 ARC (CC BY-SA 4.0), OpenBookQA (Apache 2.0), 12 science subjects of MMLU (MIT), plus science-topic questions and physics / chemistry problems with numbers and units made by a script
mathsGSM8K, MetaMathQA and MATH (MIT), NuminaMath (Apache 2.0), maths theory questions from StackMathQA (CC BY 4.0), plus calculations and named-theorem questions generated by a script
codeCodeAlpaca-20k (only clearly code-related requests) and MBPP (CC BY 4.0), TACO easy and medium problems (Apache 2.0)

Limitations

  • Its weakest spot (from the tricky test): short maths THEORY questions that sound like science, such as "What is the derivative of x squared?" and "what is the Euler line", were not labelled maths. More maths theory data is planned for the next version.
  • Version 4 changed the labels: code written for version 3 that expects instructions must be updated (writing tasks are now chat).
  • When it is unsure (top score below about 0.4), it is better to fall back to a general chat model.
  • English only. Long messages are read up to 128 tokens.

About the maker

router-34M was built by Vrishvardhan Sharma (vrishv), a 9-year-old self-taught builder from India. His other work:

  • GitaVardhan: a free, offline Bhagavad Gita app in 13 Indian languages, and a pocket-sized voice-controlled Gita device he designed, wired and coded himself.
  • Sanskrit Vardhan: an app for learning Sanskrit through the Bhagavad Gita, with word-by-word meanings and step-by-step Pāṇinian derivations. Launched on 20 October 2026 by Prof. Shrinivasa Varakhedi, Vice-Chancellor of Central Sanskrit University.
  • Kannada, Tamil and Telugu Vardhan: apps that teach everyday spoken Kannada, Tamil and Telugu.
  • Hindi Vardhan (hindivardhan.in): a dictionary of pure, Sanskrit-rooted Hindi. Over 6,000 borrowed words in everyday Hindi, each with native alternatives checked against five classical Sanskrit dictionaries.
  • AksharaVardhan: a handwriting reader that runs on an ordinary computer.
  • graphics-studio: a free Space that makes and edits images, videos, music and narration.
  • Viveka-34M: his small language model, trained from scratch, that this model is built on.
  • Shodhana-34M: Viveka trained further to correct lines misread by a handwriting reader.
  • Jigyasa Simple: 473 everyday science questions with short, plain-text answers.
  • Jigyasa Medium and Jigyasa Big: 969 and 970 deeper science questions, built from his own questions, with answers of up to 7 and 10 sentences.
  • thinker-34M: decides whether a question needs careful thinking; used next to this router.

He has memorised the Bhagavad Gita and Pāṇini's Aṣṭādhyāyī, won national Sanskrit recitation competitions, and speaks six languages. More at vrishvardhan.in.

CC BY-SA 4.0 © 2026 Vrishvardhan Sharma.

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей