This is a
Cross Encoder
model finetuned from
answerdotai/ModernBERT-base
using the
sentence-transformers
library. It computes scores for pairs of texts, which can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
from sentence_transformers import CrossEncoder
# Download from the 🤗 Hub
model = CrossEncoder("tomaarsen/reranker-ModernBERT-base-nq-bce")
# Get scores for pairs of texts
pairs = [
['difference between russian blue and british blue cat', 'Russian Blue The coat is known as a "double coat", with the undercoat being soft, downy and equal in length to the guard hairs, which are an even blue with silver tips. However, the tail may have a few very dull, almost unnoticeable stripes. The coat is described as thick, plush and soft to the touch. The feeling is softer than the softest silk. The silver tips give the coat a shimmering appearance. Its eyes are almost always a dark and vivid green. Any white patches of fur or yellow eyes in adulthood are seen as flaws in show cats.[3] Russian Blues should not be confused with British Blues (which are not a distinct breed, but rather a British Shorthair with a blue coat as the British Shorthair breed itself comes in a wide variety of colors and patterns), nor the Chartreux or Korat which are two other naturally occurring breeds of blue cats, although they have similar traits.'],
['who played the little girl on mrs doubtfire', 'Mara Wilson Mara Elizabeth Wilson[2] (born July 24, 1987) is an American writer and former child actress. She is known for playing Natalie Hillard in Mrs. Doubtfire (1993), Susan Walker in Miracle on 34th Street (1994), Matilda Wormwood in Matilda (1996) and Lily Stone in Thomas and the Magic Railroad (2000). Since retiring from film acting, Wilson has focused on writing.'],
['what year did the movie the sound of music come out', 'The Sound of Music (film) The film was released on March 2, 1965 in the United States, initially as a limited roadshow theatrical release. Although critical response to the film was widely mixed, the film was a major commercial success, becoming the number one box office movie after four weeks, and the highest-grossing film of 1965. By November 1966, The Sound of Music had become the highest-grossing film of all-time—surpassing Gone with the Wind—and held that distinction for five years. The film was just as popular throughout the world, breaking previous box-office records in twenty-nine countries. Following an initial theatrical release that lasted four and a half years, and two successful re-releases, the film sold 283 million admissions worldwide and earned a total worldwide gross of $286,000,000.'],
['where was the movie dawn of the dead filmed', 'Dawn of the Dead (2004 film) The mall scenes and rooftop scenes were shot in the former Thornhill Square Shopping Centre in Thornhill, Ontario, and the other scenes were shot in the Aileen-Willowbrook neighborhood of Thornhill. The set for Ana and Luis\'s bedroom was constructed in a back room of the mall.[7] The mall was defunct, which is the reason the production used it; the movie crew completely renovated the structure, and stocked it with fictitious stores after Starbucks and numerous other corporations refused to let their names be used[7] (two exceptions to this are Roots and Panasonic). Most of the mall was demolished shortly after the film was shot. The fictitious stores include a coffee shop called Hallowed Grounds (a lyric from Johnny Cash\'s song "The Man Comes Around", which was used over the opening credits), and an upscale department store called Gaylen Ross (an in-joke reference to one of the stars of the original 1978 film).'],
['where is the 2018 nba draft being held', "2018 NBA draft The 2018 NBA draft was held on June 21, 2018, at Barclays Center in Brooklyn, New York. National Basketball Association (NBA) teams took turns selecting amateur United States college basketball players and other eligible players, including international players. It was televised nationally by ESPN. This draft was the last to use the original weighted lottery system that gives teams near the bottom of the NBA draft better odds at the top three picks of the draft while teams higher up had worse odds in the process; the rule was agreed upon by the NBA on September 28, 2017, but would not be implemented until the 2019 draft.[2] With the last year of what was, at the time, the most recent lottery system (with the NBA draft lottery being held in Chicago instead of in New York), the Phoenix Suns won the first overall pick on May 15, 2018, with the Sacramento Kings at the second overall pick and the Atlanta Hawks at third overall pick.[3] The Suns' selection is their first No. 1 overall selection in franchise history. They would use that selection on the Bahamian center DeAndre Ayton from the nearby University of Arizona."],
]
scores = model.predict(pairs)
print(scores.shape)
# (5,)# Or rank different texts based on similarity to a single text
ranks = model.rank(
'difference between russian blue and british blue cat',
[
'Russian Blue The coat is known as a "double coat", with the undercoat being soft, downy and equal in length to the guard hairs, which are an even blue with silver tips. However, the tail may have a few very dull, almost unnoticeable stripes. The coat is described as thick, plush and soft to the touch. The feeling is softer than the softest silk. The silver tips give the coat a shimmering appearance. Its eyes are almost always a dark and vivid green. Any white patches of fur or yellow eyes in adulthood are seen as flaws in show cats.[3] Russian Blues should not be confused with British Blues (which are not a distinct breed, but rather a British Shorthair with a blue coat as the British Shorthair breed itself comes in a wide variety of colors and patterns), nor the Chartreux or Korat which are two other naturally occurring breeds of blue cats, although they have similar traits.',
'Mara Wilson Mara Elizabeth Wilson[2] (born July 24, 1987) is an American writer and former child actress. She is known for playing Natalie Hillard in Mrs. Doubtfire (1993), Susan Walker in Miracle on 34th Street (1994), Matilda Wormwood in Matilda (1996) and Lily Stone in Thomas and the Magic Railroad (2000). Since retiring from film acting, Wilson has focused on writing.',
'The Sound of Music (film) The film was released on March 2, 1965 in the United States, initially as a limited roadshow theatrical release. Although critical response to the film was widely mixed, the film was a major commercial success, becoming the number one box office movie after four weeks, and the highest-grossing film of 1965. By November 1966, The Sound of Music had become the highest-grossing film of all-time—surpassing Gone with the Wind—and held that distinction for five years. The film was just as popular throughout the world, breaking previous box-office records in twenty-nine countries. Following an initial theatrical release that lasted four and a half years, and two successful re-releases, the film sold 283 million admissions worldwide and earned a total worldwide gross of $286,000,000.',
'Dawn of the Dead (2004 film) The mall scenes and rooftop scenes were shot in the former Thornhill Square Shopping Centre in Thornhill, Ontario, and the other scenes were shot in the Aileen-Willowbrook neighborhood of Thornhill. The set for Ana and Luis\'s bedroom was constructed in a back room of the mall.[7] The mall was defunct, which is the reason the production used it; the movie crew completely renovated the structure, and stocked it with fictitious stores after Starbucks and numerous other corporations refused to let their names be used[7] (two exceptions to this are Roots and Panasonic). Most of the mall was demolished shortly after the film was shot. The fictitious stores include a coffee shop called Hallowed Grounds (a lyric from Johnny Cash\'s song "The Man Comes Around", which was used over the opening credits), and an upscale department store called Gaylen Ross (an in-joke reference to one of the stars of the original 1978 film).',
"2018 NBA draft The 2018 NBA draft was held on June 21, 2018, at Barclays Center in Brooklyn, New York. National Basketball Association (NBA) teams took turns selecting amateur United States college basketball players and other eligible players, including international players. It was televised nationally by ESPN. This draft was the last to use the original weighted lottery system that gives teams near the bottom of the NBA draft better odds at the top three picks of the draft while teams higher up had worse odds in the process; the rule was agreed upon by the NBA on September 28, 2017, but would not be implemented until the 2019 draft.[2] With the last year of what was, at the time, the most recent lottery system (with the NBA draft lottery being held in Chicago instead of in New York), the Phoenix Suns won the first overall pick on May 15, 2018, with the Sacramento Kings at the second overall pick and the Atlanta Hawks at third overall pick.[3] The Suns' selection is their first No. 1 overall selection in franchise history. They would use that selection on the Bahamian center DeAndre Ayton from the nearby University of Arizona.",
]
)
# [{'corpus_id': ..., 'score': ...}, {'corpus_id': ..., 'score': ...}, ...]
Evaluation
Metrics
Cross Encoder Reranking
Datasets:
nq-dev
,
NanoMSMARCO
,
NanoNFCorpus
and
NanoNQ
Approximate statistics based on the first 1000 samples:
query
response
label
type
string
string
int
details
min: 29 characters
mean: 47.27 characters
max: 98 characters
min: 26 characters
mean: 615.6 characters
max: 3146 characters
1: 100.00%
Samples:
query
response
label
who plays harry in the amazing spiderman 2
Dane DeHaan Dane William DeHaan (/dəˈhɑːn/ də-HAHN; born February 6, 1986[2][3][4]) is an American actor. His roles include Andrew Detmer in Chronicle (2012), Harry Osborn in The Amazing Spider-Man 2 (2014), Lockhart in Gore Verbinski's A Cure for Wellness (2016), and the title character in Luc Besson's Valerian and the City of a Thousand Planets (2017). He has also appeared in several advertisements for Prada.
1
when was the united federation of planets founded
United Federation of Planets In the series Star Trek: Enterprise, Earth Minister Nathan Samuels advocated the Coalition of Planets and invited other alien species, initially the Vulcans, Andorians and Tellarites, to become a part of this. The formation of the Coalition seems to have been the event that provoked the xenophobic Terra Prime incident in the episodes "Demons" and "Terra Prime". After Terra Prime leader John Frederick Paxton exploited the xenophobia on Earth, many of the aliens were unnerved and nearly abandoned the idea of a coalition. However, they were convinced by a speech from Captain Jonathan Archer to give the idea of a united organization of worlds a chance. Six years later in 2161,[8] the United Federation of Planets was organized.
1
who plays flores in orange is the new black
Laura Gómez (actress) Laura Gómez (born 1979) is a Dominican actress, speaker, writer, and director. She belongs to SAG-AFTRA and lives in New York City. Gómez is best known for her portrayal of the character Blanca Flores, an astute and disheveled prison inmate in the award-winning Netflix series Orange Is The New Black. In the fall of 2012 she won the NYU Technisphere Award for her short film To Kill a Roach.
Approximate statistics based on the first 1000 samples:
query
response
label
type
string
string
int
details
min: 27 characters
mean: 47.03 characters
max: 96 characters
min: 26 characters
mean: 608.17 characters
max: 2639 characters
1: 100.00%
Samples:
query
response
label
difference between russian blue and british blue cat
Russian Blue The coat is known as a "double coat", with the undercoat being soft, downy and equal in length to the guard hairs, which are an even blue with silver tips. However, the tail may have a few very dull, almost unnoticeable stripes. The coat is described as thick, plush and soft to the touch. The feeling is softer than the softest silk. The silver tips give the coat a shimmering appearance. Its eyes are almost always a dark and vivid green. Any white patches of fur or yellow eyes in adulthood are seen as flaws in show cats.[3] Russian Blues should not be confused with British Blues (which are not a distinct breed, but rather a British Shorthair with a blue coat as the British Shorthair breed itself comes in a wide variety of colors and patterns), nor the Chartreux or Korat which are two other naturally occurring breeds of blue cats, although they have similar traits.
1
who played the little girl on mrs doubtfire
Mara Wilson Mara Elizabeth Wilson[2] (born July 24, 1987) is an American writer and former child actress. She is known for playing Natalie Hillard in Mrs. Doubtfire (1993), Susan Walker in Miracle on 34th Street (1994), Matilda Wormwood in Matilda (1996) and Lily Stone in Thomas and the Magic Railroad (2000). Since retiring from film acting, Wilson has focused on writing.
1
what year did the movie the sound of music come out
The Sound of Music (film) The film was released on March 2, 1965 in the United States, initially as a limited roadshow theatrical release. Although critical response to the film was widely mixed, the film was a major commercial success, becoming the number one box office movie after four weeks, and the highest-grossing film of 1965. By November 1966, The Sound of Music had become the highest-grossing film of all-time—surpassing Gone with the Wind—and held that distinction for five years. The film was just as popular throughout the world, breaking previous box-office records in twenty-nine countries. Following an initial theatrical release that lasted four and a half years, and two successful re-releases, the film sold 283 million admissions worldwide and earned a total worldwide gross of $286,000,000.
@inproceedings{reimers-2019-sentence-bert,
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
author = "Reimers, Nils and Gurevych, Iryna",
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
month = "11",
year = "2019",
publisher = "Association for Computational Linguistics",
url = "https://arxiv.org/abs/1908.10084",
}
Runs of tomaarsen reranker-ModernBERT-base-nq-bce on huggingface.co
23
Total runs
0
24-hour runs
-1
3-day runs
-6
7-day runs
-66
30-day runs
More Information About reranker-ModernBERT-base-nq-bce huggingface.co Model
reranker-ModernBERT-base-nq-bce huggingface.co
reranker-ModernBERT-base-nq-bce huggingface.co is an AI model on huggingface.co that provides reranker-ModernBERT-base-nq-bce's model effect (), which can be used instantly with this tomaarsen reranker-ModernBERT-base-nq-bce model. huggingface.co supports a free trial of the reranker-ModernBERT-base-nq-bce model, and also provides paid use of the reranker-ModernBERT-base-nq-bce. Support call reranker-ModernBERT-base-nq-bce model through api, including Node.js, Python, http.
reranker-ModernBERT-base-nq-bce huggingface.co is an online trial and call api platform, which integrates reranker-ModernBERT-base-nq-bce's modeling effects, including api services, and provides a free online trial of reranker-ModernBERT-base-nq-bce, you can try reranker-ModernBERT-base-nq-bce online for free by clicking the link below.
tomaarsen reranker-ModernBERT-base-nq-bce online free url in huggingface.co:
reranker-ModernBERT-base-nq-bce is an open source model from GitHub that offers a free installation service, and any user can find reranker-ModernBERT-base-nq-bce on GitHub to install. At the same time, huggingface.co provides the effect of reranker-ModernBERT-base-nq-bce install, users can directly use reranker-ModernBERT-base-nq-bce installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
reranker-ModernBERT-base-nq-bce install url in huggingface.co: