github huggingface/sentence-transformers v6.0.1
v6.0.1 - Restore the PyLate prefix on prompted checkpoints, 80 documented multi-vector models

6 hours ago

This patch release fixes a multi-vector loading bug: PyLate checkpoints that carry both a [Q]/[D] prefix and a text prompt lost the prefix, so they were encoded without a marker they were trained with. It also grows the documented multi-vector model tables from 51 checkpoints to 80.

Install this version with

# Training + Inference
pip install sentence-transformers[train]==6.0.1

# Inference only, use one of:
pip install sentence-transformers==6.0.1
pip install sentence-transformers[onnx-gpu]==6.0.1
pip install sentence-transformers[onnx]==6.0.1
pip install sentence-transformers[openvino]==6.0.1

# Multimodal dependencies (optional):
pip install sentence-transformers[image]==6.0.1
pip install sentence-transformers[audio]==6.0.1
pip install sentence-transformers[video]==6.0.1

# Or combine as needed:
pip install sentence-transformers[train,onnx,image]==6.0.1

Compose the PyLate prefix with the saved prompt (#3968)

PyLate supports a prefix as well as prompt text, and Sentence Transformers assumed that these were mutually exclusive. However, the following three checkpoints carry both a prefix and a prompt, and were trained with the prefix prepended to the prompt text:

PyLate trained these checkpoints on [CLS] [Q] search_query: ... and [CLS] [D] search_document: ..., but Sentence Transformers dropped the prefix and encoded them as [CLS] search_query: ... and [CLS] search_document: .... After the fix, the performance of the ColBERT-Zero model improved from 0.6569 NDCG@10 to 0.6824 on the NanoBEIR benchmark. To my knowledge, only these 3 checkpoints used both a prefix and a prompt, so this is the only case where the bug would have affected you.

Forward task to routed modules in Router.preprocess (#3967)

Router.forward has always passed task down to the routed module, but Router.preprocess did not, so anything a module does with the task at preprocessing time did nothing behind a Router: query_length and document_length caps, query_expansion, and the chat-template task keyword. No released checkpoint combines a Router with those settings, so this is a latent bug rather than one you are likely to have hit. It would have affected anyone building such a model themselves, with no error to indicate it.

Documentation

  • The multi-vector pretrained models tables grew from 29 text and 22 visual document retrieval checkpoints to 38 and 42 (#3963, #3969), with revision and trust_remote_code notes refreshed as upstream pull requests merged (#3972).
  • Documented which Hub tag to filter on for each model type (#3964), and linked the Multi-Vector Encoder blogposts from the docs (#3966).
  • Added MultiVectorEncoder to the Agent Skill README and refreshed the SauerkrautLM scores (#3955).
  • Corrected the minimum versions in the README (#3952). It still recommended PyTorch 1.11.0+ and transformers v4.41.0+, where v6.0 requires PyTorch 2.2+ and transformers v5.0+. This is the text rendered as the PyPI project description.

All Changes

  • docs: Add MultiVectorEncoder to the skills README, refresh the SauerkrautLM scores by @tomaarsen in #3955
  • Fix the README dependency versions by @tomaarsen in #3952
  • [docs] Add more MultiVectorEncoder models to the pretrained models tables by @tomaarsen in #3963
  • [docs] Clarify which Hub tags to filter on for each model type by @tomaarsen in #3964
  • [docs] Link the Multi-Vector Encoder blogposts by @tomaarsen in #3966
  • [fix] Forward task to routed modules in Router.preprocess by @tomaarsen in #3967
  • [fix] Compose the PyLate prefix with the saved prompt by @tomaarsen in #3968
  • [docs] Refresh the MultiVectorEncoder pretrained models tables by @tomaarsen in #3969
  • Add/update revisions for pretrained MVE models by @tomaarsen in #3972

Full Changelog: v6.0.0...v6.0.1

Don't miss a new sentence-transformers release

NewReleases is sending notifications on new releases.