cross-encoder / qnli-electra-base

huggingface.co
Total runs: 3.5K
24-hour runs: 0
7-day runs: 912
30-day runs: 731
Model's Last Updated: Dezember 12 2024
text-classification

Introduction of qnli-electra-base

Model Details of qnli-electra-base

Cross-Encoder for Quora Duplicate Questions Detection

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('model_name')
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('model_name')
tokenizer = AutoTokenizer.from_pretrained('model_name')

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)

Runs of cross-encoder qnli-electra-base on huggingface.co

3.5K
Total runs
0
24-hour runs
393
3-day runs
912
7-day runs
731
30-day runs

More Information About qnli-electra-base huggingface.co Model

More qnli-electra-base license Visit here:

https://choosealicense.com/licenses/apache-2.0

qnli-electra-base huggingface.co

qnli-electra-base huggingface.co is an AI model on huggingface.co that provides qnli-electra-base's model effect (), which can be used instantly with this cross-encoder qnli-electra-base model. huggingface.co supports a free trial of the qnli-electra-base model, and also provides paid use of the qnli-electra-base. Support call qnli-electra-base model through api, including Node.js, Python, http.

cross-encoder qnli-electra-base online free

qnli-electra-base huggingface.co is an online trial and call api platform, which integrates qnli-electra-base's modeling effects, including api services, and provides a free online trial of qnli-electra-base, you can try qnli-electra-base online for free by clicking the link below.

cross-encoder qnli-electra-base online free url in huggingface.co:

https://huggingface.co/cross-encoder/qnli-electra-base

qnli-electra-base install

qnli-electra-base is an open source model from GitHub that offers a free installation service, and any user can find qnli-electra-base on GitHub to install. At the same time, huggingface.co provides the effect of qnli-electra-base install, users can directly use qnli-electra-base installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

qnli-electra-base install url in huggingface.co:

https://huggingface.co/cross-encoder/qnli-electra-base

Url of qnli-electra-base

Provider of qnli-electra-base huggingface.co

cross-encoder
ORGANIZATIONS

Other API from cross-encoder