/ Модель

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

Контекст
32 768 токенов
Параметры
377 млн
Лицензия
MIT
Архитектура
ultrabert · dense
Базовая модель
UltraBERT-380M
Библиотека
transformers
Опубликована
19 окт 2026

ultrabert-380m-dynamic-labels

Заполнение пропусковТекст → текст10 профессий

Англоязычный классификатор на UltraBERT-380M сопоставляет тексты с метками, заданными при запуске, и подходит для zero-shot и многометочной классификации.

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

Бенчмарки

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

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

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

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

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

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

UltraBERT-380M Dynamic Labels — англоязычный классификатор текста с нулевым обучением, созданный независимым дообучением модели dmis-lab/UltraBERT-380M. Он оценивает пары «текст и гипотеза» как entailment, contradiction или neutral, чтобы сопоставить входной текст с метками, заданными пользователем при запуске. Модель предназначена для классификации с произвольным набором меток, включая одно- и многометочную классификацию, а также для оценки релевантности и решений о вызове инструментов.

Модель использует плотный двунаправленный энкодер UltraBERT с 377,5 млн параметров и свежесозданную трёхклассовую голову. При обработке пара ограничивается 512 токенами, поэтому более длинный текст может быть усечён. В тестах модель показала слабые результаты на трёхклассовой тональности коротких сообщений и на определении воздержания от ответа; калибровка на одних наборах данных может ухудшаться в других областях. Для работы требуется включить trust_remote_code, что загружает код модели и токенизатора.

Весам указана лицензия MIT, однако обучение использовало наборы данных с различными лицензиями, включая ANLI с ограничением CC BY-NC 4.0 и MS MARCO, предназначенный только для некоммерческих исследовательских работ; перед коммерческим применением следует проверить условия использования данных. Модель разработана независимо и не связана с авторами UltraBERT или упомянутых бенчмарков.

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

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

Ограничения

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

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

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

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

Также подходит для

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

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

Открыть на Hugging Face

ultrabert-380m-dynamic-labels

A dynamic-label zero-shot text classifier: dmis-lab/UltraBERT-380M fine-tuned to judge "This text is about ." as entailment vs contradiction across 19 datasets, so the label set is supplied at inference time and nothing fixes a vocabulary. Independent fine-tune; NOT affiliated with or endorsed by dmis-lab, the Jev project, openjev, or the authors of any benchmark or model that appears below as a cited comparison.

Same recipe as roberta-large-mnli-dynamic-labels (same template, caps protocol, and readout), with a raw 2T-token encoder as the base and three extra mixture components: relevance judgments (MS MARCO), tool-calling decisions (When2Call), and harmfulness (HateCheck).

How it works

  • Input: the (premise, hypothesis) pair (text, "This text is about ."), encoded with truncation='longest_first', max 512 tokens. trust_remote_code=True is REQUIRED: UltraBERT ships its own modeling/tokenizer code with the checkpoint (the files are re-uploaded with this model).
  • Training target: gold label -> entailment; 2 sampled wrong labels per example -> contradiction (15% of negatives drawn from other datasets' label sets, 20% of classification examples also get a "not " negation negative).
  • Readout: renormalized P(entailment) per candidate label.
    • single-label: softmax across the per-label log-odds (quickstart below)
    • multi-label: threshold the raw P(entailment) per label
  • The base model ships NO classification head; the 3-way contradiction/neutral/entailment head was created fresh and the NLI half of the mixture taught entailment from scratch.

Training data

19 datasets (caps on positive examples; negatives on top). Profile: full.

datasettaskpositives
SNLIStanford NLI25000
MNLIMultiNLI25000
WANLIWorker-and-AI NLI30000
ANLIAdversarial NLI10000
AGNEWSnews topics6000
DBPEDIAontology types6000
YAHOOQ&A topics6000
IMDBmovie reviews5000
SST2sentiment5000
YELPreview polarity5000
BANKING77banking intents8000
CLINCassistant intents8000
HWU64assistant intents5000
GOEMOTIONSemotions5000
EMOTIONemotions5000
MASSIVEassistant intents5000
MSMARCOrelevance retain/discard6000
WHEN2CALLtool-calling responses8000
HATECHECKharmfulness functional tests5000

357,797 training pairs total (positives + 2 sampled negatives each), 2,000 validation pairs. The safety component is the HateCheck test split (functional tests); the gated WildGuardMix was unavailable at training time (no access token).

Training procedure

  • Base: dmis-lab/UltraBERT-380M (377.5M fine-tuned params), full fine-tune, fp32 on Apple MPS (M2 Pro), gradient checkpointing for 16 GB RAM headroom
  • Effective batch 64 (batch 8 x 8 accumulation), cosine LR at 1e-5, 6% warmup, weight decay 0.01, seed 42, max sequence length 512
  • Configured 3 epochs (16,773 steps); stopped at 5,500 steps = 0.984 epochs (~352,000 pairs seen): validation loss had been flat since ~0.61 epochs (0.117 at step 3,400 -> 0.116 at step 5,500), so epochs 2-3 were cut as redundant
  • Wall-clock training time: ~65 h. LR at stop 7.6e-6 (cosine schedule laid out for 3 epochs, so it never fully annealed)

Training-data licenses

Model weights and this card: MIT. Base model dmis-lab/UltraBERT-380M: Apache-2.0. The 19 training datasets carry their own licenses (Hub/GitHub terms checked 2026-10-19):

dataset (source repo)license
SNLI (stanfordnlp/snli)CC BY-SA 4.0
MNLI (nyu-mll/multi_nli)CC BY 3.0 / CC BY-SA 3.0 / MIT / other (multi-part)
WANLI (alisawuffles/WANLI)CC BY 4.0
ANLI (facebook/anli)CC BY-NC 4.0 (non-commercial)
AGNEWS (fancyzhx/ag_news)not stated
DBPEDIA (fancyzhx/dbpedia_14)CC BY-SA 3.0
YAHOO (community-datasets/yahoo_answers_topics)not stated
IMDB (stanfordnlp/imdb)other
SST2 (stanfordnlp/sst2)not stated
YELP (Yelp/yelp_review_full)other
BANKING77 (legacy-datasets/banking77)CC BY 4.0
CLINC (clinc/clinc_oos)CC BY 3.0
HWU64 (FastFit/hwu_64)not stated
GOEMOTIONS (google-research-datasets/go_emotions)Apache-2.0
EMOTION (dair-ai/emotion)other
MASSIVE (mteb/amazon_massive_intent)CC BY 4.0
MS MARCO (microsoft/ms_marco)non-commercial research only (Microsoft terms)
When2Call (nvidia/When2Call)CC BY 4.0
HateCheck (Paul/hatecheck; upstream paul-rottger/hatecheck-data)CC BY 4.0

Note: ANLI is CC BY-NC 4.0 and MS MARCO is restricted to non-commercial research - review this table before commercial use of the fine-tuned weights. The weights and card are MIT; the upstream dataset terms still govern the data itself.

Evaluation

tweet_eval sentiment (3 labels) + emotion (4 labels) test rows were NOT in the training mixture. 400 rows each, fixed seed. One temperature fitted on ag_news + sst2 + banking77 (in-mixture, calibration only). T=1.0 and the fitted T are both reported.

dataset / readoutaccuracymacro-F1NLLBrierECE
tweet_eval/sentiment (T=1.0)0.5230.2543.5570.9270.459
tweet_eval/sentiment (T=2.148)0.5230.2541.7380.8500.395
tweet_eval/emotion (T=1.0)0.7750.7090.7210.3490.089
tweet_eval/emotion (T=2.148)0.7750.7090.6910.3540.110
overall (T=1.0)0.6490.5812.1390.6380.272
overall (T=2.148)0.6490.5811.2150.6020.211

The sentiment macro-F1 (0.254 at 0.523 accuracy) shows the readout collapsing toward one class on 3-way tweet sentiment; emotion wins on both axes.

Multi-label readout

go_emotions test rows (200 rows, 28 labels; in-mixture dataset, checking the thresholding readout, not unseen accuracy):

  • sample-F1 at threshold 0.5: 0.4514
  • best threshold 0.8 -> sample-F1 0.5208
  • precision@3: 0.82

Latency

On Apple M2 Pro (mps, fp32, 377.5M):

sweepmean msp50 msp95 ms
batch=1, 2 labels27.427.028.7
batch=1, 4 labels39.039.039.1
batch=1, 10 labels72.071.972.6
batch=1, 27 labels178.5178.6178.9
batch=1, 4 labels (real label set)38.538.538.7
batch=8, 4 labels266.4266.5266.9
batch=32, 4 labels1142.41142.31144.0

S1MB - shared benchmark, measured here

hotchpotch/S1MB-english-v1 (106 subsets, 26,269 typed decisions) evaluated with the shipped scorer: premise = rendered state + documents + instructions, candidates = the decision's criteria, prediction = argmax renormalized P(entailment), gold = the target distribution's mode. RAW accuracy (the published leaderboard columns are baseline-adjusted scores, so they are kept separate below).

decision typenaccuracy
choice87640.395
noul123570.442
score51480.325
overall262690.403

Subsets whose upstream dataset was in the training mixture (banking77, clinc, dbpedia, go_emotions, hwu64, laya__ag_news, massive, snli, synthetic_relevance__nanobeir__NanoMSMARCO): accuracy 0.523 on n=4451 of judgments; the other subsets: accuracy 0.3791 on n=21818. Same distribution, other splits - S1MB itself does not establish training-data non-overlap. Per-config artifacts in eval/s1mb.json.

Same benchmark, same metric: S1MB raw accuracy

One unit everywhere: raw accuracy (percent) of the argmax prediction on the same hotchpotch/S1MB-english-v1 benchmarks and the same public targets. Our row was measured here with the shipped scorer; the other rows are computed from the published per-benchmark predictions of those models in hotchpotch/s1mb-result (noul rows use the published accuracy field of each file; tie order on their rounded probabilities can shift a noul row by ~0-2pp).

modelparamsChoiceNoulScoreoverall
ultrabert-380m-dynamic-labels (this model) (MEASURED)377.5M39.5%44.2%32.5%40.4%
Jev 1.13 (TypeSafe AI)-76.8%83.1%63.1%77.1%
OpenJev 27B (openjev)27B75.5%83.4%67.2%77.6%
Open-Jev-27B-v1.1 (ZefanCai)25.6B72.9%82.5%66.5%76.2%
Open-Jev-9B (ZefanCai)7.9B65.6%82.7%62.1%73.0%
Tev1-4B-experimental4.5B65.5%78.8%63.1%71.3%
ModernBERT-large-zeroshot-v2.0396M36.4%49.9%16.2%38.8%
open-jev-deberta-v3-large (kotobalabs)304M39.8%65.8%19.4%48.0%
Qwen3-Reranker-4B4B44.9%71.2%16.9%51.8%
laya421M34.2%65.1%34.3%48.8%
decider-4b (Mapika)4B63.7%81.3%60.0%71.2%
chance-level baseline (uniform for Choice, majority for Noul)-22.9%72.9%--

Source: https://huggingface.co/datasets/hotchpotch/s1mb-result (accessed 2026-10-15).

Artificial Analysis Decision Index benchmarks

The AA Decision Index (https://artificialanalysis.ai/articles/artificial-analysis-decision-index, 2026-10-13) is a weighted average of four benchmarks. This model was evaluated on the three public ones with the shipped readout; the fourth (AA-Omniscience-Decision) is a private eval set and cannot be run, and the composite index is NOT computed (the weights are unpublished). Our numbers and the roberta release's numbers are MEASURED on this machine with identical protocols (same repos, splits, fixed-seed row samples, 512-token scoring); the others are CITED from the article.

benchmarkthis modelroberta releasechancemajoritycited leaders (AA article)
HLE-MultiChoice22.2% (n=500)19.8%22.9%-Jev 1.13: 21
When2Call44.1% (n=1000)33.5%25.0%-Jev 1.13: 81; Celeris-1 Decision: 84
WildGuardTest58.2% (n=1699)56.9%50.0%55.6%Jev 1.13: 94; GLiDE: 95; Decider v1.1 27B: 94
AA-Omniscience-Decisionnot runnable (private)not runnable--Jev 1.13: 35 (accuracy); d1 (Liquid AI): 41

WildGuardTest per-label recall: this model harmful 56.8% / unharmful 59.4% (balanced); roberta release harmful 30.6% / unharmful 77.8% (predicts "safe" for most prompts). Both runs classify the dataset's own prompt-harm labels; the AA article measures response safety - same public data, different protocol.

Caveats: HLE and WildGuardTest ran on public mirrors (the official repos are Hub-gated), so those two are approximate; When2Call is the same public MCQ split the article uses. Per-benchmark artifacts with full protocols live in eval_aa/.

Comparison with roberta-large-mnli-dynamic-labels

Same training recipe (template, caps protocol, readout), same machine (Apple M2 Pro, MPS, fp32), same eval protocols; both rows MEASURED, not cited.

metricthis modelroberta release
params377.5M355.4M
training data19 datasets / 357,797 pairs / ~1 epoch16 datasets / ~462,000 pairs
tweet_eval overall accuracy0.6490.515
tweet_eval overall macro-F10.5810.480
tweet_eval emotion accuracy0.7750.590
tweet_eval sentiment accuracy0.5230.440
fitted calibration temperature2.1485.355
tweet_eval overall ECE at fitted T0.2110.110
go_emotions sample-F1 @0.50.4510.151
go_emotions precision@30.820.55
S1MB full-suite overall (n=26,269)0.4040.343
S1MB choice (n=8,764)0.3950.313
S1MB score (n=5,148)0.3250.149
S1MB noul (n=12,357)0.4420.446
S1MB subsets won (of 106)64 (8 ties)34
When2Call accuracy (n=1000)0.4410.335
HLE-MultiChoice accuracy (n=500)0.222 (chance)0.198 (below chance)
WildGuardTest accuracy (n=1699)0.5820.569
WildGuardTest harmful recall0.5680.306
latency, batch=1, 4 labels38.5 ms38.6 ms
latency, batch=32, 4 labels1142 ms841 ms

Reading: the two models tie on single-pair latency and HLE (both ~chance), and the roberta release keeps two edges: it lands slightly better calibrated on the tweet_eval sample after aggressive flattening (ECE 0.110 vs 0.211, needing fitted T 5.355 vs 2.148) and it has higher batch throughput. This model wins the rest: +13.4 points tweet_eval overall, +6.0 points S1MB raw overall (64 of 106 subsets won, 8 ties), +8.1 choice and +17.6 score on S1MB decision types, ~3x multilabel sample-F1, +10.6 points When2Call, +26.2 points harmful recall. S1MB noul is the near-tie (0.442 vs 0.446), and both models sit far below the 72.9% majority baseline there, so abstention is the shared weak spot rather than a differentiator. Per-subset shape: this model dominates large-taxonomy intent subsets (clinc 0.775 vs 0.020, hwu64 0.840 vs 0.090, massive 0.785 vs 0.200, banking77 0.810 vs 0.420, mtop 0.725 vs 0.305), while the roberta release keeps the followir relevance family (news21 0.720 vs 0.305, robust04 0.745 vs 0.345, core17 0.700 vs 0.365) and patent_similarity (0.310 vs 0.030). The two latency rows were sampled at different premise lengths between the runs (63 vs 113 chars), so the batch=32 gap is directionally robust but its magnitude is approximate.

Quickstart

from transformers import AutoModelForSequenceClassification, AutoTokenizer
import torch

model = AutoModelForSequenceClassification.from_pretrained('akshaymalik/ultrabert-380m-dynamic-labels', trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained('akshaymalik/ultrabert-380m-dynamic-labels', trust_remote_code=True)
id2label = model.config.id2label
ENTAIL_ID = next(k for k, v in id2label.items() if str(v).upper() == 'ENTAILMENT')
CONTRA_ID = next(k for k, v in id2label.items() if str(v).upper() == 'CONTRADICTION')

def build_prompt(text, hypothesis):
    return (
        'Text: ' + text.strip().replace('\n', ' ') + '\n'
        'Hypothesis: ' + str(hypothesis).strip() + '\n'
        'Verdict:'
    )

def label_to_hypothesis(label):
    return 'This text is about ' + str(label).strip().rstrip('.') + '.'
labels = ['sports', 'politics', 'finance']
text = 'The senate passed the budget after a late-night session.'
probs = []
for lab in labels:
    enc = tokenizer(text, label_to_hypothesis(lab), return_tensors='pt',
                    truncation='longest_first', max_length=512)
    with torch.no_grad():
        logits = model(**enc).logits[0]
    p = torch.softmax(torch.stack([logits[ENTAIL_ID], logits[CONTRA_ID]]), dim=0)[0]
    probs.append(float(p))
print('multi-label raw P(entail):', dict(zip(labels, probs)))
import math
z = [math.log(p / (1 - p)) for p in probs]   # per-label log-odds
q = torch.softmax(torch.tensor(z), dim=0)
print('single-label (calibrated):', dict(zip(labels, q.tolist())))

Limitations

  • 512-token ceiling on the (text, hypothesis) pair; longer inputs are truncated.
  • Softmax over the raw P(entailment) values is flat by construction (each P is bounded in [0,1]); use the log-odds softmax for single-label probabilities or raw P plus a threshold for multi-label, as in the quickstart.
  • Calibration was fitted on ag_news / sst2 / banking77; expect worse calibration off-domain. The fitted temperature (2.148) applied uniformly hurts tweet_eval/emotion ECE slightly while helping sentiment.
  • The 3-way tweet_eval/sentiment macro-F1 (0.254) shows single-label collapse toward one class on short 3-way sentiment; check per-class behavior before relying on it.
  • Trained on 19 public datasets with varied licenses (see the table above); ANLI is CC BY-NC 4.0 and MS MARCO is non-commercial research only, so review before commercial use. Weights and card: MIT.
  • English-centric training data.
  • trust_remote_code=True loads UltraBERT's Python modeling code (uploaded unchanged from the base release alongside the weights).
  • The base model is a raw 2T-token encoder: all NLI behavior here was taught by this fine-tune; no claim is made about the base model's own entailment ability.
  • Both this model and the roberta release land far below the majority baseline on S1MB noul (abstention) rows (0.44 vs 0.73); abstention behavior is the weakest surface of the NLI readout in both releases.
  • Latency was measured on a laptop GPU (Apple M2 Pro, fp32, MPS); it is not comparable to server-hardware numbers in cited leaderboards.
  • Comparison numbers for other models are CITED from published tables; our numbers are raw accuracy with the NLI-hypothesis readout, which is not the readout S1MB leaderboard models use (option-letter logits).

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

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

GPU в ailist

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

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

Модели нужен код из репозитория; автор пока не в списке доверенных организаций.

Класс архитектуры
UltrabertForSequenceClassification
Ревизия весов
5c6dadb

0 моделей