Skip to content

Commit ce48ecc

Browse files
committed
Merge branch 'main' into v5.3-release
2 parents c29b3a6 + cec08f8 commit ce48ecc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

sentence_transformers/losses/CachedMultipleNegativesRankingLoss.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,15 +144,15 @@ def __init__(
144144
- ``"hard_negatives"``: Applies ``hardness_strength * stop_grad(cos_sim)`` only to the logits of
145145
explicit hard negatives, leaving in-batch negatives unpenalized. Only active when explicit
146146
negatives are provided. As used in
147-
`Lan et al. 2025 <https://huggingface.co/papers/2509.20354>`_ (EmbeddingGemma).
147+
`Schechter Vera et al. 2025 <https://huggingface.co/papers/2509.20354>`_ (EmbeddingGemma).
148148
- ``"all_negatives"``: Applies ``hardness_strength * stop_grad(cos_sim)`` to every negative logit,
149149
both in-batch negatives and explicit hard negatives, leaving only the positive unpenalized.
150150
Combines the effect of ``"in_batch_negatives"`` and ``"hard_negatives"``.
151151
152152
hardness_strength: Strength of the hardness weighting. The meaning depends on ``hardness_mode``:
153153
154154
- For ``"in_batch_negatives"``: acts as ``alpha`` in the hardness penalty, `Lan et al. 2025 <https://huggingface.co/papers/2503.04812>`_ uses 9.
155-
- For ``"hard_negatives"``: acts as ``alpha`` in the hardness penalty, `Lan et al. 2025 <https://huggingface.co/papers/2509.20354>`_ uses 5.
155+
- For ``"hard_negatives"``: acts as ``alpha`` in the hardness penalty, `Schechter Vera et al. 2025 <https://huggingface.co/papers/2509.20354>`_ uses 5.
156156
157157
Must be non-negative. Ignored when ``hardness_mode`` is ``None``.
158158

sentence_transformers/losses/MultipleNegativesRankingLoss.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,15 @@ def __init__(
9393
- ``"hard_negatives"``: Applies ``hardness_strength * stop_grad(cos_sim)`` only to the logits of
9494
explicit hard negatives, leaving in-batch negatives unpenalized. Only active when explicit
9595
negatives are provided. As used in
96-
`Lan et al. 2025 <https://huggingface.co/papers/2509.20354>`_ (EmbeddingGemma).
96+
`Schechter Vera et al. 2025 <https://huggingface.co/papers/2509.20354>`_ (EmbeddingGemma).
9797
- ``"all_negatives"``: Applies ``hardness_strength * stop_grad(cos_sim)`` to every negative logit,
9898
both in-batch negatives and explicit hard negatives, leaving only the positive unpenalized.
9999
Combines the effect of ``"in_batch_negatives"`` and ``"hard_negatives"``.
100100
101101
hardness_strength: Strength of the hardness weighting. The meaning depends on ``hardness_mode``:
102102
103103
- For ``"in_batch_negatives"``: acts as ``alpha`` in the hardness penalty, `Lan et al. 2025 <https://huggingface.co/papers/2503.04812>`_ uses 9.
104-
- For ``"hard_negatives"``: acts as ``alpha`` in the hardness penalty, `Lan et al. 2025 <https://huggingface.co/papers/2509.20354>`_ uses 5.
104+
- For ``"hard_negatives"``: acts as ``alpha`` in the hardness penalty, `Schechter Vera et al. 2025 <https://huggingface.co/papers/2509.20354>`_ uses 5.
105105
106106
Must be non-negative. Ignored when ``hardness_mode`` is ``None``.
107107

0 commit comments

Comments
 (0)