The MTEB Leaderboard is available here. To submit to it:
- Run the desired model on MTEB:
Either use the Python API:
import mteb
# load a model from the hub (or for a custom implementation see https://github.com/embeddings-benchmark/mteb/blob/main/docs/reproducible_workflow.md)
model = mteb.get_model("sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2")
tasks = mteb.get_tasks(...) # get specific tasks
# or
from mteb.benchmarks import MTEB_MAIN_EN
tasks = MTEB_MAIN_EN # or use a specific benchmark
evaluation = mteb.MTEB(tasks=tasks)
evaluation.run(model, output_folder="results")
Or using the command line interface:
mteb run -m {model_name} -t {task_names}
These will save the results in a folder called results/{model_name}/{model_revision}
.
- Format the results using the CLI:
mteb create_meta --results_folder results/{model_name}/{model_revision} --output_path model_card.md
If readme of model exists:
mteb create_meta --results_folder results/{model_name}/{model_revision} --output_path model_card.md --from_existing your_existing_readme.md
- Add the frontmatter to model repository:
Copy the content of the model_card.md
file to the top of a README.md
file of your model on the Hub. See here for an example.
- Wait for a refresh the leaderboard:
The leaderboard automatically refreshes daily so once submitted you only need to wait for the automatic refresh. You can find the workflows for the leaderboard refresh here. If you experience issues with the leaderboard please create an issue.
Notes:
-
We remove models with scores that cannot be reproduced, so please ensure that your model is accessible and scores can be reproduced.
-
An alternative way of submitting to the leaderboard is by opening a PR with your results here & checking that they are displayed correctly by locally running the leaderboard
-
If your model uses Sentence Transformers and requires different prompts for encoding the queries and corpus, you can take advantage of the
prompts
parameter.Internally,
mteb
uses the prompt namedquery
for encoding the queries andpassage
as the prompt name for encoding the corpus. This is aligned with the default names used by Sentence Transformers.You can directly add the prompts when saving and uploading your model to the Hub. For an example, refer to this configuration file.
If you are unable to directly add the prompts in the model configuration, you can instantiate the model using the
sentence_transformers_loader
and passprompts
as an argument. For more details, see themteb/models/bge_models.py
file.