Skip to content

fix(retrieval): support Sentence Transformers v6 metadata - #3600

Open
oliverholworthy wants to merge 3 commits into
mainfrom
oliverholworthy/fix/sentence-transformers-v6
Open

fix(retrieval): support Sentence Transformers v6 metadata#3600
oliverholworthy wants to merge 3 commits into
mainfrom
oliverholworthy/fix/sentence-transformers-v6

Conversation

@oliverholworthy

Copy link
Copy Markdown
Contributor

Summary

  • accept the Sentence Transformers v6 Normalize module path when it represents final sentence-embedding normalization
  • reject v6 Normalize configurations that target token embeddings or redirect output, which the NeMo single-vector wrapper cannot represent
  • keep emitting the v5.4-era module path so exported checkpoints remain loadable by Sentence Transformers 5.4 through 6.0
  • update the lockfile to Sentence Transformers 6.0.0 so the default test environment exercises the new release

Follow-up to #3546.

Compatibility rationale

Sentence Transformers v6 moved Normalize to sentence_transformers.base.modules. The v6 release explicitly keeps existing models loadable, while checkpoints saved with the new path do not load on older releases. Keeping the older path for exports and accepting both paths on import therefore provides the widest compatibility.

Release notes: https://github.com/huggingface/sentence-transformers/releases/tag/v6.0.0
Migration guide: https://www.sbert.net/docs/migration_guide.html

Testing

  • ruff format --check and ruff check on changed Python files
  • 39 focused metadata and locked-v6 round-trip tests
  • all 8 pooling and normalization round-trip variants on sentence-transformers 5.4.0
  • all 8 pooling and normalization round-trip variants on sentence-transformers 5.6.0
  • all 8 pooling and normalization round-trip variants on sentence-transformers 6.0.0

Signed-off-by: Oliver Holworthy <1216955+oliverholworthy@users.noreply.github.com>
@copy-pr-bot

copy-pr-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@akoumpa

akoumpa commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

/ok to test a975dae

Signed-off-by: Oliver Holworthy <1216955+oliverholworthy@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants