😎 I just published Sentence Transformers v5.1.0, and it's a big one. 2x-3x speedups of SparseEncoder models via ONNX and/or OpenVINO backends, easier distillation data preparation with hard negatives mining, and more:
text
😎 I just published Sentence Transformers v5.1.0, and it's a big one. 2x-3x speedups of SparseEncoder models via ONNX and/or OpenVINO backends, easier distillation data preparation with hard negatives mining, and more:
new_line
new_line
1️⃣ Faster ONNX and OpenVINO backends for SparseEncoder models
text
1️⃣ Faster ONNX and OpenVINO backends for SparseEncoder models
new_line
Usage is as simple as 
text
Usage is as simple as 
backend="onnx"
`backend="onnx"`
inline_code
 or 
text
 or 
backend="openvino"
`backend="openvino"`
inline_code
 when initializing a SparseEncoder to get started, but I also included utility functions for optimization, dynamic quantization, and static quantization, plus benchmarks.
text
 when initializing a SparseEncoder to get started, but I also included utility functions for optimization, dynamic quantization, and static quantization, plus benchmarks.
new_line
new_line
2️⃣ New 
text
2️⃣ New 
n-tuple-scores
`n-tuple-scores`
inline_code
 output format from 
text
 output format from 
mine_hard_negatives
`mine_hard_negatives`
inline_code
new_line
This new output format is immediately compatible with the MarginMSELoss and SparseMarginMSELoss for training SentenceTransformer, CrossEncoder, and SparseEncoder losses.
text
This new output format is immediately compatible with the MarginMSELoss and SparseMarginMSELoss for training SentenceTransformer, CrossEncoder, and SparseEncoder losses.
new_line
new_line
3️⃣ Gathering across devices
text
3️⃣ Gathering across devices
new_line
When doing multi-GPU training using a loss that has in-batch negatives (e.g. MultipleNegativesRankingLoss), you can now use 
text
When doing multi-GPU training using a loss that has in-batch negatives (e.g. MultipleNegativesRankingLoss), you can now use 
gather_across_devices=True
`gather_across_devices=True`
inline_code
 to load in-batch negatives from the other devices too! Essentially a free lunch, pretty big impact potential in my evals.
text
 to load in-batch negatives from the other devices too! Essentially a free lunch, pretty big impact potential in my evals.
new_line
new_line
4️⃣ Trackio support
text
4️⃣ Trackio support
new_line
If you also upgrade 
text
If you also upgrade 
transformers
`transformers`
inline_code
, and you install 
text
, and you install 
trackio
`trackio`
inline_code
 with 
text
 with 
pip install trackio
`pip install trackio`
inline_code
, then your experiments will also automatically be tracked locally with trackio. Just open up localhost and have a look at your losses/evals, no logins, no metric uploading.
text
, then your experiments will also automatically be tracked locally with trackio. Just open up localhost and have a look at your losses/evals, no logins, no metric uploading.
new_line
new_line
5️⃣ MTEB Documentation
text
5️⃣ MTEB Documentation
new_line
We've added some documentation on evaluating SentenceTransformer models properly with MTEB. It's rudimentary as the documentation on the MTEB side is already great, but it should get you started.
text
We've added some documentation on evaluating SentenceTransformer models properly with MTEB. It's rudimentary as the documentation on the MTEB side is already great, but it should get you started.
new_line
new_line
Plus many more smaller features & fixes (crash fixes, compatibility with datasets v4, FIPS compatibility, etc.).
text
Plus many more smaller features & fixes (crash fixes, compatibility with datasets v4, FIPS compatibility, etc.).
new_line
new_line
See the full release notes here: 
text
See the full release notes here: 
https://github.com/UKPLab/sentence-transformers/releases/tag/v5.1.0
https://github.com/UKPLab/sentence-transformers/releases/tag/v5.1.0
link
new_line
new_line
Big thanks to all of the contributors for helping with the release, many of the features from this release were proposed by others. I have a big list of future potential features that I'd love to add, but I'm 
text
Big thanks to all of the contributors for helping with the release, many of the features from this release were proposed by others. I have a big list of future potential features that I'd love to add, but I'm 
😎 I just published Sentence Transformers v5.1.0, and it's a big one. 2x-3x speedups of SparseEncoder models via ONNX and/or OpenVINO backends, easier distillation data preparation with hard negatives mining, and more:

1️⃣ Faster ONNX and OpenVINO backends for SparseEncoder models
Usage is as simple as `backend="onnx"` or `backend="openvino"` when initializing a SparseEncoder to get started, but I also included utility functions for optimization, dynamic quantization, and static quantization, plus benchmarks.

2️⃣ New `n-tuple-scores` output format from `mine_hard_negatives`
This new output format is immediately compatible with the MarginMSELoss and SparseMarginMSELoss for training SentenceTransformer, CrossEncoder, and SparseEncoder losses.

3️⃣ Gathering across devices
When doing multi-GPU training using a loss that has in-batch negatives (e.g. MultipleNegativesRankingLoss), you can now use `gather_across_devices=True` to load in-batch negatives from the other devices too! Essentially a free lunch, pretty big impact potential in my evals.

4️⃣ Trackio support
If you also upgrade `transformers`, and you install `trackio` with `pip install trackio`, then your experiments will also automatically be tracked locally with trackio. Just open up localhost and have a look at your losses/evals, no logins, no metric uploading.

5️⃣ MTEB Documentation
We've added some documentation on evaluating SentenceTransformer models properly with MTEB. It's rudimentary as the documentation on the MTEB side is already great, but it should get you started.

Plus many more smaller features & fixes (crash fixes, compatibility with datasets v4, FIPS compatibility, etc.).

See the full release notes here: https://github.com/UKPLab/sentence-transformers/releases/tag/v5.1.0

Big thanks to all of the contributors for helping with the release, many of the features from this release were proposed by others. I have a big list of future potential features that I'd love to add, but I'm 
❤️
lbourdois djoums Etherll aymen123aa lmiller-phdata hotchpotch John6666 adaamko abdeljalilELmajjodi marquesafonso takarajordan AlexanderKyng splevine MarcGrumpyOlejak
🚀
asigalov61 splevine
🤗
asigalov61 splevine