QNLI ELECTRA Base
cross-encoder/qnli-electra-base
published Mar 2022 · updated Apr 2025
QNLI ELECTRA Base is a cross-encoder rerank model that scores whether a given paragraph can answer a question, trained on the GLUE QNLI dataset derived from SQuAD.
specs
| Task | Reranking / Cross-Encoder |
| Architecture | ELECTRA Base |
| Parameters | 110 million |
| License | CC BY-SA 4.0 (SQuAD) |
about this model
cross-encoder/qnli-electra-base is a cross-encoder reranking model that scores the relevance of a question-answer pair by predicting whether the paragraph can answer the question. It is trained on the GLUE QNLI dataset, a transformation of the SQuAD dataset into a natural language inference task. The model uses an ELECTRA-base architecture and is optimized for pairwise text classification, making it suitable for reranking candidate passages in information retrieval and question answering pipelines.
Training Data
The model was trained on the GLUE QNLI dataset (arXiv:1804.07461), which converts the SQuAD dataset—over 100,000 question-answer pairs from Wikipedia articles—into an NLI format. SQuAD2.0 additionally includes over 50,000 unanswerable questions. The training data is distributed under CC BY-SA 4.0.
Performance
For detailed performance results, including accuracy and F1 scores on QNLI, refer to the SBERT.net pre-trained cross-encoders documentation (see link below). The GLUE benchmark evaluates models across diverse NLU tasks; ELECTRA-base models generally achieve competitive results on QNLI.
Key Strengths
- Lightweight cross-encoder architecture suitable for real-time reranking.
- Trained on a high-quality, widely used NLI dataset derived from SQuAD.
- Compatible with standard cross-encoder workflows for scoring query-document pairs.
Additional Resources
best for
- ·Determining if a paragraph contains the answer to a given question
- ·Reranking search results for question-answering pipelines
- ·Building NLI-based QA systems on Wikipedia text
FAQ
The model accepts pairs of (query, paragraph) text strings. For example, a question and a candidate paragraph.
It outputs a relevance score (logit) for each pair, indicating how likely the paragraph answers the question.
Use the OpenAI-compatible endpoint with your API key, sending the model name and your input pairs.
It was trained on the GLUE QNLI dataset, which transforms SQuAD question-answer pairs into an NLI task.
The model was trained on English SQuAD data; performance on other languages is not guaranteed.
We're benchmarking and onboarding QNLI ELECTRA Base as a hosted, OpenAI-compatible API. Sign in for free credit and be ready when it lands, or tell us you want it and we'll prioritize it.