/ Модель

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

Контекст
8 192 токена
Лицензия
Apache 2.0
Базовая модель
mmBERT-base
Библиотека
sharada
Опубликована
6 окт 2026

sharada-multilingual-base

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

Многоязычный энкодер для классификации текста по заданным пользователем вариантам с оценкой вероятности каждого ответа.

69скачиваний за 30 дней1лайквеса обновлены6 окт 2026

Бенчмарки

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

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

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

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

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

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

Sharada Multilingual Base — модель классификации текста от Lena Barretta, построенная на многоязычном энкодере jhu-clsp/mmBERT-base. Она оценивает заданные пользователем варианты ответа и возвращает вероятность для каждого; генерации текста не происходит. Модель содержит 308 млн параметров и рассчитана на текст длиной до 256 токенов, вопрос длиной до 48 токенов и до 12 токенов на вариант ответа.

Модель предназначена для классификации с вариантами, заданными во время запроса, в том числе для новых наборов меток. Её обучали на 663 357 примерах из 35 наборов меток: среди задач были определение намерений и тем, оценка отзывов, распознавание эмоций, токсичности, спама и логического следования. Разработчик сообщает о проверке ещё на семи наборах, исключённых из обучения. Архитектура устроена так, что порядок вариантов не влияет на ответ, оценка варианта не зависит от других предложенных вариантов, а текст кодируется один раз для нескольких вопросов.

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

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

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

Ограничения

Обрабатывает до 256 токенов текста; более длинные документы нужно разбивать на фрагменты. Медицинские, юридические и программные задачи не проверены как надёжные сценарии применения, а вероятности требуют повторной калибровки при изменении целевых данных.

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

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

Открыть на Hugging Face

lenabarretta/sharada-multilingual-base

A small encoder that makes typed decisions about text in one forward pass. The options come with the request and what comes back is a probability for each of them: nothing is generated and nothing is parsed. Because the labels are part of the input rather than part of the weights, a label set it has never been trained on still gets an answer.

Code, examples and the training run: https://github.com/LenaBarretta/sharada. The design and the experiments behind it: https://lenatriestounderstand.com/notes/llm/024-rlcr/.

pip install sharada
from sharada import DecisionModel

model = DecisionModel.from_pretrained("lenabarretta/sharada-multilingual-base")

d = model.decide(
    text="My card still hasn't arrived and I ordered it two weeks ago.",
    question="Which team should handle this?",
    options=["billing", "card delivery", "technical support", "account closure"],
)
d.answer, d.confidence, d.probabilities

Fine-tuning on a few hundred of your own labelled examples is the intended use:

report = model.fit(examples)      # holds 20% out, early-stops, then fits a temperature per task
model.save("my-router")

What it is

encoderjhu-clsp/mmBERT-base
parameters308M
textup to 256 tokens, plus 48 for the question and 12 per option
kinds of questionchoice (unordered labels), scale (ordered steps), binary (yes or no)
outputone probability per option, from a single forward pass
weightsfloat16 on disk, float32 in memory — a storage format, not quantisation
one decision23.1 ms per question

Three properties hold by construction rather than by training: the order of the options cannot change the answer (every option branch starts at the same position id), an option's score does not depend on which other options are offered (an option reads the text, the question and itself), and the text is read once however many questions are asked of it. The tests in the repository check all three on an untrained model.

How it was trained

663,357 examples from 35 public label sets — intents, topics, review scores, emotion, toxicity, spam and entailment — for 15,000 steps of 32, AdamW at 3e-05 with a cosine schedule, cross entropy loss. The published weights are the ones that measured best on held-out data, at step 15,000 of 15,000 — past that the model stops answering better and only grows more certain. 7 further label sets were held out of training entirely and only measured: arxiv-category, claim-veracity, massive-scenario, medical-pair, poem-tone, subjective, topic-unseen-languages.

In training the options were shuffled, long label sets were often shown as a sampled handful, and each label set was asked through several wordings of its question — so the model reads the options and the question rather than their positions.

What it scores

Trained on is what that label set actually contributed to this run — not its cap, since a small dataset runs out first and a pooled multilingual one is split between its languages; a dash means the model never saw it. Measured on is how many held-out examples the accuracy beside it rests on, and it is worth reading first: a row measured on ninety-six examples moves by a full point when one answer changes.

Measured on held-out examples, with every label offered at once — all 151 intents of clinc, all 77 of banking — because that is what a request actually looks like. One temperature per label set was fitted on the same held-out examples. ECE is the expected calibration error over 15 equal bands: how far the stated probability is from how often it turns out right. Rows marked unseen are label sets kept out of training entirely, never trained on, only measured.

label setanswer optionskindtrained onmeasured onaccuracylog lossECET
clinc-intent151choice24,0004800.8830.4170.0350.891
banking-intent77choice19,9864800.8540.4940.0341.0
massive-intent59choice23,0284800.8750.4470.0471.26
question-type-fine50choice10,9042400.9000.2870.0591.122
massive-intent-multi35choice72,0001,4400.8490.5350.0321.414
fine-emotion28choice18,0003600.5811.3190.0511.122
newsgroup20choice14,5922920.6850.9300.0781.189
entity-type14choice18,0003600.9970.0040.0030.375
forum-topic10choice18,0003600.7690.7060.0420.891
topic-multi7choice30,3986600.8150.5960.0442.119
question-type6choice10,9042400.9750.0840.0161.26
emotion6choice15,0003000.9130.2560.0251.414
app-stars5scale15,0003000.6770.8670.0471.059
review-stars5scale24,0004800.6500.7520.0450.944
sentence-tone5scale15,0003000.5700.9980.0831.26
news-section4choice18,0003600.9330.1690.0170.944
tweet-emotion4choice6,5142400.8170.4320.0571.059
entailment-short3scale18,0003600.8750.3420.0450.944
entailment3scale24,0004800.8150.4910.0271.189
entailment-multi3scale71,9681,4280.7640.5620.0271.26
tweet-sentiment3scale15,0003000.6800.6990.0531.26
spam2binary10,0342400.9920.0240.0051.059
product-tone2scale15,0003000.9470.1260.0250.891
short-verdict2scale12,0002400.9380.1830.0250.891
movie-verdict2scale15,0003000.9330.1670.0511.059
toxic-comment2binary15,0003000.9200.1990.0391.059
answers-question2binary18,0003600.8920.2820.0111.0
paraphrase2binary15,0003000.8830.2650.0431.414
offensive2binary15,0003000.8630.3220.0320.841
same-question2binary18,0003600.8250.3800.0341.0
hateful2binary14,9893000.8100.3870.0521.122
same-meaning2binary7,3362400.7870.4610.0331.498
follows2binary4,9802400.7790.4810.0531.414
grammatical2binary15,0003000.7400.5040.0821.414
irony2binary5,7242400.7250.5670.0770.749
massive-scenario (unseen)18choice—2400.7670.6920.0881.26
arxiv-category (unseen)11choice—1800.5221.4410.0801.122
topic-unseen-languages (unseen)7choice—2400.6790.9120.0681.782
poem-tone (unseen)4scale—960.5101.1260.2051.414
claim-veracity (unseen)4choice—1800.3831.3380.0922.828
medical-pair (unseen)2binary—1800.7500.5580.0612.0
subjective (unseen)2choice—1800.4610.7090.0778.0

Overall: accuracy 0.802, log loss 0.518, Brier 0.269, calibration error 0.009 (95% interval [0.008, 0.016]).

The family

checkpointencoderdownload
lenabarretta/sharada-baseModernBERT-base, 150M300 MBthe default, and the one to fine-tune
lenabarretta/sharada-largeModernBERT-large, 397M794 MBa few points better, about a third slower
lenabarretta/sharada-multilingual-base — you are heremmBERT-base, 308M616 MBthe same model over many more languages
lenabarretta/sharada-multilingual-smallmmBERT-small, 141M282 MBnarrower body, for throughput rather than for one fast answer

Everything that makes a model what it is lives in the checkpoint: which encoder it wants, how long a text it reads, the temperature fitted for each task. The library reads all of that out of config.json, so a bigger model or a multilingual one is another repository rather than another version of sharada — and from_pretrained loads any of them with the same line.

That is also why a multilingual model cannot be a flag on this one. This encoder is English down to its tokenizer; reading another language means other weights, not another setting.

The probabilities expire

A temperature is fitted on a distribution, not on a model, so it goes stale when the traffic moves. The run's passport.json records what it was fitted on and what should make you fit it again:

from sharada import check_passport
import json

check_passport(json.load(open("passport.json")), recent_examples, model)
# [] when it finds nothing wrong

Fit it again on your own labelled examples before trusting the numbers on your own traffic — model.calibrate(examples) does it in one call, and model.fit(examples) does it for you.

What it will not do

It does not generate: options or nothing. It reads 256 tokens of text, so longer documents need chunking. It has seen the forty-odd languages of its mix and has not been measured on any outside them. And there is no medicine, law or code in its training mix: the two medical label sets are measured only, and verifying public-health claims lands at the majority-class baseline, which is to say it does not work. Those domains need fine-tuning on your own labelled examples. Finally it is small — where an answer needs a fact that is not in the text in front of it, a frontier model wins.

Apache 2.0.

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

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

GPU в ailist

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

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

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

Ревизия весов
75d06be

0 моделей