Python: Update sentence-transformers requirement from <5.0,>=2.2 to >=2.2,<6.0 in /python#12679
Merged
moonbox3 merged 3 commits intoJul 17, 2025
Conversation
Updates the requirements on [sentence-transformers](https://github.com/UKPLab/sentence-transformers) to permit the latest version. - [Release notes](https://github.com/UKPLab/sentence-transformers/releases) - [Commits](huggingface/sentence-transformers@v2.2.0...v5.0.0) --- updated-dependencies: - dependency-name: sentence-transformers dependency-version: 5.0.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
moonbox3
approved these changes
Jul 10, 2025
…gte-2.2-and-lt-6.0
…gte-2.2-and-lt-6.0
eavanvalkenburg
approved these changes
Jul 15, 2025
jcruzmot-te
pushed a commit
to thousandeyes/aia-semantic-kernel
that referenced
this pull request
Sep 15, 2025
…=2.2,<6.0 in /python (microsoft#12679) Updates the requirements on [sentence-transformers](https://github.com/UKPLab/sentence-transformers) to permit the latest version. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/UKPLab/sentence-transformers/releases">sentence-transformers's releases</a>.</em></p> <blockquote> <h2>v5.0.0 - SparseEncoder support; encode_query & encode_document; multi-processing in encode; Router; and more</h2> <p>This release consists of significant updates including the introduction of Sparse Encoder models, new methods <code>encode_query</code> and <code>encode_document</code>, multi-processing support in <code>encode</code>, the <code>Router</code> module for asymmetric models, custom learning rates for parameter groups, composite loss logging, and various small improvements and bug fixes.</p> <p>Install this version with</p> <pre lang="bash"><code># Training + Inference pip install sentence-transformers[train]==5.0.0 <h1>Inference only, use one of:</h1> <p>pip install sentence-transformers==5.0.0 pip install sentence-transformers[onnx-gpu]==5.0.0 pip install sentence-transformers[onnx]==5.0.0 pip install sentence-transformers[openvino]==5.0.0 </code></pre></p> <blockquote> <p>[!TIP] Our <a href="https://huggingface.co/blog/train-sparse-encoder">Training and Finetuning Sparse Embedding Models with Sentence Transformers v5 blogpost</a> is an excellent place to learn about finetuning sparse embedding models!</p> </blockquote> <blockquote> <p>[!NOTE] This release is designed to be fully backwards compatible, meaning that you should be able to upgrade from older versions to v5.x without any issues. If you are running into issues when upgrading, feel free to open <a href="https://github.com/uKPLab/sentence-transformers/issues/new">an issue</a>. Also see the <a href="https://sbert.net/docs/migration_guide.html">Migration Guide</a> for changes that we would recommend.</p> </blockquote> <h2>Sparse Encoder models</h2> <p>The Sentence Transformers v5.0 release introduces Sparse Embedding models, also known as Sparse Encoders. These models generate high-dimensional embeddings, often with 30,000+ dimensions, where often only <1% of dimensions are non-zero. This is in contrast to the standard dense embedding models, which produce low-dimensional embeddings (e.g., 384, 768, or 1024 dimensions) where all values are non-zero.</p> <p>Usually, each active dimension (i.e. the dimension with a non-zero value) in a sparse embedding corresponds to a specific token in the model's vocabulary, allowing for interpretability. This means that you can e.g. see exactly which words/tokens are important in an embedding, and that you can inspect exactly because of which words/tokens two texts are deemed similar.</p> <p>Let's have a look at <a href="https://huggingface.co/naver/splade-v3">naver/splade-v3</a>, a strong sparse embedding model, as an example:</p> <pre lang="python"><code>from sentence_transformers import SparseEncoder <h1>Download from the 🤗 Hub</h1> <p>model = SparseEncoder("naver/splade-v3")</p> <h1>Run inference</h1> <p>sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium.", ] embeddings = model.encode(sentences) print(embeddings.shape)</p> <h1>(3, 30522)</h1> <h1>Get the similarity scores for the embeddings</h1> <p>similarities = model.similarity(embeddings, embeddings) print(similarities)</p> <h1>tensor([[ 32.4323, 5.8528, 0.0258],</h1> <p></tr></table> </code></pre></p> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/UKPLab/sentence-transformers/commit/8dc0fca767afd74208764fd28f89dd83e8743241"><code>8dc0fca</code></a> Release v5.0.0</li> <li><a href="https://github.com/UKPLab/sentence-transformers/commit/e91af6ac3e160aa0d610ea32aeb295f3ff648e67"><code>e91af6a</code></a> Update links for SPLADE and Inference-Free SPLADE models collections in docum...</li> <li><a href="https://github.com/UKPLab/sentence-transformers/commit/4c00aea59d4b25061ba03761804a4266c3e8fd33"><code>4c00aea</code></a> [<code>fix</code>] Remove hub_kwargs in SparseStaticEmbedding.from_json in favor of more...</li> <li><a href="https://github.com/UKPLab/sentence-transformers/commit/28685bb1d771b8609c5e4d4115a8b862267358ce"><code>28685bb</code></a> Clean up gitignore (<a href="https://redirect.github.com/UKPLab/sentence-transformers/issues/3409">#3409</a>)</li> <li><a href="https://github.com/UKPLab/sentence-transformers/commit/85dd17518f15a8466ec131a4f82e1e93e4ada631"><code>85dd175</code></a> Fix formatting of docstring arguments in SpladeRegularizerWeightSchedulerCall...</li> <li><a href="https://github.com/UKPLab/sentence-transformers/commit/14afc4b6681f0b83bded05fe91a8fd3320d453f9"><code>14afc4b</code></a> Merge PR <a href="https://redirect.github.com/UKPLab/sentence-transformers/issues/3401">#3401</a>: [<code>v5</code>] Add support for Sparse Embedding models</li> <li><a href="https://github.com/UKPLab/sentence-transformers/commit/2d248419eb47c3710d50fa560d41e7fd17459846"><code>2d24841</code></a> Update tip phrasing and fix links</li> <li><a href="https://github.com/UKPLab/sentence-transformers/commit/ed043c56b21d4a6c8f600e9d2a74523e522d6823"><code>ed043c5</code></a> typo</li> <li><a href="https://github.com/UKPLab/sentence-transformers/commit/b2679d12294f9e0e5a2250cbcb400e9b4111f856"><code>b2679d1</code></a> fix broken link</li> <li><a href="https://github.com/UKPLab/sentence-transformers/commit/d30341ec2f3a8fa50eb41f924273e414bb7c0db7"><code>d30341e</code></a> Update tips to prepared for v5.0</li> <li>Additional commits viewable in <a href="https://github.com/UKPLab/sentence-transformers/compare/v2.2.0...v5.0.0">compare view</a></li> </ul> </details> <br /> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Evan Mattson <35585003+moonbox3@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates the requirements on sentence-transformers to permit the latest version.
Release notes
Sourced from sentence-transformers's releases.
... (truncated)
Commits
8dc0fcaRelease v5.0.0e91af6aUpdate links for SPLADE and Inference-Free SPLADE models collections in docum...4c00aea[fix] Remove hub_kwargs in SparseStaticEmbedding.from_json in favor of more...28685bbClean up gitignore (#3409)85dd175Fix formatting of docstring arguments in SpladeRegularizerWeightSchedulerCall...14afc4bMerge PR #3401: [v5] Add support for Sparse Embedding models2d24841Update tip phrasing and fix linksed043c5typob2679d1fix broken linkd30341eUpdate tips to prepared for v5.0Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)