This cross encoder performs sequence classification for contradiction/neutral/entailment labels. This has
drop-in compatibility with comparable sentence transformers cross encoders.
This 32m architecture is based on ModernBERT and is an excellent candidate for lightweight CPU inference.
1from sentence_transformers import CrossEncoder
2
3# Load EttinX model
4model = CrossEncoder("dleemiller/EttinX-nli-xs")
5
6scores = model.predict([
7 ('A man is eating pizza', 'A man eats something'),
8 ('A black race car starts up in front of a crowd of people.', 'A man is driving down a lonely road.')
9])
10
11# Convert scores to labels
12label_mapping = ['contradiction', 'entailment', 'neutral']
13labels = [label_mapping[score_max] for score_max in scores.argmax(axis=1)]
14# ['entailment', 'contradiction']
We initialize the `` weights.
The model achieved the following test set micro f1 performance after fine-tuning:
Thanks to the Johns Hopkins team for providing the ModernBERT models, and the Sentence Transformers team for their leadership in transformer encoder models.
1@misc{moderncenli2025,
2 author = {Miller, D. Lee},
3 title = {EttinX NLI: An NLI cross encoder model},
4 year = {2025},
5 publisher = {Hugging Face Hub},
6 url = {https://huggingface.co/dleemiller/EttinX-nli-xxs},
7}
This model is licensed under the
MIT License.