SAVRN
Search Contact SAVRN

Open-weight model · Zero-shot classification

nli-MiniLM2-L6-H768

by Sentence Transformers - Cross-Encoders cross-encoder/nli-MiniLM2-L6-H768

This model was trained using SentenceTransformers Cross-Encoder class. The model was trained on the SNLI and MultiNLI datasets. For a given sentence pair, it will output three scores corresponding to the labels: contradiction, entailment, neutral.

Parameters82M
Context514
Weights2.9 GB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads116.9k

Runs On

What it takes to serve nli-MiniLM2-L6-H768 (82M parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

PrecisionWeightsMemory neededCheapest setupPer hourAlso fits
16-bit 0.2 GB 0.2 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 0.1 GB 0.1 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 0.0 GB 0.0 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00

Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Sep 18, 2026.

Model Card

By Sentence Transformers - Cross-Encoders, published under apache-2.0, revision b95119ce93d3.

Cross-Encoder for Natural Language Inference

This model was trained using SentenceTransformers Cross-Encoder class.

Training Data

The model was trained on the SNLI and MultiNLI datasets. For a given sentence pair, it will output three scores corresponding to the labels: contradiction, entailment, neutral.

Performance

For evaluation results, see SBERT.net - Pretrained Cross-Encoder.

Usage

Pre-trained models can be used like this:

from sentence_transformers import CrossEncoder
model = CrossEncoder('cross-encoder/nli-MiniLM2-L6-H768')
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)]

Usage with Transformers AutoModel

You can use the model also directly with Transformers library (without SentenceTransformers library):

Read the full model card (236 words)

Configuration

Architecture
RobertaForSequenceClassification
Context length (tokens)
514
Layers
6
Hidden size
768
Feed-forward size
3,072
Attention heads
12
Vocabulary size
50,265
Model type
roberta

Identity and Version

Repository
cross-encoder/nli-MiniLM2-L6-H768
Publisher
Sentence Transformers - Cross-Encoders
Task
Zero-shot classification
Modality
Text
Library
sentence-transformers
Parameters
82M parameters
Languages
en
Revision
b95119ce93d3e065de6214e38cd4a97b0f2f2c6d
First published
2022-03-02
Last updated
2025-04-15

Files and Weights

24 files, 2.9 GB in total. The weights are 13 files totalling 2.9 GB in bin, onnx, safetensors.

Weights13 files · 2.9 GB
Configuration2 files · 1.1 KB
Tokenizer4 files · 2.6 MB
Documentation1 file · 2.7 KB
Other3 files · 590.4 KB
Repository1 file · 744 B
Every file
FileTypeSizeSHA-256
model.safetensorsWeights328.5 MB ec9c5b6a08b6
onnx/model.onnxWeights328.6 MB 807d33fffefd
onnx/model_O1.onnxWeights328.6 MB 8a9273f027fc
onnx/model_O2.onnxWeights328.5 MB 1e320643f4e1
onnx/model_O3.onnxWeights328.5 MB 3807cf1d57f0
onnx/model_O4.onnxWeights164.3 MB b031fdc4c906
onnx/model_qint8_arm64.onnxWeights82.8 MB 449024a8711a
onnx/model_qint8_avx512.onnxWeights82.8 MB 449024a8711a
onnx/model_qint8_avx512_vnni.onnxWeights82.8 MB 449024a8711a
onnx/model_quint8_avx2.onnxWeights82.8 MB 44391a5241a6
openvino/openvino_model.binWeights328.5 MB ff8b2c896de5
openvino/openvino_model_qint8_quantized.binWeights82.8 MB 36b8abc21480
pytorch_model.binWeights328.5 MB 768059960825
config.jsonConfiguration875 B
special_tokens_map.jsonConfiguration239 B
README.mdDocumentation2.7 KB
CESoftmaxAccuracyEvaluator_AllNLI-dev_results.csvOther335 B
openvino/openvino_model.xmlOther211.7 KB
openvino/openvino_model_qint8_quantized.xmlOther378.3 KB
.gitattributesRepository744 B
merges.txtTokenizer456.4 KB
tokenizer.jsonTokenizer1.4 MB
tokenizer_config.jsonTokenizer330 B
vocab.jsonTokenizer798.3 KB

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
2.9 GB
Download from Sentence Transformers - Cross-Encoders

Released by Sentence Transformers - Cross-Encoders through its official repository on Hugging Face. Read the license.

Built From

  • Derived from nreimers/MiniLMv2-L6-H768-distilled-from-RoBERTa-Large
  • Quantized from nreimers/MiniLMv2-L6-H768-distilled-from-RoBERTa-Large
  • Trained on (disclosed) nyu-mll/multi_nli
  • Trained on (disclosed) stanfordnlp/snli

Memory Requirements

PrecisionWeights in memory
As published2.9 GB
16-bit0.2 GB
8-bit0.1 GB
4-bit0.0 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About nli-MiniLM2-L6-H768

How much GPU memory does nli-MiniLM2-L6-H768 need?

About 0.2 GB at 16-bit and 0 GB at 4-bit: the weights (82M parameters) plus a working margin. A long context needs more.

What is the cheapest GPU to run nli-MiniLM2-L6-H768 on?

At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.

Can I use nli-MiniLM2-L6-H768 commercially?

Yes. nli-MiniLM2-L6-H768 is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

What is nli-MiniLM2-L6-H768's context length?

514 tokens, from the maximum position embeddings in its published configuration.

Similar Models

This model was trained using SentenceTransformers Cross-Encoder class. The model was trained on the SNLI and MultiNLI datasets. For a given sentence pair, it will output three scores corresponding to the labels: contradiction, entailment, neutral. For evaluation results, see SBERT.net - Pretrained Cross-Encoder. Pre-trained models can be used like this: You can use the model also directly with Transformers library (without SentenceTransformers library): This model can also be used for zero-shot-classification

Open weights apache-2.0 82M parameters 514 tokens sentence-transformers

This model was trained using SentenceTransformers Cross-Encoder class. This model is based on microsoft/deberta-v3-xsmall The model was trained on the SNLI and MultiNLI datasets. For a given sentence pair, it will output three scores corresponding to the labels: contradiction, entailment, neutral. For futher evaluation results, see SBERT.net - Pretrained Cross-Encoder. Pre-trained models can be used like this: You can use the model also directly with Transformers library (without SentenceTransformers library): This model can also be used for zero-shot-classification

Open weights apache-2.0 71M parameters 512 tokens sentence-transformers

This model was trained on 782 357 hypothesis-premise pairs from 4 NLI datasets: MultiNLI, Fever-NLI, LingNLI and ANLI. Note that the model was trained on binary NLI to predict either "entailment" or "not-entailment". This is specifically designed for zero-shot classification, where the difference between "neutral" and "contradiction" is irrelevant. The base model is DeBERTa-v3-xsmall from Microsoft. The v3 variant of DeBERTa substantially outperforms previous versions of the model by including a different pre-training objective, see the DeBERTa-V3 paper. For highest performance (but less speed), I recommend using…

Open weights mit 71M parameters 512 tokens transformers

This model was fine-tuned using the same pipeline as described in the model card for MoritzLaurer/deberta-v3-large-zeroshot-v1.1-all-33 and in this paper. The foundation model is microsoft/deberta-v3-xsmall. The model only has 22 million backbone parameters and 128 million vocabulary parameters. The backbone parameters are the main parameters active during inference, providing a significant speedup over larger models. The model is 142 MB small. This model was trained to provide a small and highly efficient zeroshot option, especially for edge devices or in-browser use-cases with transformers.js. For usage instructions and other details refer to this model card…

Open weights mit 71M parameters 512 tokens transformers

Model · Zero-shot classification

distilbert-base-uncased-mnli

Typeform

This is the uncased DistilBERT model fine-tuned on Multi-Genre Natural Language Inference (MNLI) dataset for the zero-shot classification task. This model can be used for text classification tasks. CONTENT WARNING: Readers should be aware this section contains content that is disturbing, offensive, and can propagate historical and current stereotypes. Significant research has explored bias and fairness issues with language models (see, e.g., Sheng et al. (2021) and Bender et al. (2021)). This model of DistilBERT-uncased is pretrained on the Multi-Genre Natural Language Inference (MultiNLI) corpus. It is a crowd-sourced collection of 433k sentence pairs annotated with textual entailment…

Open weights 67M parameters 512 tokens transformers

multilingual - zero-shot-classification - text-classification - nli - pytorch - accuracy - multinli - xnli pipelinetag: zero-shot-classification candidatelabels: "politics, economy, entertainment, environment" This multilingual model can perform natural language inference (NLI) on 100+ languages and is therefore also suitable for multilingual zero-shot classification. The underlying multilingual-MiniLM-L6 model was created by Microsoft and was distilled from XLM-RoBERTa-large (see details in the original paper and newer information in this repo). The model was then fine-tuned on the XNLI dataset, which contains hypothesis-premise pairs from 15 languages, as well as the English MNLI dataset.…

Open weights mit 107M parameters 514 tokens transformers