This is a model to rank documents based on importance. It is trained on an automatically translated version of MS Marco. After some experiments, the best configuration was to train for 2 epochs with learning rate 2e-5 and batch size 32.
Example of use:
from sentence_transformers import CrossEncoder
model = CrossEncoder("IIC/roberta-base-bne-ranker", device="cpu")
question = "¿Cómo se llama el rey?"
contexts = ["Me encanta la canción de el rey", "Cuando el rey fue a Sevilla, perdió su silla", "El rey se llama Juan Carlos y es conocido por sus escándalos"]
similarity_scores = model.predict([[question, context] for context in contexts])
Contributions
Thanks to @avacaondata, @alborotis, @albarji, @Dabs, @GuillemGSubies for adding this model.