From 68afc90c73fbead8981029d96f7d7f426d1003dd Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Thu, 1 Oct 2026 01:09:35 -0700
Subject: [PATCH] chore(deps): bump sentence-transformers from 5.2.3 to 5.6.0
in /libs/partners/huggingface (#40959)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Bumps
[sentence-transformers](https://github.com/huggingface/sentence-transformers)
from 5.2.3 to 5.6.0.
Sourced from sentence-transformers's
releases. This minor version is a correctness- and robustness-focused release.
It fixes a silent scoring bug for causal-LM rerankers, corrects several
hard-negative mining and GIST loss edge cases, restores TSDAE on
The headline fix affects chat-template models that read the final
token position, i.e. causal-LM rerankers (like
Install this version with pip install sentence-transformers==5.6.0
pip install sentence-transformers[onnx-gpu]==5.6.0
pip install sentence-transformers[onnx]==5.6.0
pip install sentence-transformers[openvino]==5.6.0 pip install sentence-transformers[image]==5.6.0
pip install sentence-transformers[audio]==5.6.0
pip install sentence-transformers[video]==5.6.0 pip install sentence-transformers[train,onnx,image]==5.6.0
Release notes
v5.6.0 - Fixes for Causal LM Rerankers, Hard-Negative Mining, and
More
transformers v5, and adds Apple Silicon (MPS) support for
the cached losses.Qwen3-Reranker) and last-token-pooling embedders: when an
over-long input was truncated, the chat template's trailing suffix (e.g.
the assistant prefill the model scores from) was silently dropped,
producing wrong scores with no error. There's also a forward-looking
deprecation: loading local custom code without
trust_remote_code=True now warns, and will require it from
v6.0.# Training + Inference
pip install sentence-transformers[train]==5.6.0
Inference only, use one of:
Multimodal dependencies (optional):
Or combine as needed:
Chat-template models render the full conversation to a flat string
before tokenizing, so when the rendered input is longer than the
tokenizer's model_max_length, the tokenizer truncates it
from the right and drops the template's trailing suffix: the fixed
tokens a template appends after the content, e.g. a prompt,
instruction, [/INST], or a trailing EOS. For models that
read the final token position, this silently corrupted the result:
Qwen/Qwen3-Reranker-0.6B)
score a pair from the last token's yes/no
logits, andWhen the suffix was truncated away, that final position landed mid-document instead of after the prefill, so the score or embedding came from the wrong place.
Transformer.preprocess now detects when truncation drops
the suffix and splices it back onto the tail of each truncated row.
Because the fix lives in the shared base Transformer, it
applies across SentenceTransformer,
CrossEncoder, and SparseEncoder. It's enabled
by default and saved to the model configuration. Pass
processing_kwargs={"chat_template":
{"restore_suffix": False}} to opt back into raw
truncation.
A trio of correctness and scalability fixes for hard-negative mining and the GIST losses:
mine_hard_negatives(relative_margin=...) and the
margin_strategy="relative" branch of
GISTEmbedLoss / CachedGISTEmbedLoss used a
multiplicative threshold (positive * (1 - margin)) that
only behaves correctly when the positive-pair similarity is positive.
When that similarity was negative, the threshold moved the wrong way and
let through false negatives: candidates more similar to the
anchor than the true positive. The threshold is now positive -
|positive| * margin, identical to before for positive scores but
correct for negative ones.gather_across_devices=True and a non-zero
margin, the false-negative suppression mask protected the
wrong columns on ranks beyond the first (it ignored the per-rank offset
into the gathered batch), which set the true positive's logit to
-inf and produced a +inf loss. The mask now
accounts for the cross-rank offset, so multi-GPU GIST training stays
finite.mine_hard_negatives(use_faiss=False) (the default)
materialized the full (queries × corpus) similarity matrix
at once, which could OOM on large corpora. It now batches over the query
axis (controlled by faiss_batch_size, default 16384),
bounding peak memory while producing identical results.transformers v5 (#3781)transformers v5 removed the private
PreTrainedModel._tie_encoder_decoder_weights helper that
DenoisingAutoEncoderLoss (TSDAE) used to tie its separate
encoder and decoder. As a stopgap, v5.5 raised a
RuntimeError for the default
tie_encoder_decoder=True on transformers >=
5.0.0, effectively breaking TSDAE there unless you pinned an
older transformers or disabled tying. TSDAE now ships its
own tying routine that shares storage between encoder and decoder, so it
works on both transformers <5 and >=5 with the
default settings.
trust_remote_code (#3807)... (truncated)
9c73df3
Release v5.6.0222b052
[fix] Don't override device_map placement with the device argument (#3823)a38a6bf
Fix causal LM reranker scoring when max_length truncates chat-template
suffix...1812103
[fix] Make relative margin sign-independent in mining and GIST losses
(#3821)ae1acc3
Warn when loading local custom code without trust_remote_code (#3807)429cf5d
[fix] Support MPS in the cached losses' RandContext (#3812)77fdbff
[fix] fix MPS errors (#3818)bfba988
[fix] Fix positive masking in GIST losses with multi-GPU +
gather_across_devi...29e382b
[docs] Fix doc build problems (part 1) (#3811)d16e6bf
[fix] Avoid materializing the full similarity matrix in
mine_hard_negatives w...