dleemiller / finecat-nli-v2-m

huggingface.co
Total runs: 0
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: October 18 2026
zero-shot-classification

Introduction of finecat-nli-v2-m

Model Details of finecat-nli-v2-m

FineCat-NLI v2 Medium

FineCat v2

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
Routing / triage request → "The user wants to set an alarm." 96.7% (MASSIVE intents)
RAG grounding retrieved passages → generated answer 0.78 F1 (RAGTruth)
Guardrails / Moderation message → policy statement 91.8% (CrossingGuard), 92.3% (Wikipedia insults)
Zero-shot classification / tagging review → "This review is positive." 90.7% (18 tasks)
Clinical extraction clinical note → "The patient is unemployed." 98.2% (SDOH-NLI)

150M parameters · documents up to 8k tokens · ~1532 pairs/s · Apache-2.0

from sentence_transformers import CrossEncoder

model = CrossEncoder("dleemiller/finecat-nli-v2-m")
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.62, 'shipping': 0.16, 'account access': 0.03}

More in Recommended Applications and the 45-dataset evaluation .


Table of Contents


NLI Evaluation Results

F1-Micro scores (equivalent to accuracy) for each dataset. Performance was measured at bs=32 using a Nvidia Blackwell PRO 6000 Max-Q.

Model finecat 45-set avg mnli mnli_mismatched snli anli_r1 anli_r2 anli_r3 wanli lingnli Throughput (samples/s) Peak GPU Mem (MB)
dleemiller/finecat-nli-ultra-m 0.8158 0.7979 0.8870 0.8878 0.9203 0.7360 0.5690 0.5242 0.7452 0.8368 1295.93 836.74
dleemiller/finecat-nli-v2-m 0.8106 0.7967 0.8952 0.8950 0.9220 0.7040 0.5200 0.4975 0.7456 0.8506 1531.85 842.40
dleemiller/finecat-nli-m 0.8000 0.6860 0.8917 0.9103 0.9126 0.6760 0.5000 0.4717 0.7418 0.8419 1323.13 807.46
MoritzLaurer/DeBERTa-v3-base-mnli-fever-anli 0.7642 0.6242 0.9033 0.9028 0.8866 0.7120 0.5470 0.4950 0.6418 0.8523 1278.18 1644.80
tasksource/ModernBERT-base-nli 0.7595 0.6795 0.8685 0.8979 0.8915 0.6300 0.4820 0.4192 0.6632 0.8118 1338.37 805.87
dleemiller/ModernCE-base-nli 0.7533 0.6350 0.8923 0.9035 0.9187 0.5240 0.3950 0.3333 0.6464 0.8282 1338.31 805.87
cross-encoder/nli-deberta-v3-base 0.7467 0.5673 0.9001 0.9004 0.9238 0.4340 0.3500 0.3408 0.6378 0.8346 1263.70 1644.80
cross-encoder/nli-distilroberta-base 0.6936 0.4984 0.8365 0.8398 0.8996 0.2660 0.2810 0.2975 0.5516 0.7516 2733.10 566.64

45-set avg: macro accuracy over the 45 datasets , each model at its own maximum context (512 tokens for the DeBERTa and RoBERTa models).


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

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. 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-v2-m 27B teacher (fast mode)
finecat 18012 0.8105 0.8656
mnli 9815 0.8952 0.9311
mnli_mismatched 9830 0.8946 0.9305
snli 9824 0.9221 0.9399
anli_r1 1000 0.7050 0.8630
anli_r2 1000 0.5190 0.7490
anli_r3 1200 0.4983 0.7100
wanli 5000 0.7448 0.7796
lingnli 7361 0.8499 0.8958
glue_diagnostic 1100 0.7173 0.8118
med 5380 0.7829 0.8039
nan_nli 258 0.6899 0.7403
scone_test 1000 0.9910 0.9980
nmonli_test 200 1.0000 1.0000
conjnli 623 0.7030 0.7335
nope_adv 345 0.5217 0.5768
nli4ct 199 0.6784 0.8693
sdoh_nli 990 0.9818 0.9848
healthver 230 0.7261 0.7565
scifact 300 0.8233 0.8433
biosift 1000 0.9200 0.9210
scientsbank 971 0.7302 0.7683
beetle 819 0.6398 0.6325
legal_domain 1163 0.5400 0.6389
findver 500 0.6380 0.7660
dialfact 1499 0.8192 0.8586
frank_sent 3176 0.7607 0.8234
ragtruth 1497 0.8290 0.8691
vast 1500 0.7607 0.8053
zs_meta 5400 0.9072 0.9344
seahorse 800 0.8562 0.8638
pubhealth 600 0.8300 0.8650
bionli 600 0.8433 0.9333
fin_topics 600 0.9600 0.9633
vitaminc 10000 0.8601 0.9351
docnli 1000 0.7840 —
contractnli_a 1707 0.9256 0.9285
contractnli_b 2074 0.8891 0.9021
control 800 0.6388 0.8087
fol 10277 0.8128 0.8430
scitail 2126 0.9530 0.9652
wice 958 0.8257 0.9144
sick 4906 0.9201 0.9213
crossingguard 5397 0.9181 0.9344
hans 15000 0.8331 0.9209

Macro average over the 45 datasets: 0.7967 .

Training Details

This model is a fine-tune of jhu-clsp/ettin-encoder-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: L = α ⋅ L CE ( z ( s ) , y ) + β ⋅ T 2 ⋅ K L ( σ ( z ( t ) / T ) ∥ σ ( z ( s ) / T ) ) \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 ) z^{(s)} and z ( t ) z^{(t)} are the student and teacher logits, y y are the ground truth labels, α = 0.2 \alpha = 0.2 , β = 0.8 \beta = 0.8 and T = 1 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 average the cooldown's final weights with the epoch-3 exponential-moving-average checkpoint (greedy soup), with the output temperature calibrated on the validation split. The learning rate was 5e-5.


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}
}

Runs of dleemiller finecat-nli-v2-m on huggingface.co

0
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About finecat-nli-v2-m huggingface.co Model

More finecat-nli-v2-m license Visit here:

https://choosealicense.com/licenses/apache-2.0

finecat-nli-v2-m huggingface.co

finecat-nli-v2-m huggingface.co is an AI model on huggingface.co that provides finecat-nli-v2-m's model effect (), which can be used instantly with this dleemiller finecat-nli-v2-m model. huggingface.co supports a free trial of the finecat-nli-v2-m model, and also provides paid use of the finecat-nli-v2-m. Support call finecat-nli-v2-m model through api, including Node.js, Python, http.

finecat-nli-v2-m huggingface.co Url

https://huggingface.co/dleemiller/finecat-nli-v2-m

dleemiller finecat-nli-v2-m online free

finecat-nli-v2-m huggingface.co is an online trial and call api platform, which integrates finecat-nli-v2-m's modeling effects, including api services, and provides a free online trial of finecat-nli-v2-m, you can try finecat-nli-v2-m online for free by clicking the link below.

dleemiller finecat-nli-v2-m online free url in huggingface.co:

https://huggingface.co/dleemiller/finecat-nli-v2-m

finecat-nli-v2-m install

finecat-nli-v2-m is an open source model from GitHub that offers a free installation service, and any user can find finecat-nli-v2-m on GitHub to install. At the same time, huggingface.co provides the effect of finecat-nli-v2-m install, users can directly use finecat-nli-v2-m installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

finecat-nli-v2-m install url in huggingface.co:

https://huggingface.co/dleemiller/finecat-nli-v2-m

Url of finecat-nli-v2-m

finecat-nli-v2-m huggingface.co Url

Provider of finecat-nli-v2-m huggingface.co

dleemiller
ORGANIZATIONS

Other API from dleemiller

huggingface.co

Total runs: 26
Run Growth: -46
Growth Rate: -176.92%
Updated:March 06 2025