Skip to content

chore(deps): update sentence-transformers requirement from <4,>=2.2.2 to >=2.2.2,<6#28

Merged
Muizzkolapo merged 2 commits into
mainfrom
dependabot/pip/sentence-transformers-gte-2.2.2-and-lt-6
Mar 29, 2026
Merged

chore(deps): update sentence-transformers requirement from <4,>=2.2.2 to >=2.2.2,<6#28
Muizzkolapo merged 2 commits into
mainfrom
dependabot/pip/sentence-transformers-gte-2.2.2-and-lt-6

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Mar 27, 2026

Copy link
Copy Markdown
Contributor

Updates the requirements on sentence-transformers to permit the latest version.

Release notes

Sourced from sentence-transformers's releases.

v5.3.0 - Improved Contrastive Learning, New Losses, and Transformers v5 Compatibility

This minor version brings several improvements to contrastive learning: MultipleNegativesRankingLoss now supports alternative InfoNCE formulations (symmetric, GTE-style) and optional hardness weighting for harder negatives. Two new losses are introduced, GlobalOrthogonalRegularizationLoss for embedding space regularization and CachedSpladeLoss for memory-efficient SPLADE training. The release also adds a faster hashed batch sampler, fixes GroupByLabelBatchSampler for triplet losses, and ensures full compatibility with the latest Transformers v5 versions.

Install this version with

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

Updated MultipleNegativesRankingLoss (a.k.a. InfoNCE)

MultipleNegativesRankingLoss received two major upgrades: support for alternative InfoNCE formulations from the literature, and optional hardness weighting to up-weight harder negatives.

Support other InfoNCE variants (#3607)

MultipleNegativesRankingLoss now supports several well-known contrastive loss variants from the literature through new directions and partition_mode parameters. Previously, this loss only supported the standard forward direction (query → doc). You can now configure which similarity interactions are included in the loss:

  • "query_to_doc" (default): For each query, its matched document should score higher than all other documents.
  • "doc_to_query": The symmetric reverse — for each document, its matched query should score higher than all other queries.
  • "query_to_query": For each query, all other queries should score lower than its matched document.
  • "doc_to_doc": For each document, all other documents should score lower than its matched query.

The partition_mode controls how scores are normalized: "joint" computes a single softmax over all directions, while "per_direction" computes a separate softmax per direction and averages the losses.

These combine to reproduce several loss formulations from the literature:

Standard InfoNCE (default, unchanged behavior):

loss = MultipleNegativesRankingLoss(model)
# equivalent to directions=("query_to_doc",), partition_mode="joint"

Symmetric InfoNCE (Günther et al. 2024) — adds the reverse direction so both queries and documents are trained to find their match:

loss = MultipleNegativesRankingLoss(
    model,
    directions=("query_to_doc", "doc_to_query"),
    partition_mode="per_direction",
)

GTE improved contrastive loss (Li et al. 2023) — adds same-type negatives (query <-> query, doc <-> doc) for a stronger training signal, especially useful with pairs-only data:

loss = MultipleNegativesRankingLoss(
</tr></table> 

... (truncated)

Commits
  • ce48ecc Merge branch 'main' into v5.3-release
  • cec08f8 Fix citation for EmbeddingGemma paper (#3687)
  • c29b3a6 Release v5.3.0
  • 55c13de Prep docs main page for v5.3.0 (#3686)
  • 72e75f7 [tests] Add slow reproduction tests for most common models (#3681)
  • 237e441 [fix] Fix model card generation with set_transform with new column names (#...
  • 7f180b4 [feat] Add hardness-weighted contrastive learning to losses (#3667)
  • 5890086 Disallow query_to_query/doc_to_doc with partition_mode="per_direction" due to...
  • 6518c36 CE trainer: Removed IterableDataset from train and eval dataset type hints (#...
  • 1e0e84c Add tips for adjusting batch size to improve processing speed (#3672)
  • Additional commits viewable in compare view

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python Pull requests that update python code labels Mar 27, 2026
@dependabot
dependabot Bot requested a review from Muizzkolapo as a code owner March 27, 2026 19:36
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python Pull requests that update python code labels Mar 27, 2026
@dependabot
dependabot Bot force-pushed the dependabot/pip/sentence-transformers-gte-2.2.2-and-lt-6 branch 5 times, most recently from 6c282a0 to cc76751 Compare March 28, 2026 15:50
Updates the requirements on [sentence-transformers](https://github.com/huggingface/sentence-transformers) to permit the latest version.
- [Release notes](https://github.com/huggingface/sentence-transformers/releases)
- [Commits](huggingface/sentence-transformers@v2.2.2...v5.3.0)

---
updated-dependencies:
- dependency-name: sentence-transformers
  dependency-version: 5.3.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/pip/sentence-transformers-gte-2.2.2-and-lt-6 branch from cc76751 to 8f8d1f4 Compare March 29, 2026 01:02
@Muizzkolapo
Muizzkolapo merged commit 5a6fa00 into main Mar 29, 2026
4 checks passed
@dependabot
dependabot Bot deleted the dependabot/pip/sentence-transformers-gte-2.2.2-and-lt-6 branch March 29, 2026 01:29
Muizzkolapo added a commit that referenced this pull request Apr 12, 2026
…tracts, cross-workflow, HITL

Restructured SKILL.md to teach the data flow model first (Terraform analogy,
pipeline chain visualization) before diving into syntax. Added guard field
flattening clarification.

Reframed 28 pitfalls as status-based contracts — each item now states what the
feature does, its current status (Working/Known limitation/Partially implemented),
and workarounds. Updated guard operator pitfall (#28) to reflect it's now fixed.

Added two new reference files:
- cross-workflow-patterns.md: manifest linking, running, known limitations
- hitl-patterns.md: 4 patterns (basic, guard pre-filter, downstream, auto-review)

Added concrete data shapes to data-flow-patterns.md for record, file, version
merge, and seed data modes.

Added guard field visibility section to context-scope-guide.md explaining how
guard conditions see flattened field names from observed namespaces.

All suggestions verified against current codebase — HITL lineage truncation
(fixed in PR #231), guard operators (fixed), cross-workflow static checker
(partially fixed, Clone 1 working on full fix).
Muizzkolapo added a commit that referenced this pull request Apr 12, 2026
…ck (#243)

* docs: restructure agent-actions-workflow skill — data flow model, contracts, cross-workflow, HITL

Restructured SKILL.md to teach the data flow model first (Terraform analogy,
pipeline chain visualization) before diving into syntax. Added guard field
flattening clarification.

Reframed 28 pitfalls as status-based contracts — each item now states what the
feature does, its current status (Working/Known limitation/Partially implemented),
and workarounds. Updated guard operator pitfall (#28) to reflect it's now fixed.

Added two new reference files:
- cross-workflow-patterns.md: manifest linking, running, known limitations
- hitl-patterns.md: 4 patterns (basic, guard pre-filter, downstream, auto-review)

Added concrete data shapes to data-flow-patterns.md for record, file, version
merge, and seed data modes.

Added guard field visibility section to context-scope-guide.md explaining how
guard conditions see flattened field names from observed namespaces.

All suggestions verified against current codebase — HITL lineage truncation
(fixed in PR #231), guard operators (fixed), cross-workflow static checker
(partially fixed, Clone 1 working on full fix).

* docs: deduplicate skill references — trim repeated guard/seed/impl examples

- Guard field flattening: keep in SKILL.md (eager), cross-reference from
  common-pitfalls and context-scope-guide instead of restating with same example
- Remove duplicate seed_data/seed warning within context-scope-guide.md
- Replace impl-vs-action-name WRONG/CORRECT block in cross-workflow-patterns.md
  with cross-reference to common-pitfalls #20
- Add missing NOT CONTAINS/NOT LIKE/NOT BETWEEN to guard operator list
- Fix HITL doc: granularity: file is the default, not a requirement
- Remove redundant "forgetting FILE granularity" WRONG/CORRECT block from
  hitl-patterns.md (already stated inline)

* docs: rename common-pitfalls.md to framework-contracts.md

Content was reframed as status-based contracts — filename should match.
Updated all references in SKILL.md, cross-workflow-patterns.md, and _MANIFEST.md.
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 Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant