/ Модель

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

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

sharada-multilingual-small

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

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

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

Бенчмарки

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

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

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

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

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

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

Sharada Multilingual Small — компактная модель-энкодер на 141 млн параметров, разработанная для классификации текста по вариантам, заданным в запросе. Она дообучена на базе jhu-clsp/mmBERT-small и использует библиотеку Sharada; веса опубликованы в формате safetensors по лицензии Apache 2.0.

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

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

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

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

Ограничения

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

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

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

Открыть на Hugging Face

lenabarretta/sharada-multilingual-small

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-small")

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-small
parameters141M
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 decision21.8 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-intent151choice—4800.8440.5510.0470.944
banking-intent77choice—4800.8350.5830.0291.059
massive-intent59choice—4800.8650.4880.0261.26
question-type-fine50choice—2400.8830.3870.0301.122
massive-intent-multi35choice—1,4400.8340.6170.0231.414
fine-emotion28choice—3600.6031.3450.0951.122
newsgroup20choice—2920.6441.0280.0621.26
entity-type14choice—3600.9970.0120.0030.794
forum-topic10choice—3600.7280.7970.0610.944
topic-multi7choice—6600.7560.7060.0542.119
question-type6choice—2400.9670.1000.0161.059
emotion6choice—3000.8870.2750.0431.414
app-stars5scale—3000.6870.8630.0521.0
review-stars5scale—4800.6400.8070.0600.944
sentence-tone5scale—3000.5501.0480.0541.122
news-section4choice—3600.9280.2140.0220.944
tweet-emotion4choice—2400.8080.4750.0681.059
entailment-short3scale—3600.8500.4490.0371.0
entailment3scale—4800.7790.5460.0461.189
entailment-multi3scale—1,4280.6910.6850.0321.335
tweet-sentiment3scale—3000.6730.7380.0771.122
spam2binary—2400.9920.0190.0101.0
product-tone2scale—3000.9270.1760.0181.059
toxic-comment2binary—3000.9230.2000.0281.122
movie-verdict2scale—3000.9200.1830.0211.059
short-verdict2scale—2400.8920.2200.0541.059
paraphrase2binary—3000.8830.2860.0511.26
offensive2binary—3000.8630.3230.0391.0
answers-question2binary—3600.8530.3450.0321.0
hateful2binary—3000.8170.3960.0231.122
same-question2binary—3600.8110.4310.0411.122
same-meaning2binary—2400.7920.4630.0681.122
irony2binary—2400.7040.5620.0560.749
grammatical2binary—3000.7000.5890.0251.414
follows2binary—2400.6960.5560.0431.498
massive-scenario (unseen)18choice—2400.6960.8640.0831.26
arxiv-category (unseen)11choice—1800.3391.8280.1081.682
topic-unseen-languages (unseen)7choice—2400.5961.1570.0961.888
poem-tone (unseen)4scale—960.5211.0530.1501.122
claim-veracity (unseen)4choice—1800.3501.3700.0464.49
medical-pair (unseen)2binary—1800.6670.6000.0392.245
subjective (unseen)2choice—1800.3830.7040.1768.0

Overall: accuracy 0.773, log loss 0.586, Brier 0.304, calibration error 0.013 (95% interval [0.011, 0.020]).

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-basemmBERT-base, 308M616 MBthe same model over many more languages
lenabarretta/sharada-multilingual-small — you are heremmBERT-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 в образе рантайма.

Ревизия весов
1560e68

0 моделей