SAVRN
Search Contact SAVRN

Open-weight model · Text ranking

qnli-electra-base

by Sentence Transformers - Cross-Encoders cross-encoder/qnli-electra-base

This model was trained using SentenceTransformers Cross-Encoder class. Given a question and paragraph, can the question be answered by the paragraph? The models have been trained on the GLUE QNLI dataset, which transformed the SQuAD dataset into an NLI task.

Parameters109M
Context512
Weights3.8 GB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads219.4k

Runs On

What it takes to serve qnli-electra-base (109M 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.3 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.1 GB 0.1 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 c7dea87c98b2.

Cross-Encoder for SQuAD (QNLI)

This model was trained using SentenceTransformers Cross-Encoder class.

Training Data

Given a question and paragraph, can the question be answered by the paragraph? The models have been trained on the GLUE QNLI dataset, which transformed the SQuAD dataset into an NLI task.

Performance

For performance results of this model, see [SBERT.net Pre-trained Cross-Encoder][https://www.sbert.net/docs/pretrained_cross-encoders.html].

Usage

Pre-trained models can be used like this:

from sentence_transformers import CrossEncoder

model = CrossEncoder('cross-encoder/qnli-electra-base')
scores = model.predict([('Query1', 'Paragraph1'), ('Query2', 'Paragraph2')])

#e.g.
scores = model.predict([('How many people live in Berlin?', 'Berlin had a population of 3,520,031 registered inhabitants in an area of 891.82 square kilometers.'), ('What is the size of New York?', 'New York City is famous for the Metropolitan Museum of Art.')])

Usage with Transformers AutoModel

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

Read the full model card (201 words)

Configuration

Architecture
ElectraForSequenceClassification
Context length (tokens)
512
Layers
12
Hidden size
768
Feed-forward size
3,072
Attention heads
12
Vocabulary size
30,522
Model type
electra

Identity and Version

Repository
cross-encoder/qnli-electra-base
Publisher
Sentence Transformers - Cross-Encoders
Task
Text ranking
Modality
Other
Library
sentence-transformers
Parameters
109M parameters
Languages
en
Revision
c7dea87c98b2269a935686c31336e97e837cbbeb
First published
2022-03-02
Last updated
2025-04-11

Files and Weights

23 files, 3.8 GB in total. The weights are 13 files totalling 3.8 GB in bin, onnx, safetensors.

Weights13 files · 3.8 GB
Configuration2 files · 903 B
Tokenizer3 files · 944.2 KB
Documentation1 file · 2.2 KB
Other3 files · 1.2 MB
Repository1 file · 399 B
Every file
FileTypeSizeSHA-256
model.safetensorsWeights438.0 MB 40ad4b330600
onnx/model.onnxWeights438.2 MB 595b37541289
onnx/model_O1.onnxWeights438.1 MB ba80a28d6690
onnx/model_O2.onnxWeights438.0 MB 5449153d469d
onnx/model_O3.onnxWeights438.0 MB d3950780952d
onnx/model_O4.onnxWeights219.0 MB 9bdc7db0cff7
onnx/model_qint8_arm64.onnxWeights110.8 MB 7e9ab1c954aa
onnx/model_qint8_avx512.onnxWeights110.8 MB 7e9ab1c954aa
onnx/model_qint8_avx512_vnni.onnxWeights110.8 MB 7e9ab1c954aa
onnx/model_quint8_avx2.onnxWeights110.8 MB 06b08fd2c1ea
openvino/openvino_model.binWeights437.9 MB 3eebd3673eab
openvino/openvino_model_qint8_quantized.binWeights110.6 MB 367c4969da54
pytorch_model.binWeights438.0 MB f8af0b8d3dd8
config.jsonConfiguration771 B
special_tokens_map.jsonConfiguration132 B
README.mdDocumentation2.2 KB
CEBinaryAccuracyEvaluator_qnli-dev_results.csvOther141 B
openvino/openvino_model.xmlOther415.2 KB
openvino/openvino_model_qint8_quantized.xmlOther736.7 KB
.gitattributesRepository399 B
tokenizer.jsonTokenizer711.4 KB
tokenizer_config.jsonTokenizer1.3 KB
vocab.txtTokenizer231.5 KB

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
3.8 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

Memory Requirements

PrecisionWeights in memory
As published3.8 GB
16-bit0.2 GB
8-bit0.1 GB
4-bit0.1 GB

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

Compare qnli-electra-base

Questions About qnli-electra-base

How much GPU memory does qnli-electra-base need?

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

What is the cheapest GPU to run qnli-electra-base 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 qnli-electra-base commercially?

Yes. qnli-electra-base 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 qnli-electra-base's context length?

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

Similar Models

This model was trained on the MS Marco Passage Ranking task. The model can be used for Information Retrieval: Given a query, encode the query will all possible passages (e.g. retrieved with ElasticSearch). Then sort the passages in a decreasing order. See SBERT.net Retrieve & Re-rank for more details. The training code is available here: SBERT.net Training MS Marco The usage is easy when you have SentenceTransformers installed. Then you can use the pre-trained models like this: In the following table, we provide various pre-trained Cross-Encoders together with their performance on the TREC Deep Learning 2019 and the MS Marco Passage Reranking dataset.

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

This model was trained on the MMARCO dataset. It is a machine translated version of MS MARCO using Google Translate. It was translated to 14 languages. In our experiments, we observed that it performs also well for other languages. As a base model, we used the multilingual MiniLMv2 model. The model can be used for Information Retrieval: Given a query, encode the query will all possible passages (e.g. retrieved with ElasticSearch). Then sort the passages in a decreasing order. See SBERT.net Retrieve & Re-rank for more details. The training code is available here: SBERT.net Training MS Marco The usage becomes easy when you have SentenceTransformers installed. Then, you can use the pre-trained…

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

Model · Text ranking

mxbai-rerank-xsmall-v1

Mixedbread

This is the smallest model in our family of powerful reranker models. You can learn more about the models in our blog post. Currently, the best way to use our models is with the most recent version of sentence-transformers. pip install -U sentence-transformers Let's say you have a query, and you want to rerank a set of documents. You can do that with only one line of code: Install transformers.js npm i @xenova/transformers Let's say you have a query, and you want to rerank a set of documents. In JavaScript, you need to add a function: You can use the large model via our API as follows: The API comes with additional features, such as a continous trained reranker! Check out the docs for more…

Open weights apache-2.0 71M parameters 512 tokens transformers

We are excited to introduce the gte-modernbert series of models, which are built upon the latest modernBERT pre-trained encoder-only foundation models. The gte-modernbert series models include both text embedding models and rerank models. The gte-modernbert models demonstrates competitive performance in several text embedding and text retrieval evaluation tasks when compared to similar-scale models from the current open-source community. This includes assessments such as MTEB, LoCO, and COIR evaluation. Use with transformers Use with sentence-transformers: Before you start, install the sentence-transformers libraries: Use with transformers.js Additionally, you can also deploy…

Open weights apache-2.0 150M parameters 8,192 tokens transformers

This is a sentence-transformers model based on a pre-trained DeepPavlov/rubert-base-cased and finetuned with MS-MARCO Russian passage ranking dataset. The model can be used for Information Retrieval in the Russian language: Given a query, encode the query will all possible passages (e.g. retrieved with ElasticSearch). Then sort the passages in a decreasing order. See SBERT.net Retrieve & Re-rank for more details. Using this model becomes easy when you have sentence-transformers installed: Then you can use the model like this: Without sentence-transformers, you can use the model like this: First, you pass your input through the transformer model, then you need to get the logits from the…

Open weights mit 178M parameters 512 tokens sentence-transformers

This model was trained on the MS Marco Passage Ranking task. The model can be used for Information Retrieval: Given a query, encode the query will all possible passages (e.g. retrieved with ElasticSearch). Then sort the passages in a decreasing order. See SBERT.net Retrieve & Re-rank for more details. The training code is available here: SBERT.net Training MS Marco The usage is easy when you have SentenceTransformers installed. Then you can use the pre-trained models like this: In the following table, we provide various pre-trained Cross-Encoders together with their performance on the TREC Deep Learning 2019 and the MS Marco Passage Reranking dataset.

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