Text Ranking
sentence-transformers
Safetensors
Spanish
English
modernbert
cross-encoder
reranker
retrieval
spanish
cross-lingual
kervyn
preview
text-embeddings-inference
Instructions to use Kervyn-AI/Kervyn-Rerank-100M-Preview with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use Kervyn-AI/Kervyn-Rerank-100M-Preview with sentence-transformers:
from sentence_transformers import CrossEncoder model = CrossEncoder("Kervyn-AI/Kervyn-Rerank-100M-Preview") 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) - Notebooks
- Google Colab
- Kaggle
File size: 1,453 Bytes
e13b8a7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | {
"rerank_config": {
"max_length": 512,
"query_max_chars": 400,
"group_size": 8,
"queries_per_step": 32,
"micro_queries": 8,
"max_queries": 720000,
"per_source_cap": 40000,
"source_caps": {
"msmarco-en": 50000,
"mmarco-es": 60000,
"synth-en2es-question": 70000,
"synth2-es-keyword": 40000,
"synth2-es-question": 50000,
"synth-es2en-question": 60000,
"synth-es-question": 30000,
"synth-es-keyword": 30000,
"synth-en-question": 20000,
"es-so-title-answer": 40000,
"se-question-answer": 25000,
"gooaq-en": 25000,
"nq-en": 30000,
"squad-en": 25000,
"eli5-en": 20000,
"stackexchange-titles": 15000,
"talks-en-es": 20000,
"talks-es-en": 20000,
"kervyn-sft": 25000,
"sqac-es": 20000,
"codesearchnet": 12000,
"synth-es2code": 8000,
"synth-en2code": 8000,
"nli-en": 8000
},
"val_queries": 3000,
"lr": 4e-05,
"min_lr_ratio": 0.1,
"warmup_steps": 500,
"weight_decay": 0.01,
"grad_clip": 1.0,
"classifier_pooling": "mean",
"eval_interval": 2000,
"log_interval": 50,
"seed": 1337
},
"input": "<|bos|> query <|eos|> pasaje <|eos|>",
"output": "logit de relevancia",
"step": 18000,
"val_loss": 0.16773750543083102,
"val_acc1": 0.9476666666666667,
"val_mrr": 0.9703087302595377
}
|