🚀 Sentence Transformers v2.7.0 is out! Featuring a new loss function, easier Matryoshka model inference & evaluation, CrossEncoder improvements & Intel Gaudi2 Accelerator support. Details:
text
🚀 Sentence Transformers v2.7.0 is out! Featuring a new loss function, easier Matryoshka model inference & evaluation, CrossEncoder improvements & Intel Gaudi2 Accelerator support. Details:
new_line
new_line
1️⃣ A new loss function: CachedGISTEmbedLoss
text
1️⃣ A new loss function: CachedGISTEmbedLoss
new_line
This loss function is a combination of CachedMultipleNegativesRankingLoss and the GISTEmbedLoss, both of which are already excellent. The caching mechanism allows for much higher batch sizes with constant memory usage, which boosts training performance. The GIST part introduces a guide model to guide the in-batch negative sample selection. This prevents false negatives, resulting in a stronger training signal.
text
This loss function is a combination of CachedMultipleNegativesRankingLoss and the GISTEmbedLoss, both of which are already excellent. The caching mechanism allows for much higher batch sizes with constant memory usage, which boosts training performance. The GIST part introduces a guide model to guide the in-batch negative sample selection. This prevents false negatives, resulting in a stronger training signal.
new_line
new_line
2️⃣ Automatic Matryoshka model truncation
text
2️⃣ Automatic Matryoshka model truncation
new_line
Matryoshka models produce embeddings that are still useful after truncation. However, this truncation always had to be done manually, until now! We've added a 
text
Matryoshka models produce embeddings that are still useful after truncation. However, this truncation always had to be done manually, until now! We've added a 
truncate_dim
`truncate_dim`
inline_code
 option to the Sentence Transformer constructor. This also allows truncation when using 
text
 option to the Sentence Transformer constructor. This also allows truncation when using 
HuggingFaceEmbeddings
`HuggingFaceEmbeddings`
inline_code
 from LlamaIndex or LangChain.
text
 from LlamaIndex or LangChain.
new_line
new_line
3️⃣ Additionally, you can now specify 
text
3️⃣ Additionally, you can now specify 
truncate_dim
`truncate_dim`
inline_code
 in evaluators to get the performance after truncation. (Hint: it's surprisingly good, even for models not trained with MatryoshkaLoss, and it can speed up e.g. clustering, retrieval, etc.)
text
 in evaluators to get the performance after truncation. (Hint: it's surprisingly good, even for models not trained with MatryoshkaLoss, and it can speed up e.g. clustering, retrieval, etc.)
new_line
new_line
4️⃣ CrossEncoder improvements
text
4️⃣ CrossEncoder improvements
new_line
The CrossEncoder now supports 'push_to_hub' to upload trained reranker models to Hugging Face. Additionally, CrossEncoders now support 
text
The CrossEncoder now supports 'push_to_hub' to upload trained reranker models to Hugging Face. Additionally, CrossEncoders now support 
trust_remote_code
`trust_remote_code`
inline_code
 to load models with custom modelling code.
text
 to load models with custom modelling code.
new_line
new_line
5️⃣ Inference on Intel Gaudi2
text
5️⃣ Inference on Intel Gaudi2
new_line
If you have an Intel Gaudi2 Accelerator, Sentence Transformers now uses it automatically for even faster inference. No changes are necessary to your code, the device is automatically detected!
text
If you have an Intel Gaudi2 Accelerator, Sentence Transformers now uses it automatically for even faster inference. No changes are necessary to your code, the device is automatically detected!
new_line
new_line
Check out the release notes for all of the details: 
text
Check out the release notes for all of the details: 
https://github.com/UKPLab/sentence-transformers/releases/tag/v2.7.0
https://github.com/UKPLab/sentence-transformers/releases/tag/v2.7.0
link
new_line
new_line
I'm very excited for the upcoming releases: I'm making great progress with a notable v3 refactor that should heavily improve the training process for embedding models!
text
I'm very excited for the upcoming releases: I'm making great progress with a notable v3 refactor that should heavily improve the training process for embedding models!
🚀 Sentence Transformers v2.7.0 is out! Featuring a new loss function, easier Matryoshka model inference & evaluation, CrossEncoder improvements & Intel Gaudi2 Accelerator support. Details:

1️⃣ A new loss function: CachedGISTEmbedLoss
This loss function is a combination of CachedMultipleNegativesRankingLoss and the GISTEmbedLoss, both of which are already excellent. The caching mechanism allows for much higher batch sizes with constant memory usage, which boosts training performance. The GIST part introduces a guide model to guide the in-batch negative sample selection. This prevents false negatives, resulting in a stronger training signal.

2️⃣ Automatic Matryoshka model truncation
Matryoshka models produce embeddings that are still useful after truncation. However, this truncation always had to be done manually, until now! We've added a `truncate_dim` option to the Sentence Transformer constructor. This also allows truncation when using `HuggingFaceEmbeddings` from LlamaIndex or LangChain.

3️⃣ Additionally, you can now specify `truncate_dim` in evaluators to get the performance after truncation. (Hint: it's surprisingly good, even for models not trained with MatryoshkaLoss, and it can speed up e.g. clustering, retrieval, etc.)

4️⃣ CrossEncoder improvements
The CrossEncoder now supports 'push_to_hub' to upload trained reranker models to Hugging Face. Additionally, CrossEncoders now support `trust_remote_code` to load models with custom modelling code.

5️⃣ Inference on Intel Gaudi2
If you have an Intel Gaudi2 Accelerator, Sentence Transformers now uses it automatically for even faster inference. No changes are necessary to your code, the device is automatically detected!

Check out the release notes for all of the details: https://github.com/UKPLab/sentence-transformers/releases/tag/v2.7.0

I'm very excited for the upcoming releases: I'm making great progress with a notable v3 refactor that should heavily improve the training process for embedding models!
🔥
ajibawa-2023 mdouglas BrigitteTousi adamm-hf mrdbourke beomi nickprock alvarobartt icpro MichelleRuwen not-lain Ali-Khaled adityakusupati LeoLee23
6527e89a8808d80ccff88b7a
https://cdn-avatars.huggingface.co/v1/production/uploads/6527e89a8808d80ccff88b7a/CuGNmF1Et8KMQ0mCd1NEJ.jpeg
Not Lain
not-lain
user
660f051c77a1e2509aa23b19
https://cdn-avatars.huggingface.co/v1/production/uploads/noauth/Vz7ejW9--mwg9qnZHibPb.jpeg
Ali Khaled
Ali-Khaled
user