This model is a fine-tune of the excellent tasksource/ModernBERT-large-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 MoritzLaurer/DeBERTa-v3-large-mnli-fever-anli-ling-wanli,
a top-performing NLI model, particularly on ANLI benchmarks.
Distillation loss looks like this:
$$
\begin{equation}
\mathcal{L} = \alpha \cdot \mathcal{L}{\text{CE}}(z^{(s)}, y) + \beta \cdot \mathcal{L}{\text{MSE}}(z^{(s)}, z^{(t)})
\end{equation}
$$
where \(z^{(s)}\) and \(z^{(t)}\) are the student and teacher logits, \(y\) are the ground truth labels,
and \(\alpha\) and \(\beta\) are equally weighted at 0.5.
By combining the broad NLI training of the tasksource model (which excels on traditional MNLI/SNLI benchmarks)
with the ANLI strengths of the MoritzLaurer model and the high-quality FineCat-NLI dataset, this model achieves
strong performance across major NLI benchmarks while retaining the efficiency advantages of the ModernBERT
architecture.
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.
1from sentence_transformers import CrossEncoder
2import numpy as np
34model = CrossEncoder("dleemiller/finecat-nli-l")5id2label = model.model.config.id2label # {0:'entailment', 1:'neutral', 2:'contradiction'}67pairs =[8("The glass fell off the counter and shattered on the tile.",9"The glass broke when it hit the floor."),# E10("The store opens at 9 a.m. every day.",11"The store opens at 7 a.m. on weekdays."),# C12("A researcher presented results at the conference.",13"The presentation won the best paper award."),# N14("It started raining heavily, so the match was postponed.",15"The game was delayed due to weather."),# E16("Every seat on the flight was taken.",17"There were several empty seats on the plane."),# C18]1920logits = model.predict(pairs)# shape: (5, 3)2122for(prem, hyp), row inzip(pairs, logits):23 pred_idx =int(np.argmax(row))24 pred = id2label[pred_idx]25print(f"[{pred}] Premise: {prem} | Hypothesis: {hyp}")26
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
bibtex
1@misc{nli-compiled-2025,
2 title = {FineCat NLI Dataset},
3 author = {Lee Miller},
4 year = {2025},
5 howpublished = {Refined compilation of 6 major NLI datasets}
6}