unstale

pypi / sentence-transformers

sentence-transformers

What changed in sentence-transformers 5 to 6, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-28.

9 breaking1 security2 deprecations16 new APIs and options11 performance6 behavior and defaults38 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.9 on npm

sentence-transformers 682 changes

Breaking changes 9

  • Module paths must be relative and cannot contain .. path components, including when trust_remote_code=True.

    6.2.0release notes

  • Normalizes hierarchical token pooling outputs by default.

    6.2.0release notes

  • Output tokens, including protected tokens, are now normalized by default. Set normalize_embeddings=False to opt out; older saved configurations retain prior behavior.

    6.2.0release notes

  • Raises a clear error when ranges come from a single embedding.

    6.2.0release notes

  • Fails fast when a pool worker dies.

    6.2.0release notes

  • Excludes self-matches before taking top_k and follows only duplicate pairs in the transitive closure.

    6.2.0release notes

  • Inferring int8 or uint8 calibration ranges from a single vector now raises ValueError; encode representative calibration embeddings first or provide explicit ranges.

    6.2.0release notes

  • KV caching is disabled by default when supported to reduce unnecessary inference memory use; explicit use_cache overrides in config_kwargs remain honored.

    6.2.0release notes

  • Message content now follows each input's key order, which can change embeddings or scores.

    6.1.0release notes

Deprecations 2

  • Warns when models implicitly load in low precision on CPU.

    6.2.0release notes

  • The apply_softmax parameter is deprecated.

    6.2.0release notes

New APIs and options 16

  • Call after changing dispatch hooks or adding modules following the first inference call.

    6.2.0release notes

  • Merge compatible fine-tuned checkpoints without another training run; the returned model can be used, trained, and saved normally.

    6.2.0release notes

  • HierarchicalTokenPooling can use optional fastcluster linkage for faster clustering.

    6.2.0release notes

  • Adds opt-in fp32 computation for selected linear layers.

    6.2.0release notes

  • Forwards gradient checkpointing options to Transformers.

    6.2.0release notes

  • Select CrossEncoder linear layers to compute in FP32, reducing BF16 score ties while keeping a reduced-precision backbone.

    6.2.0release notes

  • Can be passed through processing_kwargs.

    6.2.0release notes

  • Adds model merging via mergekit for all archetypes.

    6.2.0release notes

  • Merge compatible fine-tuned checkpoints without another training run; the returned model can be used, trained, and saved normally.

    6.2.0release notes

  • Accepts a string main_score_function.

    6.2.0release notes

  • Merge compatible fine-tuned checkpoints without another training run; the returned model can be used, trained, and saved normally.

    6.2.0release notes

  • Supports probability targets and matches inputs to the classifier dtype.

    6.2.0release notes

  • Adds SlideOn and mSlideOn to the pretrained models.

    6.2.0release notes

  • Merge compatible fine-tuned checkpoints without another training run; the returned model can be used, trained, and saved normally.

    6.2.0release notes

  • Schedules the regularizer weights of every SpladeLoss.

    6.2.0release notes

  • Accepts dictionary configurations.

    6.2.0release notes

Performance 11

  • Uses sorted suffix reductions with linear intermediate storage.

    6.2.0release notes

  • Removes invalid anchor-positive pairs before constructing triplets, reducing memory to quadratic for paired labels.

    6.2.0release notes

  • Uses quadratic intermediate memory instead of constructing cubic distance and mask tensors, and corrects a gradient issue when selected negative distances tie.

    6.2.0release notes

  • Avoids redundant DDP synchronization during cached-loss replay.

    6.2.0release notes

  • Uses sorted suffix reductions with linear intermediate storage.

    6.2.0release notes

  • Computes CoSENT ranking loss with linear-memory suffix reductions.

    6.2.0release notes

  • Fixes memory use for long query batches.

    6.2.0release notes

  • Score blocks are budgeted using both query and document token counts, reducing memory use for long query batches.

    6.2.0release notes

  • With huggingface_hub>=1.26.0, loading resolves the requested branch or tag to a commit once and reuses it across component downloads, reducing repeated Hub requests.

    6.2.0release notes

  • CPU cosine semantic_search is faster by normalizing each corpus chunk once.

    6.2.0release notes

  • Handles an empty list corpus and speeds up CPU search by normalizing each corpus chunk once.

    6.2.0release notes

Behavior and default changes 6

  • During DDP training, evaluators automatically share encode and predict work across training processes; rank zero combines predictions and computes metrics.

    6.2.0release notes

  • Accepts fractional pool_factor values for finer control over compression.

    6.2.0release notes

  • huggingface_hub 2.x is supported; the Hub 1.3.0 minimum is retained.

    6.2.0release notes

  • CSR training now supports k_aux=0.

    6.2.0release notes

  • Treats a string positive or negative as one document.

    6.2.0release notes

  • A single input can contain multiple items per modality.

    6.1.0release notes

Fixes and other changes 38

  • Drops communities whose centre was already claimed.

    6.2.0release notes

  • Checkpoint restoration now works for compiled models, including best-checkpoint loading.

    6.2.0release notes

  • Honors the progress-bar option.

    6.2.0release notes

  • Keeps the 4k latents off the dead-latent mask and compares reconstructions with raw input when normalize=True.

    6.2.0release notes

  • Applies per-dataset prompts and losses when a DatasetDict is reused.

    6.2.0release notes

  • Validates Dense activation classes before loading.

    6.2.0release notes

  • Keeps string features whole when output_value=None.

    6.2.0release notes

  • Keeps pairs that cross the top-k cutoff.

    6.2.0release notes

  • Only truncates sentence embeddings and truncates per-column teacher labels.

    6.2.0release notes

  • Fixes mean pooling precision and excludes flattened CLS prompts correctly.

    6.2.0release notes

  • Uses the supplied CrossEncoder for hard-negative filtering when only min_score is set.

    6.2.0release notes

  • Validates model paths before loading.

    6.2.0release notes

  • Validates paired sentence counts.

    6.2.0release notes

  • Worker exceptions reach the caller, terminated workers are detected while polling, and worker tensor outputs are moved to CPU before queueing.

    6.2.0release notes

  • Forwards advertised module kwargs during encoding.

    6.2.0release notes

  • Fixes loading Normalize modules at the model root.

    6.2.0release notes

  • Normalizes a single sparse embedding as one vector and supports non-default dtypes.

    6.2.0release notes

  • Counts rank positions from one and stabilizes position weights for long ranking lists.

    6.2.0release notes

  • Improves FP16/BF16 mean and weighted-mean arithmetic, corrects weighted positions under left padding, and fixes prompt exclusion in flattened CLS fallback selection.

    6.2.0release notes

  • Python 3.14 is supported while Python 3.10 support is retained.

    6.2.0release notes

  • Return zero ranking loss when no label pairs are ordered, and preserve gradients with weighted log-sigmoid.

    6.2.0release notes

  • Keeps modules shared between routes shared after loading.

    6.2.0release notes

  • Keeps fusion order the same from run to run.

    6.2.0release notes

  • Reuses scalar calibration ranges across ragged multi-vector embeddings, accepts BF16 inputs, and corrects FP16 range arithmetic.

    6.2.0release notes

  • Fixes calibration when rescoring scalar-quantized embeddings.

    6.2.0release notes

  • Optimizes loss weights, spans every objective's steps in the learning-rate schedule, and warns that a DataLoader batch_sampler is not used.

    6.2.0release notes

  • Supports repeated evaluation with iterator-backed evaluators.

    6.2.0release notes

  • Uses the corpus model and embeddings during evaluation.

    6.2.0release notes

  • Prevents new sparse search corpora from sharing an index name.

    6.2.0release notes

  • Corrects normalization of single sparse vectors and sparse matrices with non-default dtypes or low-precision values.

    6.2.0release notes

  • Sizes weights by the vocabulary size.

    6.2.0release notes

  • Accepts duplicate expected translation text.

    6.2.0release notes

  • Evaluates the main similarity function.

    6.2.0release notes

  • Pads batches with no known tokens and honors the sequence length limit.

    6.2.0release notes

  • Corrected load_audio_from_video routing in chat templates.

    6.1.0release notes

  • Video-frame URLs without recognizable image extensions need an explicit frame wrapper to remain one video.

    6.1.0release notes

  • PyLate prefixes are now prepended to saved prompt text, so checkpoints trained with both encode the marker they were trained with.

    6.0.1release notes

  • Router.preprocess now forwards task to routed modules, enabling task-dependent preprocessing such as length caps, query expansion, and the chat-template task keyword.

    6.0.1release notes

sentence-transformers 51 changes

Security 1

  • sentence-transformers local model loading bypasses trust_remote_code and executes custom Python

    5.6.0security advisory