cross-encoder / monoelectra-large

huggingface.co
Total runs: 43
24-hour runs: 0
7-day runs: -28
30-day runs: -39
Model's Last Updated: April 15 2025
text-ranking

Introduction of monoelectra-large

Model Details of monoelectra-large

Cross-Encoder for Text Ranking

This model is a port of the webis/monoelectra-large model from lightning-ir to Sentence Transformers and Transformers .

The original model was introduced in the paper A Systematic Investigation of Distilling Large Language Models into Cross-Encoders for Passage Re-ranking . See https://github.com/webis-de/rank-distillm for code used to train the original model.

The model can be used as a reranker in a 2-stage "retrieve-rerank" pipeline, where it reorders passages returned by a retriever model (e.g. an embedding model or BM25) given some query. See SBERT.net Retrieve & Re-rank for more details.

Usage with Sentence Transformers

The usage is easy when you have SentenceTransformers installed.

pip install sentence-transformers

Then you can use the pre-trained model like this:

from sentence_transformers import CrossEncoder

model = CrossEncoder("cross-encoder/monoelectra-large", trust_remote_code=True)
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."),
    ("How many people live in Berlin?", "Berlin is well known for its museums."),
])
print(scores)
# [ 6.016401  -3.6922567]
Usage with Transformers
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch

model = AutoModelForSequenceClassification.from_pretrained("cross-encoder/monoelectra-large", trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("cross-encoder/monoelectra-large")

features = tokenizer(
    [
        ("How many people live in Berlin?", "Berlin had a population of 3,520,031 registered inhabitants in an area of 891.82 square kilometers."),
        ("How many people live in Berlin?", "Berlin is well known for its museums."),
    ],
    padding=True,
    truncation=True,
    return_tensors="pt",
)

model.eval()
with torch.no_grad():
    scores = model(**features).logits.view(-1)
print(scores)
# tensor([ 6.0164, -3.6923])

Runs of cross-encoder monoelectra-large on huggingface.co

43
Total runs
0
24-hour runs
-10
3-day runs
-28
7-day runs
-39
30-day runs

More Information About monoelectra-large huggingface.co Model

More monoelectra-large license Visit here:

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

monoelectra-large huggingface.co

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

cross-encoder monoelectra-large online free

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

cross-encoder monoelectra-large online free url in huggingface.co:

https://huggingface.co/cross-encoder/monoelectra-large

monoelectra-large install

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

monoelectra-large install url in huggingface.co:

https://huggingface.co/cross-encoder/monoelectra-large

Url of monoelectra-large

Provider of monoelectra-large huggingface.co

cross-encoder
ORGANIZATIONS

Other API from cross-encoder