Text Ranking
Transformers
ONNX
Safetensors
sentence-transformers
Transformers.js
modernbert
text-classification
reranker
cross-encoder
mmbert
text-embeddings-inference
Instructions to use Horizon-Labs/multilingual-reranker-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Horizon-Labs/multilingual-reranker-small with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Horizon-Labs/multilingual-reranker-small") model = AutoModelForSequenceClassification.from_pretrained("Horizon-Labs/multilingual-reranker-small", device_map="auto") - sentence-transformers
How to use Horizon-Labs/multilingual-reranker-small with sentence-transformers:
from sentence_transformers import CrossEncoder model = CrossEncoder("Horizon-Labs/multilingual-reranker-small") query = "Which planet is known as the Red Planet?" passages = [ "Venus is often called Earth's twin because of its similar size and proximity.", "Mars, known for its reddish appearance, is often referred to as the Red Planet.", "Jupiter, the largest planet in our solar system, has a prominent red spot.", "Saturn, famous for its rings, is sometimes mistaken for the Red Planet." ] scores = model.predict([(query, passage) for passage in passages]) print(scores) - Transformers.js
How to use Horizon-Labs/multilingual-reranker-small with Transformers.js:
// npm i @huggingface/transformers import { AutoTokenizer, AutoModelForSequenceClassification } from '@huggingface/transformers'; const tokenizer = await AutoTokenizer.from_pretrained('Horizon-Labs/multilingual-reranker-small'); const model = await AutoModelForSequenceClassification.from_pretrained('Horizon-Labs/multilingual-reranker-small'); const query = 'Which planet is known as the Red Planet?'; const documents = [ 'Mars, known for its reddish appearance, is often referred to as the Red Planet.', 'Venus is often called the twin of Earth because of its similar size and proximity.', ]; const inputs = tokenizer(new Array(documents.length).fill(query), { text_pair: documents, padding: true, truncation: true }); const { logits } = await model(inputs); console.log(logits.sigmoid().tolist()); // one relevance score per document - Notebooks
- Google Colab
- Kaggle
Commit History
15 days ago
-
Card: LangChain / LlamaIndex / Haystack usage (verified)
Verified signature23139fe
20 days ago
-
Add SHA256SUMS for the model files
Verified signature9d67898
23 days ago
-
Add LICENSE (Apache-2.0) and NOTICE (base model attribution)
Verified signatureab6e3ce
-
Multilingual reranker small v1.2: + 110k real WebFAQ questions
Verified signatured35a278
-
Multilingual reranker small v1.1: + 40k real MIRACL training queries
Verified signaturec2ec8fb
-
Card: bge-m3 embedding reference, leaderboard link
Verified signature4fd96cc -
Card: link the training data
Verified signatureadb5a29
-
Card: link the base model
Verified signature9073db4 -
Multilingual reranker small v1.0
Verified signature45c8189 -
initial commit
Verified signature644de81