This model is a fine-tune of the excellent
tasksource/ModernBERT-base-nli
,
trained on the
dleemiller/FineCat-NLI
dataset—a compilation of several high-quality
NLI data sources with quality screening and reduction of easy samples in the training split.
The training also incorporates logit distillation from
dleemiller/finecat-nli-l
.
Distillation loss looks like this:
L
=
α
⋅
L
CE
(
z
(
s
)
,
y
)
+
β
⋅
L
MSE
(
z
(
s
)
,
z
(
t
)
)
where
z
(
s
)
and
z
(
t
)
are the student and teacher logits,
y
are the ground truth labels,
and
α
and
β
are equally weighted at 0.5.
This model and dataset specifically targets improving NLI, through high quality sources. The tasksource models
are the best checkpoints to start from, although training from ModernBERT is also competitive.
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
mnli
mnli_mismatched
snli
anli_r1
anli_r2
anli_r3
wanli
lingnli
Throughput (samples/s)
Peak GPU Mem (MB)
dleemiller/finecat-nli-m
0.8000
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.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.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.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.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.8365
0.8398
0.8996
0.2660
0.2810
0.2975
0.5516
0.7516
2733.10
566.64
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-l")
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 inzip(pairs, logits):
pred_idx = int(np.argmax(row))
pred = id2label[pred_idx]
print(f"[{pred}] Premise: {prem} | Hypothesis: {hyp}")
Acknowledgments
We thank the creators and contributors of
tasksource
and
MoritzLaurer
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-m on huggingface.co
25
Total runs
0
24-hour runs
-1
3-day runs
0
7-day runs
-43
30-day runs
More Information About finecat-nli-m huggingface.co Model
finecat-nli-m huggingface.co
finecat-nli-m huggingface.co is an AI model on huggingface.co that provides finecat-nli-m's model effect (), which can be used instantly with this dleemiller finecat-nli-m model. huggingface.co supports a free trial of the finecat-nli-m model, and also provides paid use of the finecat-nli-m. Support call finecat-nli-m model through api, including Node.js, Python, http.
finecat-nli-m huggingface.co is an online trial and call api platform, which integrates finecat-nli-m's modeling effects, including api services, and provides a free online trial of finecat-nli-m, you can try finecat-nli-m online for free by clicking the link below.
dleemiller finecat-nli-m online free url in huggingface.co:
finecat-nli-m is an open source model from GitHub that offers a free installation service, and any user can find finecat-nli-m on GitHub to install. At the same time, huggingface.co provides the effect of finecat-nli-m install, users can directly use finecat-nli-m installed effect in huggingface.co for debugging and trial. It also supports api for free installation.