dleemiller / ModernCE-base-nli

huggingface.co
Total runs: 788
24-hour runs: -28
7-day runs: -14
30-day runs: -475
Model's Last Updated: October 27 2025
text-classification

Introduction of ModernCE-base-nli

Model Details of ModernCE-base-nli

ModernBERT Cross-Encoder: Natural Language Inference (NLI)

This cross encoder performs sequence classification for contradiction/neutral/entailment labels. This has drop-in compatibility with comparable sentence transformers cross encoders.

I trained this model by initializaing the ModernBERT-base weights from the brilliant tasksource/ModernBERT-base-nli zero-shot classification model. Then I trained it with a batch size of 64 using the sentence-transformers AllNLI dataset.


Features
  • High performing: Achieves 90.34% and 90.25% on MNLI mismatched and SNLI test.
  • Efficient architecture: Based on the ModernBERT-base design (149M parameters), offering faster inference speeds.
  • Extended context length: Processes sequences up to 8192 tokens, great for LLM output evals.

Performance
Model MNLI Mismatched SNLI Test Context Length
ModernCE-base-nli 0.9034 0.9025 8192
deberta-v3-large 0.9049 0.9220 512
deberta-v3-base 0.9004 0.9234 512

Usage

To use ModernCE for NLI tasks, you can load the model with the Hugging Face sentence-transformers library:

from sentence_transformers import CrossEncoder

# Load ModernCE model
model = CrossEncoder("dleemiller/ModernCE-base-nli")

scores = model.predict([
    ('A man is eating pizza', 'A man eats something'),
    ('A black race car starts up in front of a crowd of people.', 'A man is driving down a lonely road.')
])

# Convert scores to labels
label_mapping = ['contradiction', 'entailment', 'neutral']
labels = [label_mapping[score_max] for score_max in scores.argmax(axis=1)]
# ['entailment', 'contradiction']

Training Details
Pretraining

We initialize the tasksource/ModernBERT-base weights.

Details:

  • Batch size: 64
  • Learning rate: 3e-4
  • Attention Dropout: attention dropout 0.1
Fine-Tuning

Fine-tuning was performed on the SBERT AllNLI.tsv.gz dataset.

Validation Results

The model achieved the following test set performance after fine-tuning:

  • MNLI Unmatched: 0.9034
  • SNLI: 0.9025

Model Card
  • Architecture: ModernBERT-base
  • Fine-Tuning Data: sentence-transformers - AllNLI.tsv.gz

Thank You

Thanks to the AnswerAI team for providing the ModernBERT models, and the Sentence Transformers team for their leadership in transformer encoder models. We also thank the tasksource team for their work on zeroshot encoder models.


Citation

If you use this model in your research, please cite:

@misc{moderncenli2025,
  author = {Miller, D. Lee},
  title = {ModernCE NLI: An NLI cross encoder model},
  year = {2025},
  publisher = {Hugging Face Hub},
  url = {https://huggingface.co/dleemiller/ModernCE-base-nli},
}

License

This model is licensed under the MIT License .

Runs of dleemiller ModernCE-base-nli on huggingface.co

788
Total runs
-28
24-hour runs
-26
3-day runs
-14
7-day runs
-475
30-day runs

More Information About ModernCE-base-nli huggingface.co Model

More ModernCE-base-nli license Visit here:

https://choosealicense.com/licenses/mit

ModernCE-base-nli huggingface.co

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

ModernCE-base-nli huggingface.co Url

https://huggingface.co/dleemiller/ModernCE-base-nli

dleemiller ModernCE-base-nli online free

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

dleemiller ModernCE-base-nli online free url in huggingface.co:

https://huggingface.co/dleemiller/ModernCE-base-nli

ModernCE-base-nli install

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

ModernCE-base-nli install url in huggingface.co:

https://huggingface.co/dleemiller/ModernCE-base-nli

Url of ModernCE-base-nli

ModernCE-base-nli huggingface.co Url

Provider of ModernCE-base-nli huggingface.co

dleemiller
ORGANIZATIONS

Other API from dleemiller