Skip to content

chore(deps)(deps): bump sentence-transformers from 5.3.0 to 5.4.1#51

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/uv/sentence-transformers-5.4.1
Closed

chore(deps)(deps): bump sentence-transformers from 5.3.0 to 5.4.1#51
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/uv/sentence-transformers-5.4.1

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Apr 20, 2026

Copy link
Copy Markdown
Contributor

Bumps sentence-transformers from 5.3.0 to 5.4.1.

Release notes

Sourced from sentence-transformers's releases.

v5.4.1 - Numpy string arrays

This patch release allows encode() and predict() to accept 1D numpy string arrays as inputs.

Install this version with

# Training + Inference
pip install sentence-transformers[train]==5.4.1
Inference only, use one of:
pip install sentence-transformers==5.4.1
pip install sentence-transformers[onnx-gpu]==5.4.1
pip install sentence-transformers[onnx]==5.4.1
pip install sentence-transformers[openvino]==5.4.1
Multimodal dependencies (optional):
pip install sentence-transformers[image]==5.4.1
pip install sentence-transformers[audio]==5.4.1
pip install sentence-transformers[video]==5.4.1
Or combine as needed:
pip install sentence-transformers[train,onnx,image]==5.4.1

Numpy string/object arrays as batches (#3720)

encode() and predict() now correctly recognize 1D numpy string/object arrays as batches rather than singular inputs. Previously, something like model.encode(df["text"].to_numpy()) was silently treated as a single input and produced incorrect output. 1D numpy arrays with dtype.kind in ("U", "O") are now unpacked like lists, and 2D+ arrays are treated as batches of pairs (for CrossEncoder).

import numpy as np
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("all-MiniLM-L6-v2")
Previously treated as one input; now correctly encoded as 3 separate texts
embeddings = model.encode(np.array(["first", "second", "third"]))
print(embeddings.shape)
(3, 384)

For CrossEncoder, a 1D numpy string array is still treated as a single [query, document] pair to match the existing list behavior, while a 2D array of shape (N, 2) is a batch of N pairs.

Safer activation function loading in Dense (#3714)

The Dense module stores its activation function as a dotted import path in its saved config (e.g. "torch.nn.modules.activation.Tanh"), which was then resolved via import_from_string whenever the module was loaded. Because any importable Python callable could be referenced, a maliciously crafted config.json on the Hub could trigger arbitrary imports at model load time.

The loader now only resolves activation functions whose import path starts with torch.. Anything else is skipped with a warning and replaced by the default activation (Tanh). To load a model with a custom (non-torch) activation function, opt in explicitly with trust_remote_code=True:

from sentence_transformers import SentenceTransformer
</tr></table>

... (truncated)

Commits
  • 6dc2cb5 Release v5.4.1
  • a6a371c Merge branch 'main' into v5.4-release
  • c500af5 [fix] Treat numpy string/object arrays as batches in encode/predict (#3720)
  • 25f0694 Only load activation functions starting with 'torch' in the Dense module (#3714)
  • 9140444 Replace evaluation_strategy with eval_strategy in a few more places (#3713)
  • cec9077 No revision needed anymore for nvidia nemotron (#3712)
  • 5035ccd No revision needed anymore for nvidia nemotron (#3712)
  • abca5aa Increment dev version after v5.4 release (#3711)
  • d36232b [tests] Fix test_trainer_prompts for SE and ST after prompt handling moved ...
  • fe93612 Merge branch 'main' into v5.4-release
  • Additional commits viewable in compare view

@codecov

codecov Bot commented Apr 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (86b4a4f) to head (5396b20).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #51   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           23        23           
  Lines         1258      1258           
=========================================
  Hits          1258      1258           
Flag Coverage Δ
pytest 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Bumps [sentence-transformers](https://github.com/huggingface/sentence-transformers) from 5.3.0 to 5.4.1.
- [Release notes](https://github.com/huggingface/sentence-transformers/releases)
- [Commits](huggingface/sentence-transformers@v5.3.0...v5.4.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot force-pushed the dependabot/uv/sentence-transformers-5.4.1 branch from b2691b4 to 5396b20 Compare May 11, 2026 04:46
@sonarqubecloud

Copy link
Copy Markdown

@dependabot @github

dependabot Bot commented on behalf of github May 18, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #62.

@dependabot dependabot Bot closed this May 18, 2026
@dependabot dependabot Bot deleted the dependabot/uv/sentence-transformers-5.4.1 branch May 18, 2026 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants