FineCat-NLI dbv3 Medium (DeBERTa-v3-base)
Try it: live demo Space
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
| Use | Text → statement | Result |
|---|---|---|
| RAG grounding | retrieved passages → generated answer | 0.75 F1 (RAGTruth) |
| Guardrails / Moderation | message → policy statement | 91.8% (CrossingGuard) |
| Zero-shot classification / tagging | review → "This review is positive." | 92.3% (18 tasks) |
| Clinical extraction | clinical note → "The patient is unemployed." | 98.3% (SDOH-NLI) |
184M parameters (microsoft/deberta-v3-base, 86M backbone) · inputs up to 512 tokens · ~3,200 pairs/s · Apache-2.0
from sentence_transformers import CrossEncoder
model = CrossEncoder("dleemiller/finecat-nli-dbv3-m")
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.886, 'shipping': 0.005, 'account access': 0.1}
More in Recommended Applications and the 45-dataset evaluation.
Table of Contents
- NLI Evaluation Results
- Usage
- Recommended Applications
- Extended Evaluation (45 datasets)
- Training Details
- Acknowledgments
- Citation
NLI Evaluation Results
Comparison on the OpenNLI leaderboard (v0.2.6).
| Model | Params | Skill Index | Accuracy | mnli | mnli_mismatched | snli | anli_r1 | anli_r2 | anli_r3 | wanli | lingnli | CAL | Throughput (pairs/s) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dleemiller/finecat-nli-v2-l |
396M | 57.8 | 0.8182 | 0.9164 | 0.9122 | 0.9329 | 0.7760 | 0.6040 | 0.5767 | 0.7664 | 0.8775 | 6.5 | 1,224 |
dleemiller/finecat-nli-ultra-m |
151M | 53.2 | 0.7960 | 0.8867 | 0.8886 | 0.9205 | 0.7370 | 0.5690 | 0.5250 | 0.7444 | 0.8371 | 7.4 | 2,992 |
dleemiller/finecat-nli-v2-m |
150M | 52.6 | 0.7942 | 0.8953 | 0.8946 | 0.9221 | 0.7050 | 0.5190 | 0.4983 | 0.7448 | 0.8499 | 7.5 | 2,836 |
dleemiller/finecat-nli-dbv3-m |
184M | 52.5 | 0.7938 | 0.9107 | 0.9096 | 0.9324 | 0.7650 | 0.5820 | 0.5217 | 0.7562 | 0.8712 | 7.2 | 3,206 |
dleemiller/finecat-nli-dbv3-s |
71M | 47.7 | 0.7664 | 0.8851 | 0.8871 | 0.9157 | 0.6680 | 0.5130 | 0.4825 | 0.7368 | 0.8317 | 7.9 | 7,545 |
tasksource/ModernBERT-base-nli* |
150M | 28.9 | 0.6723 | 0.8684 | 0.8989 | 0.8920 | 0.6360 | 0.4840 | 0.4158 | 0.6606 | 0.8127 | 15.6 | 2,813 |
MoritzLaurer/DeBERTa-v3-base-mnli-fever-anli |
184M | 18.1 | 0.6161 | 0.9034 | 0.9031 | 0.8865 | 0.7110 | 0.5450 | 0.4925 | 0.6416 | 0.8523 | 27.7 | 3,241 |
cross-encoder/nli-deberta-v3-base |
184M | 8.4 | 0.5599 | 0.9001 | 0.9005 | 0.9236 | 0.4320 | 0.3480 | 0.3425 | 0.6386 | 0.8347 | 40.7 | 3,234 |
* trained on one or more OpenNLI test sets; those scores are replaced by estimates, as on the leaderboard.
Usage
Label Map:
entailment: 0neutral: 1contradiction: 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-dbv3-m")
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)
# inputs over 512 tokens: truncate the text (premise) only, never the statement (hypothesis)
# logits = model.predict(pairs, processing_kwargs={"text": {"truncation": "only_first"}})
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.
| Application | Example hypothesis | Supporting 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 checks | Each answer sentence vs. retrieved passages | ragtruth, wice, vitaminc |
| Contract and policy review | "The agreement permits sharing data with third parties." | contractnli_a/b, docnli |
| Biomedical and health claim checking | Claim vs. abstract or clinical note | sdoh_nli, biosift, bionli, scifact, pubhealth |
| Dialogue fact-checking | Assistant reply vs. knowledge source | dialfact, vitaminc |
| Guardrails / policy matching | Policy statement vs. user or model text | crossingguard |
| 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. Inputs are capped at 512 tokens (premise truncated). 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.
| Dataset | n | finecat-nli-dbv3-m |
27B teacher (fast mode) |
|---|---|---|---|
| finecat | 18012 | 0.8276 | 0.8656 |
| mnli | 9815 | 0.9111 | 0.9311 |
| mnli_mismatched | 9830 | 0.9100 | 0.9305 |
| snli | 9824 | 0.9324 | 0.9399 |
| anli_r1 | 1000 | 0.7650 | 0.8630 |
| anli_r2 | 1000 | 0.5820 | 0.7490 |
| anli_r3 | 1200 | 0.5200 | 0.7100 |
| wanli | 5000 | 0.7558 | 0.7796 |
| lingnli | 7361 | 0.8715 | 0.8958 |
| glue_diagnostic | 1100 | 0.7345 | 0.8118 |
| med | 5380 | 0.7914 | 0.8039 |
| nan_nli | 258 | 0.7326 | 0.7403 |
| scone_test | 1000 | 1.0000 | 0.9980 |
| nmonli_test | 200 | 1.0000 | 1.0000 |
| conjnli | 623 | 0.7319 | 0.7335 |
| nope_adv | 345 | 0.5449 | 0.5768 |
| nli4ct | 199 | 0.7337 | 0.8693 |
| sdoh_nli | 990 | 0.9828 | 0.9848 |
| healthver | 230 | 0.7174 | 0.7565 |
| scifact | 300 | 0.7967 | 0.8433 |
| biosift | 1000 | 0.9230 | 0.9210 |
| scientsbank | 971 | 0.7055 | 0.7683 |
| beetle | 819 | 0.6398 | 0.6325 |
| legal_domain | 1163 | 0.5331 | 0.6389 |
| findver | 500 | 0.6060 | 0.7660 |
| dialfact | 1499 | 0.8312 | 0.8586 |
| frank_sent | 3176 | 0.6559 | 0.8234 |
| ragtruth | 1497 | 0.7822 | 0.8691 |
| vast | 1500 | 0.7833 | 0.8053 |
| zs_meta | 5400 | 0.9230 | 0.9344 |
| seahorse | 800 | 0.8413 | 0.8638 |
| pubhealth | 600 | 0.7500 | 0.8650 |
| bionli | 600 | 0.8783 | 0.9333 |
| fin_topics | 600 | 0.9600 | 0.9633 |
| vitaminc | 10000 | 0.8750 | 0.9351 |
| docnli | 1000 | 0.8400 | — |
| contractnli_a | 1707 | 0.9233 | 0.9285 |
| contractnli_b | 2074 | 0.7517 | 0.9021 |
| control | 800 | 0.6350 | 0.8087 |
| fol | 10277 | 0.8045 | 0.8430 |
| scitail | 2126 | 0.9445 | 0.9652 |
| wice | 958 | 0.7088 | 0.9144 |
| sick | 4906 | 0.9230 | 0.9213 |
| crossingguard | 5397 | 0.9179 | 0.9344 |
| hans | 15000 | 0.8499 | 0.9209 |
Macro average over the 45 datasets: 0.7962.
Training Details
This model is a fine-tune of microsoft/deberta-v3-base,
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\).
Inputs are capped at DeBERTa-v3's 512-token pretraining length, truncating the premise only. The model was trained for 3 epochs
at a constant learning rate followed by a 1-epoch cooldown, with fp32 master weights (the base checkpoint ships in fp16).
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 1.3e-5: 0.85x the official DeBERTa-v3-base MNLI rate (1.5e-5), the same step-back the xsmall probe supported.
Acknowledgments
We thank Microsoft (DeBERTa-v3) 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}
}