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:
🚀 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
text
1️⃣ A new loss function: CachedGISTEmbedLoss
1️⃣ A new loss function: CachedGISTEmbedLoss
new_line
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.
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
text
2️⃣ Automatic Matryoshka model truncation
2️⃣ Automatic Matryoshka model truncation
new_line
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 
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 
inline_code
`truncate_dim`
truncate_dim
text
 option to the Sentence Transformer constructor. This also allows truncation when using 
 option to the Sentence Transformer constructor. This also allows truncation when using 
inline_code
`HuggingFaceEmbeddings`
HuggingFaceEmbeddings
text
 from LlamaIndex or LangChain.
 from LlamaIndex or LangChain.
new_line
new_line
text
3️⃣ Additionally, you can now specify 
3️⃣ Additionally, you can now specify 
inline_code
`truncate_dim`
truncate_dim
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.)
 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
text
4️⃣ CrossEncoder improvements
4️⃣ CrossEncoder improvements
new_line
text
The CrossEncoder now supports 'push_to_hub' to upload trained reranker models to Hugging Face. Additionally, CrossEncoders now support 
The CrossEncoder now supports 'push_to_hub' to upload trained reranker models to Hugging Face. Additionally, CrossEncoders now support 
inline_code
`trust_remote_code`
trust_remote_code
text
 to load models with custom modelling code.
 to load models with custom modelling code.
new_line
new_line
text
5️⃣ Inference on Intel Gaudi2
5️⃣ Inference on Intel Gaudi2
new_line
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!
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
text
Check out the release notes for all of the details: 
Check out the release notes for all of the details: 
link
https://github.com/UKPLab/sentence-transformers/releases/tag/v2.7.0
https://github.com/UKPLab/sentence-transformers/releases/tag/v2.7.0
new_line
new_line
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!
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 lunarflu mrdbourke beomi nickprock alvarobartt icpro MichelleRuwen not-lain Ali-Khaled adityakusupati LeoLee23
https://cdn-avatars.huggingface.co/v1/production/uploads/6527e89a8808d80ccff88b7a/CuGNmF1Et8KMQ0mCd1NEJ.jpeg
Lain
not-lain
user
https://cdn-avatars.huggingface.co/v1/production/uploads/noauth/Vz7ejW9--mwg9qnZHibPb.jpeg
Ali Khaled
Ali-Khaled
user