/ Модель

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

Контекст
8 192 токена
Параметры
151 млн
Лицензия
Apache 2.0
Архитектура
ultrabert · dense
Базовая модель
UltraBERT-150M
Библиотека
sentence-transformers
Опубликована
17 окт 2026

finecat-nli-ultra-m

Заполнение пропусковТекст → текст8 профессий
167скачиваний за 30 дней0лайковвеса обновлены3 ноя 2026

Описание модели

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

Англоязычный NLI-энкодер, который классифицирует связь между текстом и утверждением для zero-shot разметки, маршрутизации запросов и проверки ответов RAG.

FineCat-NLI Ultra Medium — англоязычный энкодер для вывода по естественному языку, разработанный автором репозитория dleemiller. Модель получает текст-посылку и утверждение-гипотезу и оценивает вероятности трёх отношений: следование, противоречие и нейтральность. Для вопроса с вариантами ответа каждый вариант можно проверять как отдельное утверждение.

Модель основана на UltraBERT-150M и дообучена как классификатор последовательностей на задачах NLI. В ней 151 млн параметров; README рекомендует использовать вероятность следования для zero-shot классификации тем, маршрутизации запросов и проверки обоснованности ответов в RAG. Также описаны сценарии триажа и проверок политик. Для этих задач пары текстов можно сравнивать без отдельной обученной классификационной головы под каждую метку.

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

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

  • zero-shot классификация тем по тексту
  • маршрутизация пользовательских запросов по намерению
  • проверка соответствия ответа найденным фрагментам в RAG
  • выявление неподтверждённых утверждений в ответах
  • проверка сообщений на соответствие правилам модерации
  • оценка вариантов ответа на вопрос с выбором

Ограничения

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

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

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

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

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

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

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

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

Открыть на Hugging Face

FineCat-NLI Ultra Medium

Natural Language Inference (NLI): the Swiss Army knife of encoders

Provide a text (premise) and statement (hypothesis), and it returns calibrated probabilities that the text entails, contradicts, or is neutral to the statement. A multiple-choice question is one statement per option.

Examples

UseText → statementResult
Routing / triagerequest → "The user wants to set an alarm."97.7% (MASSIVE intents)
RAG groundingretrieved passages → generated answer0.79 F1 (RAGTruth)
Guardrails / Moderationmessage → policy statement91.4% (CrossingGuard), 92.0% (Wikipedia insults)
Zero-shot classification / taggingreview → "This review is positive."91.0% (18 tasks)
Clinical extractionclinical note → "The patient is unemployed."98.5% (SDOH-NLI)

150M parameters · documents up to 32k tokens · ~3,000 pairs/s · Apache-2.0

from sentence_transformers import CrossEncoder

model = CrossEncoder("dleemiller/finecat-nli-ultra-m", trust_remote_code=True)
text = "My card was charged twice for the same order."
labels = ["billing", "shipping", "account access"]
probs = model.predict([(text, f"This text is about {l}.") for l in labels], apply_softmax=True)
print({l: round(float(p[0]), 3) for l, p in zip(labels, probs)})  # p[0] = P(entailment)
# {'billing': 0.88, 'shipping': 0.32, 'account access': 0.1}

More in Recommended Applications and the 45-dataset evaluation.


Table of Contents


NLI Evaluation Results

Comparison on the OpenNLI leaderboard (v0.2.0).

ModelParamsSkill IndexAccuracymnlimnli_mismatchedsnlianli_r1anli_r2anli_r3wanlilingnliCALThroughput (pairs/s)
dleemiller/finecat-nli-ultra-m151M53.20.79600.88670.88860.92050.73700.56900.52500.74440.83717.42,992
dleemiller/finecat-nli-v2-m150M52.60.79420.89530.89460.92210.70500.51900.49830.74480.84997.52,836
tasksource/deberta-base-long-nli*184M40.30.72790.86100.86470.89640.65500.50500.47080.74660.82539.63,235
tasksource/UltraBERT-150M-nli*151M30.90.67660.85440.87470.88890.66300.51100.49750.72680.793216.42,978
tasksource/ModernBERT-base-nli*150M28.90.67210.86840.89890.89200.63600.48400.41580.66060.812715.62,813
dleemiller/finecat-nli-m*150M28.70.67770.89190.90990.91290.67400.49700.47170.74000.841926.12,811
MoritzLaurer/DeBERTa-v3-base-mnli-fever-anli184M18.10.61610.90340.90310.88650.71100.54500.49250.64160.852327.73,241
cross-encoder/nli-deberta-v3-base184M8.40.55980.90010.90050.92360.43200.34800.34250.63860.834740.73,234

* trained on one or more OpenNLI test sets; those scores are replaced by estimates, as on the leaderboard.


Usage

Label Map:

  • entailment: 0
  • neutral: 1
  • contradiction: 2

Direct Usage (Sentence Transformers)

First install the Sentence Transformers library:

pip install -U sentence-transformers "transformers>=5"

Then you can load the model and run inference. UltraBERT uses custom model code, so pass trust_remote_code=True.

from sentence_transformers import CrossEncoder
import numpy as np

model = CrossEncoder("dleemiller/finecat-nli-ultra-m", trust_remote_code=True)
id2label = model.model.config.id2label  # {0:'entailment', 1:'neutral', 2:'contradiction'}

pairs = [
    ("The glass fell off the counter and shattered on the tile.",
     "The glass broke when it hit the floor."),          # E
    ("The store opens at 9 a.m. every day.",
     "The store opens at 7 a.m. on weekdays."),          # C
    ("A researcher presented results at the conference.",
     "The presentation won the best paper award."),       # N
    ("It started raining heavily, so the match was postponed.",
     "The game was delayed due to weather."),             # E
    ("Every seat on the flight was taken.",
     "There were several empty seats on the plane."),     # C
]

logits = model.predict(pairs)  # shape: (5, 3)

for (prem, hyp), row in zip(pairs, logits):
    pred_idx = int(np.argmax(row))
    pred = id2label[pred_idx]
    print(f"[{pred}]  Premise: {prem}  |  Hypothesis: {hyp}")


Recommended Applications

Frame each check as a premise (text) and hypothesis (statement), and use the entailment probability.

ApplicationExample hypothesisSupporting results
Zero-shot tagging / topic classification"This text is about billing."zs_meta, fin_topics
Routing and decisions in agent pipelines"The user wants to cancel an order."zs_meta, mnli, snli
RAG grounding / hallucination checksEach answer sentence vs. retrieved passagesragtruth, wice, vitaminc
Contract and policy review"The agreement permits sharing data with third parties."contractnli_a/b, control, docnli
Biomedical and health claim checkingClaim vs. abstract or clinical notesdoh_nli, biosift, bionli, scifact, pubhealth
Logical / rule-based reasoning over documents"Under these rules, the applicant qualifies."fol
Dialogue fact-checkingAssistant reply vs. knowledge sourcedialfact, vitaminc
Guardrails / policy matchingPolicy statement vs. user or model textcrossingguard
Stance detection"The author supports the proposal."vast

Less suited: financial and general legal verification (findver, legal_domain), clinical-trial eligibility (nli4ct), multi-document legal reasoning (control), and presupposition reasoning (nope_adv).


Extended Evaluation (45 datasets)

Accuracy on the test splits of 45 NLI and adjacent datasets. 2-way datasets (entailed vs. not) are scored as entailment vs. any non-entailment prediction. DocNLI and VitaminC are evaluated on fixed random subsets of 1,000 and 10,000 pairs. FRANK (news-summary factuality) is scored per summary sentence: each sentence vs. its source article, labelled by the majority annotator judgment.

Datasetnfinecat-nli-ultra-m27B teacher (fast mode)
finecat180120.81580.8656
mnli98150.88670.9311
mnli_mismatched98300.88860.9305
snli98240.92050.9399
anli_r110000.73700.8630
anli_r210000.56900.7490
anli_r312000.52500.7100
wanli50000.74440.7796
lingnli73610.83710.8958
glue_diagnostic11000.71820.8118
med53800.80000.8039
nan_nli2580.69380.7403
scone_test10000.99800.9980
nmonli_test2001.00001.0000
conjnli6230.75120.7335
nope_adv3450.48990.5768
nli4ct1990.66830.8693
sdoh_nli9900.98480.9848
healthver2300.72610.7565
scifact3000.79330.8433
biosift10000.91400.9210
scientsbank9710.72810.7683
beetle8190.59950.6325
legal_domain11630.53140.6389
findver5000.60400.7660
dialfact14990.81790.8586
frank_sent31760.74560.8234
ragtruth14970.82900.8691
vast15000.74930.8053
zs_meta54000.91000.9344
seahorse8000.85120.8638
pubhealth6000.82670.8650
bionli6000.84670.9333
fin_topics6000.96170.9633
vitaminc100000.86230.9351
docnli10000.7990—
contractnli_a17070.91800.9285
contractnli_b20740.88480.9021
control8000.65750.8087
fol102770.82410.8430
scitail21260.94830.9652
wice9580.86010.9144
sick49060.92440.9213
crossingguard53970.91400.9344
hans150000.84890.9209

Macro average over the 45 datasets: 0.7979.

Training Details

This model is a fine-tune of dmis-lab/UltraBERT-150M, trained on the dleemiller/FineCat-NLI-Reason dataset, a compilation of several high-quality NLI data sources with quality screening and reduction of easy samples in the training split. Also includes additional NLI, fact verification and long document sources (2.05M pairs in total). The training uses logit distillation from an NLI finetune of Qwen3.8-27B.

Distillation loss looks like this: $$ \begin{equation} \mathcal{L} = \alpha \cdot \mathcal{L}_{\text{CE}}(z^{(s)}, y) + \beta \cdot T^2 \cdot \mathrm{KL}\left(\sigma(z^{(t)}/T) ,|, \sigma(z^{(s)}/T)\right) \end{equation} $$

where \(z^{(s)}\) and \(z^{(t)}\) are the student and teacher logits, \(y\) are the ground truth labels, \(\alpha = 0.2\), \(\beta = 0.8\) and \(T = 1\).

Training inputs keep the full documents the teacher labelled (up to 8k tokens). The model was trained for 3 epochs at a constant learning rate followed by a 1-epoch cooldown. The released weights are a greedy soup of six checkpoints (the cooldown's final weights, final EMA and two quarter checkpoints, plus the stable phase's epoch 1-2 EMAs), with the output temperature calibrated on the validation split. UltraBERT is fine-tuned with its native classification head (first-token pooling) and the UltraBERT authors' optimizer settings (weight decay 0.1, 5% warmup), at a learning rate of 2.5e-5.


Acknowledgments

We thank the creators and contributors of dmis-lab (UltraBERT) and the Qwen team for making their work available. This model would not be possible without their efforts and open source contributions.

Citation

@misc{nli-compiled-2025,
  title = {FineCat NLI Dataset},
  author = {Lee Miller},
  year = {2025},
  howpublished = {Refined compilation of 6 major NLI datasets}
}

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

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

GPU в ailist

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

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

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

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

0 моделей