Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Dec 22, 2025

Bumps sentence-transformers from 5.1.2 to 5.2.0.

Release notes

Sourced from sentence-transformers's releases.

v5.2.0 - CrossEncoder multi-processing, multilingual NanoBEIR evaluators, similarity score in mine_hard_negatives, Transformers v5 support

This minor release introduces multi-processing for CrossEncoder (rerankers), multilingual NanoBEIR evaluators, similarity score outputs in mine_hard_negatives, Transformers v5 support, Python 3.9 deprecations, and more.

Install this version with

# Training + Inference
pip install sentence-transformers[train]==5.2.0
Inference only, use one of:
pip install sentence-transformers==5.2.0
pip install sentence-transformers[onnx-gpu]==5.2.0
pip install sentence-transformers[onnx]==5.2.0
pip install sentence-transformers[openvino]==5.2.0

CrossEncoder Multi-processing

The CrossEncoder class now supports multiprocessing for faster inference on CPU and multi-GPU setups. This brings CrossEncoder functionality in line with the existing multiprocessing capabilities of SentenceTransformer models, allowing you to use multiple CPU cores or GPUs to speed up both the predict and rank methods when processing large batches of sentence pairs.

The implementation introduces these new methods, mirroring the SentenceTransformer approach:

  • start_multi_process_pool() - Initialize a pool of worker processes
  • stop_multi_process_pool() - Clean up the worker pool

Usage is straightforward with the new pool parameter:

from sentence_transformers.cross_encoder import CrossEncoder
def main():
model = CrossEncoder('cross-encoder/ms-marco-MiniLM-L6-v2')
# Start a pool of workers
pool = model.start_multi_process_pool()
Use the pool for faster inference
scores = model.predict(sentence_pairs, pool=pool)
rankings = model.rank(query, documents, pool=pool)
Clean up when done
model.stop_multi_process_pool(pool)

if name == "main":
main()

Or simply pass a list of devices to device to have predict and rank automatically create a pool behind the scenes.

from sentence_transformers.cross_encoder import CrossEncoder
</tr></table>

... (truncated)

Commits
  • d4d70de Release v5.2.0
  • b16248c docs: add release notes summary for v5.2 on main page (#3592)
  • 2571f24 docs: update NanoBEIR collection links and descriptions for evaluators (#3591)
  • 32cb5de Mine hard negatives: optionally output similarity scores (#3506)
  • 9f9ad08 Extend NanoBEIR evaluators to support custom NanoBEIR datasets (#3583)
  • 21dfa69 feat/deps: make Pillow an optional dependency (#3589)
  • 67ff0fe Skip test_train_stsb tests; triggers rate limit too often (#3590)
  • 4cb5cdc [deps] Use optimum-onnx now that both optimum-onnx and optimum-intel can us...
  • 3f80d1c [feat] add multiprocessing support for Cross Encoder (#3580)
  • f9724ff [feat] Allow transformers v5.0, add CI for transformers <v5 and >=v5 (#3586)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [sentence-transformers](https://github.com/huggingface/sentence-transformers) from 5.1.2 to 5.2.0.
- [Release notes](https://github.com/huggingface/sentence-transformers/releases)
- [Commits](huggingface/sentence-transformers@v5.1.2...v5.2.0)

---
updated-dependencies:
- dependency-name: sentence-transformers
  dependency-version: 5.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file python:uv Pull requests that update python:uv code labels Dec 22, 2025
Copy link
Contributor

@sscargal sscargal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sscargal sscargal requested a review from a team December 22, 2025 18:37
@sscargal sscargal merged commit 405e5e5 into main Dec 29, 2025
43 checks passed
@sscargal sscargal deleted the dependabot/uv/sentence-transformers-5.2.0 branch December 29, 2025 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python:uv Pull requests that update python:uv code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants