Skip to content

Conversation

@dependabot
Copy link
Contributor

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

Bumps sentence-transformers from 3.1.1 to 5.1.1.

Release notes

Sourced from sentence-transformers's releases.

v5.1.1 - Explicit incorrect arguments, fixes for multi-GPU, evaluator, and hard negative

This patch makes Sentence Transformers more explicit with incorrect arguments and introduces some fixes for multi-GPU processing, evaluators, and hard negatives mining.

Install this version with

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

Error if unused kwargs is passed & get_model_kwargs (#3500)

Some SentenceTransformer or SparseEncoder models support custom model-specific keyword arguments, such as jinaai/jina-embeddings-v4. As of this release, calling model.encode with keyword arguments that aren't used by the model will result in an error.

>>> from sentence_transformers import SentenceTransformer
>>> model = SentenceTransformer("all-MiniLM-L6-v2")
>>> model.encode("Who is Amelia Earhart?", normalize=True)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "[sic]/torch/utils/_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "[sic]/SentenceTransformer.py", line 983, in encode
    raise ValueError(
ValueError: SentenceTransformer.encode() has been called with additional keyword arguments that this model does not use: ['normalize']. As per SentenceTransformer.get_model_kwargs(), this model does not accept any additional keyword arguments.

Quite useful when you, for example, accidentally forget that the parameter to get normalized embeddings is normalize_embeddings. Prior to this version, this parameter would simply quietly be ignored.

To check which custom extra keyword arguments may be used for your model, you can call the new get_model_kwargs method:

>>> from sentence_transformers import SentenceTransformer, SparseEncoder
>>> SentenceTransformer("all-MiniLM-L6-v2").get_model_kwargs()
[]
>>> SentenceTransformer("jinaai/jina-embeddings-v4", trust_remote_code=True).get_model_kwargs()
['task', 'truncate_dim']
>>> SparseEncoder("opensearch-project/opensearch-neural-sparse-encoding-doc-v3-distill").get_model_kwargs()
['task']

Note: You can always pass the task parameter, it's the only model-specific parameter that will be quietly ignored. This means that you can always use model.encode(..., task="query") and model.encode(..., task="document").

Minor Features

... (truncated)

Commits
  • 22ff509 Release v5.1.1
  • 5ad8a44 Merge branch 'master' into v5.1-release
  • 1def8d3 Fix the number of missing negatives in mine_hard_negatives (#3504)
  • 2e077fb fix: add makedirs to informationretrievalevaluator (#3516)
  • 20c4820 Fix:Import SentenceTransformer class explicitly in losses module (#3521)
  • 7240b33 [feat] add get_model_kwargs method; throw error if unused kwarg is passed (...
  • 560cc33 always pass input_ids, attention_mask, token_type_ids, inputs_embeds ...
  • bd91098 Update rasyosef/splade-mini MSMARCO and BEIR-13 benchmark scores in pretraine...
  • ad8d27d Add Support for Knowledgeable Passage Retriever (KPR) (#3495)
  • 5b18f36 [feat] Use encode_document and encode_query in mine_hard_negatives (#3502)
  • 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/UKPLab/sentence-transformers) from 3.1.1 to 5.1.1.
- [Release notes](https://github.com/UKPLab/sentence-transformers/releases)
- [Commits](huggingface/sentence-transformers@v3.1.1...v5.1.1)

---
updated-dependencies:
- dependency-name: sentence-transformers
  dependency-version: 5.1.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file python:uv Pull requests that update python:uv code labels Oct 22, 2025
@Likhithsai2580
Copy link
Member

@dependabot reopen

@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Oct 22, 2025

Beginning January 27, 2026, Dependabot will no longer support the @dependabot reopen command. Please use GitHub's native pull request controls instead. Please see the changelog announcement for additional details.

@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Oct 23, 2025

Superseded by #15.

@dependabot dependabot bot closed this Oct 23, 2025
@dependabot dependabot bot deleted the dependabot/uv/sentence-transformers-5.1.1 branch October 23, 2025 04:37
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.

2 participants