v3.4.1
📦 sentence-transformers
✨ 1 features🐛 6 fixes🔧 5 symbols
Summary
Version 3.4.1 adds native Model2Vec support to SentenceTransformer and fixes several documentation and network‑request bugs.
Migration Steps
- Replace the previous StaticEmbedding loading pattern with direct SentenceTransformer initialization for Model2Vec models, e.g., `SentenceTransformer("model-id", device="cpu")`.
- No code changes are required for other models; the fix to `local_files_only` now correctly avoids network calls.
✨ New Features
- Full Model2Vec integration: SentenceTransformer can now directly load Model2Vec models from the Hugging Face Hub without needing a StaticEmbedding module.
🐛 Bug Fixes
- Fixed bug where using `local_files_only=True` still triggered a request to Hugging Face for model card metadata (PR #3202).
- Fixed loss name documentation for CachedMultipleNegativesRankingLoss (PR #3191).
- Updated jinja2 dependency from 3.1.4 to 3.1.5 in documentation builds (PR #3192).
- Corrected typo in MegaBatchMarginLoss documentation (PR #3193).
- Fixed type hint of `StaticEmbedding.__init__` (PR #3196).
- Prevented call to `set_base_model` when `local_files_only=True` (PR #3202).
🔧 Affected Symbols
SentenceTransformerStaticEmbeddingCachedMultipleNegativesRankingLossMegaBatchMarginLossset_base_model