This patch release replaces mandatory requests dependency with an optional httpx dependency.
Install this version with
# Training + Inference
pip install sentence-transformers[train]==5.2.2
# Inference only, use one of:
pip install sentence-transformers==5.2.2
pip install sentence-transformers[onnx-gpu]==5.2.2
pip install sentence-transformers[onnx]==5.2.2
pip install sentence-transformers[openvino]==5.2.2Transformers v5 Support
Transformers v5.0 and its required huggingface_hub versions have dropped support of requests in favor of httpx. The former was also used in sentence-transformers, but not listed explicitly as a dependency. This patch removes the use of requests in favor of httpx, although it's now optional and not automatically imported. This should also save some import time.
Importing Sentence Transformers should now not crash if requests is not installed.
All Changes
- [
deps] Replace requests dependency with optional httpx dependency by @tomaarsen (#3618)
Full Changelog: v5.2.1...v5.2.2