</details>
All other Instructor models either 1) will not load as they refer to `InstructorEmbedding` in their `modules.json` or 2) require calling `model.set_pooling_include_prompt(include_prompt=False)` after loading.
* [Instructor Model Documentation](https://sbert.net/docs/pretrained_models.html#instructor-models)
Reduce Dependencies (2476)
Sentence Transformers now no longer uses `sentencepiece` or `nltk` as mandatory dependencies. This should make Sentence Transformers 1) lighter to install, 2) quicker to import and 3) less likely to result in dependency issues.
New Loss Overview documentation (2447, 2496)
The documentation has been upgraded with a Loss Overview: https://sbert.net/docs/training/loss_overview.html
This section contains tables with loss functions and their required data formats. This should help you narrow down which loss functions might suit your use cases:
![image](https://github.com/UKPLab/sentence-transformers/assets/37621491/d9948a9a-5bb9-4a28-bc16-1ea785f80524)
* [Source](https://sbert.net/docs/training/loss_overview.html)
Additionally, each loss function now has extended documentation, including references, requirements, relations to other loss functions, inputs, a code snippet with example usage, and/or links to other documentation/examples using that loss function.
![image](https://github.com/UKPLab/sentence-transformers/assets/37621491/b36f705e-862b-46a8-b68c-37a577022735)
* [Source](https://sbert.net/docs/package_reference/losses.html#angleloss)
All changes
* [`hotfix`] Don't require loading files for Normalize by tomaarsen in https://github.com/UKPLab/sentence-transformers/pull/2460
* Created CoSENTLoss.py by johneckberg in https://github.com/UKPLab/sentence-transformers/pull/2454
* [`fix`] Avoid sets and dicts in `BinaryClassificationEvaluator` when sentences are not hashable by tomaarsen in https://github.com/UKPLab/sentence-transformers/pull/2462
* [`docs`] Refactor & improve the loss documentation by ir2718 in https://github.com/UKPLab/sentence-transformers/pull/2447
* CrossEncoder device by milistu in https://github.com/UKPLab/sentence-transformers/pull/2463
* Update README.md by akshaydevml in https://github.com/UKPLab/sentence-transformers/pull/2464
* Add support for Ascend NPU by statelesshz in https://github.com/UKPLab/sentence-transformers/pull/2466
* Add revision parameter to CrossEncoder. by fkdosilovic in https://github.com/UKPLab/sentence-transformers/pull/2479
* Add NDCG metric to CERerankingEvaluator by milistu in https://github.com/UKPLab/sentence-transformers/pull/2478
* [`deps`] Remove the sentencepiece & nltk dependencies by tomaarsen in https://github.com/UKPLab/sentence-transformers/pull/2476
* AnglE loss by johneckberg in https://github.com/UKPLab/sentence-transformers/pull/2471
* [`ci`] On Ubuntu CI runner, use temporary directories as cache folders for some models by tomaarsen in https://github.com/UKPLab/sentence-transformers/pull/2481
* [`docs`] Slight improvements to docs phrasing by tomaarsen in https://github.com/UKPLab/sentence-transformers/pull/2486
* Ensure dtype consistency in Pooling forward method by EliasKassapis in https://github.com/UKPLab/sentence-transformers/pull/2492
* [`feat`] Add Matryoshka loss + examples + docs by tomaarsen in https://github.com/UKPLab/sentence-transformers/pull/2485
* [`feat`] Add prompt templates by tomaarsen in https://github.com/UKPLab/sentence-transformers/pull/2477
* [`docs`] Move loss overview to "main" documentation by tomaarsen in https://github.com/UKPLab/sentence-transformers/pull/2496
* [`feat`] Allow saving a model to the Hub without providing a user + Upload Matryoshka models after training by tomaarsen in https://github.com/UKPLab/sentence-transformers/pull/2497
* Add F1 score evaluator for CrossEncoder. by fkdosilovic in https://github.com/UKPLab/sentence-transformers/pull/2493
* [`docs`] Address some small mistakes by tomaarsen in https://github.com/UKPLab/sentence-transformers/pull/2498
New Contributors
* johneckberg made their first contribution in https://github.com/UKPLab/sentence-transformers/pull/2454
* ir2718 made their first contribution in https://github.com/UKPLab/sentence-transformers/pull/2447
* akshaydevml made their first contribution in https://github.com/UKPLab/sentence-transformers/pull/2464
* fkdosilovic made their first contribution in https://github.com/UKPLab/sentence-transformers/pull/2479
* EliasKassapis made their first contribution in https://github.com/UKPLab/sentence-transformers/pull/2492
I especially want to thank ir2718, johneckberg & SeanLee97 for their valuable contributions in this release, and fkdosilovic and milistu for their valuable improvements to the CrossEncoder.
**Full Changelog**: https://github.com/UKPLab/sentence-transformers/compare/v2.3.1...v2.4.0