Training and Finetuning Reranker Models with Sentence Transformers v4

📰 Hugging Face Blog

Train and fine-tune reranker models using Sentence Transformers v4 for improved performance

advanced Published 26 Mar 2025
Action Steps
  1. Choose a suitable dataset for training and fine-tuning
  2. Select a loss function and evaluator for training
  3. Use Sentence Transformers v4 to train and fine-tune the reranker model
  4. Implement hard negatives mining to improve model performance
Who Needs to Know This

NLP engineers and researchers can benefit from this article to improve their reranker models, while data scientists and machine learning engineers can apply these techniques to their own projects

Key Insight

💡 Fine-tuning reranker models with Sentence Transformers v4 can significantly improve their performance

Share This
🚀 Improve your reranker models with Sentence Transformers v4!

Key Takeaways

Train and fine-tune reranker models using Sentence Transformers v4 for improved performance

Full Article

Published Time: 2025-03-26T00:00:00.549Z

# Training and Finetuning Reranker Models with Sentence Transformers v4

[![Image 1: Hugging Face's logo](https://huggingface.co/front/assets/huggingface_logo-noborder.svg)Hugging Face](https://huggingface.co/)

* [Models](https://huggingface.co/models)
* [Datasets](https://huggingface.co/datasets)
* [Spaces](https://huggingface.co/spaces)
* [Buckets new](https://huggingface.co/storage)
* [Docs](https://huggingface.co/docs)
* [Enterprise](https://huggingface.co/enterprise)
* [Pricing](https://huggingface.co/pricing)
*
*
* * *

* [Log In](https://huggingface.co/login)
* [Sign Up](https://huggingface.co/join)

[Back to Articles](https://huggingface.co/blog)

# [](https://huggingface.co/blog/train-reranker#training-and-finetuning-reranker-models-with-sentence-transformers-v4) Training and Finetuning Reranker Models with Sentence Transformers v4

Published March 26, 2025

[Update on GitHub](https://github.com/huggingface/blog/blob/main/train-reranker.md)

[- [x] Upvote 185](https://huggingface.co/login?next=%2Fblog%2Ftrain-reranker)
* [![Image 2](https://cdn-avatars.huggingface.co/v1/production/uploads/1589104979708-5df82bcada6d0311fd3d5402.jpeg)](https://huggingface.co/Chuanming "Chuanming")
* [![Image 3](https://cdn-avatars.huggingface.co/v1/production/uploads/5e0eed1ffcf41d740b699666/jJnkTB9wsP4QBcIRZqZFD.jpeg)](https://huggingface.co/blancsw "blancsw")
* [![Image 4](https://cdn-avatars.huggingface.co/v1/production/uploads/1583857146757-5e67bdd61009063689407479.jpeg)](https://huggingface.co/clem "clem")
* [![Image 5](https://huggingface.co/avatars/5aec4a666b524d0ca052fb82c45a0d25.svg)](https://huggingface.co/kalyan-ks "kalyan-ks")
* [![Image 6](https://cdn-avatars.huggingface.co/v1/production/uploads/5f43448a79c1ba4c353d0d8f/DiSygV3dn7A_OjmGVTrHD.jpeg)](https://huggingface.co/sugatoray "sugatoray")
* [![Image 7](https://cdn-avatars.huggingface.co/v1/production/uploads/5f71480c5e78cc6b0ed31f45/5qomwuE4-2FbN56pzxEsG.jpeg)](https://huggingface.co/hassoudi "hassoudi")
* +179

[![Image 8: Tom Aarsen's avatar](https://cdn-avatars.huggingface.co/v1/production/uploads/6317233cc92fd6fee317e030/cJHSvvimr1kqgQfHOjO5n.png)](https://huggingface.co/tomaarsen)

[Tom Aarsen tomaarsen Follow](https://huggingface.co/tomaarsen)

* [Table of Contents](https://huggingface.co/blog/train-reranker#table-of-contents "Table of Contents")

* [What are Reranker models?](https://huggingface.co/blog/train-reranker#what-are-reranker-models "What are Reranker models?")

* [Why Finetune?](https://huggingface.co/blog/train-reranker#why-finetune "Why Finetune?")

* [Training Components](https://huggingface.co/blog/train-reranker#training-components "Training Components")

* [Dataset](https://huggingface.co/blog/train-reranker#dataset "Dataset")
* [Data on the Hugging Face Hub](https://huggingface.co/blog/train-reranker#data-on-the-hugging-face-hub "Data on the Hugging Face Hub")

* [Local Data (CSV, JSON, Parquet, Arrow, SQL)](https://huggingface.co/blog/train-reranker#local-data-csv-json-parquet-arrow-sql "Local Data (CSV, JSON, Parquet, Arrow, SQL)")

* [Local Data that requires pre-processing](https://huggingface.co/blog/train-reranker#local-data-that-requires-pre-processing "Local Data that requires pre-processing")

* [Dataset Format](https://huggingface.co/blog/train-reranker#dataset-format "Dataset Format")

* [Hard Negatives Mining](https://huggingface.co/blog/train-reranker#hard-negatives-mining "Hard Negatives Mining")

* [Loss Function](https://huggingface.co/blog/train-reranker#loss-function "Loss Function")

* [Training Arguments](https://huggingface.co/blog/train-reranker#training-arguments "Training Arguments")

* [Evaluator](https://huggingface.co/blog/train-reranker#evaluator "Evaluator")
* [CrossEncoderCorrelationEvaluator with STSb](https://huggingface.co/blog/train-reranker#crossencodercorrelationevaluator-with-
Read full article → ← Back to Reads