/ Модель

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

Контекст
7 999 токенов
Параметры
31,9 млн
Лицензия
Apache 2.0
Архитектура
modernbert · dense
Базовая модель
ettin-encoder-32m
Библиотека
sentence-transformers
Опубликована
30 окт 2026

finecat-nli-v2-xs

Классификация текстаТекст → label8 профессий
209скачиваний за 30 дней0лайковвеса обновлены3 ноя 2026

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

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

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

FineCat-NLI v2 Extra Small — компактная модель для вывода по парам текстов, опубликованная dleemiller. Она принимает текст-посылку и утверждение-гипотезу и оценивает вероятности трёх отношений: следование, нейтральность и противоречие. Модель основана на энкодере ModernBERT с 31,9 млн параметров и использует библиотеку Sentence Transformers; длина контекста — до 7 999 токенов. Основной язык — английский.

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

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

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

Ограничения

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

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

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

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

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

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

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

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

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

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

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

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

Открыть на Hugging Face

FineCat-NLI v2 Extra Small

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."95.3% (MASSIVE intents)
RAG groundingretrieved passages → generated answer0.73 F1 (RAGTruth)
Guardrails / Moderationmessage → policy statement89.7% (CrossingGuard), 89.7% (Wikipedia insults)
Zero-shot classification / taggingreview → "This review is positive."86.7% (18 tasks)
Clinical extractionclinical note → "The patient is unemployed."97.0% (SDOH-NLI)

32M parameters · documents up to 8k tokens · ~14,500 pairs/s · Apache-2.0

from sentence_transformers import CrossEncoder

model = CrossEncoder("dleemiller/finecat-nli-v2-xs")
text = "My credit card was billed twice for one purchase."
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.8, 'shipping': 0.31, 'account access': 0.44}

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-v2-s68M47.10.76930.86710.86630.90840.65900.49900.47000.72280.79928.85,591
dleemiller/finecat-nli-v2-xs32M39.10.72330.81520.81790.88470.58900.46400.45500.68100.73609.614,505
dleemiller/finecat-nli-v2-xxs17M32.50.68840.76850.77140.86270.49700.43500.41000.65400.675310.030,640
sileod/deberta-v3-xsmall-tasksource-nli*71M21.10.61400.84110.85260.87180.54900.38800.41580.69340.770814.87,492
dleemiller/EttinX-nli-s68M9.90.54680.87650.87950.91240.33400.28100.30830.62340.801227.45,570
dleemiller/EttinX-nli-xs32M7.30.52780.83830.83830.89720.27800.28500.28080.58240.751530.214,424
cross-encoder/nli-deberta-v3-xsmall71M6.00.53010.87810.87800.91670.36000.30200.31920.61080.811737.27,466
cross-encoder/nli-MiniLM2-L6-H76882M3.80.51260.86580.86880.91310.30800.28200.28920.58240.789834.514,016

* 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

Then you can load the model and run inference.

from sentence_transformers import CrossEncoder
import numpy as np

model = CrossEncoder("dleemiller/finecat-nli-v2-xs")
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, docnli
Biomedical and health claim checkingClaim vs. abstract or clinical notesdoh_nli, biosift, bionli, scifact, pubhealth
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 adversarial reasoning (anli_r3, 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-v2-xs27B teacher (fast mode)
finecat180120.75980.8656
mnli98150.81520.9311
mnli_mismatched98300.81780.9305
snli98240.88450.9399
anli_r110000.58900.8630
anli_r210000.46400.7490
anli_r312000.45500.7100
wanli50000.68120.7796
lingnli73610.73600.8958
glue_diagnostic11000.62910.8118
med53800.75450.8039
nan_nli2580.62400.7403
scone_test10000.99200.9980
nmonli_test2001.00001.0000
conjnli6230.65970.7335
nope_adv3450.35360.5768
nli4ct1990.61810.8693
sdoh_nli9900.96970.9848
healthver2300.63480.7565
scifact3000.65670.8433
biosift10000.89600.9210
scientsbank9710.67350.7683
beetle8190.57880.6325
legal_domain11630.50130.6389
findver5000.54800.7660
dialfact14990.75450.8586
frank_sent31760.62410.8234
ragtruth14970.77290.8691
vast15000.66600.8053
zs_meta54000.86700.9344
seahorse8000.83630.8638
pubhealth6000.76170.8650
bionli6000.63830.9333
fin_topics6000.94670.9633
vitaminc100000.71450.9351
docnli10000.7030—
contractnli_a17070.89340.9285
contractnli_b20740.83750.9021
control8000.50380.8087
fol102770.72130.8430
scitail21260.87960.9652
wice9580.75160.9144
sick49060.89670.9213
crossingguard53970.89700.9344
hans150000.75050.9209

Macro average over the 45 datasets: 0.7269.

Training Details

This model is a fine-tune of jhu-clsp/ettin-encoder-32m, 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 the soup greedy_val, selected on the validation/dev objective (never a test set), with the output temperature calibrated on the validation split. The learning rate was 0.00011, chosen from a WSD learning-rate probe (1x and 4x probe horizons, extrapolated to the full run) combined with the size trend of the larger v2 models.


Acknowledgments

We thank the creators and contributors of jhu-clsp (Ettin) 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 · text-classification

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

Подбираем GPU…

Класс архитектуры
ModernBertForSequenceClassification
Ревизия весов
93ff586

0 моделей