Model reference · open weights

qnli-electra

Embeddings cross-encoder Reranker 1 build Open weights 69k dl/mo

qnli-electra is an open-weight embedding model from cross-encoder. qnli-electra-base (FP32) weighs 219 MB; the smallest configuration that runs it is RTX 3060 12 GB.

  • qnli-electra is a 109M parameter cross-encoder model designed for text-ranking tasks.
  • It determines whether a question can be answered by a given paragraph, having been trained on the GLUE QNLI dataset.
  • The model supports English, has a context length of 512 tokens, and is released under the apache-2.0 licence.

Summary of the cross-encoder/qnli-electra-base model card, 2026-10-01

What it is

Released bycross-encoder
Released2022-03-02
Parameters109M
VRAM219 MB for the weights

What it runs on

Memory and cards for qnli-electra-base (FP32)

219 MBweights, file size
1.1 GBruntime overhead
CardRunsMemory
RTX 3060 12 GBfits11.6 GB
RTX 4060 Ti 16 GBfits15.4 GB
RTX 3090 24 GBfits23.4 GB
RTX 4090 24 GBfits23.4 GB
RTX 5090 32 GBfits31.0 GB
L40S 48 GBfits44.0 GB
A100 80 GBfits78.2 GB
H100 80 GBfits78.1 GB
RTX PRO 6000 Blackwell 96 GBfits93.8 GB
DGX Spark (GB10) 128 GB unifiedfits107 GB
H200 141 GBfits138 GB
B200 180 GBfits176 GB

From the model card

What cross-encoder says about qnli-electra

Read the model card

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):

from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch

model = AutoModelForSequenceClassification.from_pretrained('cross-encoder/qnli-electra-base')
tokenizer = AutoTokenizer.from_pretrained('cross-encoder/qnli-electra-base')

features = tokenizer(['How many people live in Berlin?', 'What is the size of New York?'], ['Berlin had a population of 3,520,031 registered inhabitants in an area of 891.82 square kilometers.', 'New York City is famous for the Metropolitan Museum of Art.'],  padding=True, truncation=True, return_tensors="pt")

model.eval()
with torch.no_grad():
    scores = torch.nn.functional.sigmoid(model(**features).logits)
    print(scores)

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms