Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump sentence-transformers from 2.2.2 to 3.2.1 #1019

Closed
wants to merge 1 commit into from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Dec 9, 2024

Bumps sentence-transformers from 2.2.2 to 3.2.1.

Release notes

Sourced from sentence-transformers's releases.

v3.2.1 - Patch CLIP loading, small ONNX fix, compatibility with other libraries

This patch release fixes some small bugs, such as related to loading CLIP models, automatic model card generation issues, and ensuring compatibility with third party libraries.

Install this version with

# Training + Inference
pip install sentence-transformers[train]==3.2.1
Inference only, use one of:
pip install sentence-transformers==3.2.1
pip install sentence-transformers[onnx-gpu]==3.2.1
pip install sentence-transformers[onnx]==3.2.1
pip install sentence-transformers[openvino]==3.2.1

Fixing Loading non-Transformer models

In v3.2.0, a non-Transformer based model (e.g. CLIP) would not load correctly if the model was saved in the root of the model repository/directory. This has been resolved in #3007.

Throw error if StaticEmbedding-based model is finetuned with incompatible losses

The following losses are not compatible with StaticEmbedding-based models:

  • CachedGISTEmbedLoss
  • CachedMultipleNegativesRankingLoss
  • CachedMultipleNegativesSymmetricRankingLoss
  • DenoisingAutoEncoderLoss
  • GISTEmbedLoss

An error is now thrown when one of these are used with a StaticEmbedding-based model. I recommend using MultipleNegativesRankingLoss to finetune these models, e.g. as in https://huggingface.co/tomaarsen/static-bert-uncased-gooaq. Note: to get good performance, you must use much higher learning rates than otherwise. In my experiments, 2e-1 worked well.

Patch ONNX model when the model uses output_hidden_states

For example, this script used to fail, but passes now:

from sentence_transformers import SentenceTransformer
model = SentenceTransformer(
"distiluse-base-multilingual-cased",
backend="onnx",
model_kwargs={"provider": "CPUExecutionProvider"},
)
sentences = ["This is an example sentence", "Each sentence is converted"]
embeddings = model.encode(sentences)
print(embeddings.shape)

All changes

... (truncated)

Commits
  • dd76c03 Merge branch 'master' into v3.2-release; version to 3.2.1
  • f286d9f [fix] Prevent IndexError if output_hidden_states & ONNX (#3008)
  • a028b58 [warn] Throw a warning if compute_metrics is set, as it's not used (#3002)
  • dc79f13 Fix cache_dir issue with loading CLIPModel (#3007)
  • 29535eb [fix] Added model2vec import compatible with current and newer version (#2992)
  • 0e59af6 [model cards] Prevent crash on generating widgets if dataset column is empt...
  • 5e1a7a4 [enh] Add support for large_string in model card create (#2999)
  • 2fa3ed4 Fix copy-paste error in a comment
  • 1802076 [fix] Fix semantic_search_usearch with 'binary' (#2989)
  • 72d5649 [enh] Throw error if StaticEmbedding-based model is trained with incompatib...
  • Additional commits viewable in compare view

Most Recent Ignore Conditions Applied to This Pull Request
Dependency Name Ignore Conditions
sentence-transformers [>= 3.3.dev0, < 3.4]

Dependabot compatibility score

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 commands and options

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)

Bumps [sentence-transformers](https://github.com/UKPLab/sentence-transformers) from 2.2.2 to 3.2.1.
- [Release notes](https://github.com/UKPLab/sentence-transformers/releases)
- [Commits](UKPLab/sentence-transformers@v2.2.2...v3.2.1)

---
updated-dependencies:
- dependency-name: sentence-transformers
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Dec 9, 2024
Copy link

sonarqubecloud bot commented Dec 9, 2024

@coveralls
Copy link

Coverage Status

coverage: 52.441% (-0.09%) from 52.527%
when pulling 627497f on dependabot/pip/sentence-transformers-3.2.1
into f925589 on dev.

@bact
Copy link
Member

bact commented Dec 9, 2024

@dependabot ignore this major version

@dependabot dependabot bot closed this Dec 9, 2024
Copy link
Contributor Author

dependabot bot commented on behalf of github Dec 9, 2024

OK, I won't notify you about version 3.x.x again, unless you re-open this PR.

@dependabot dependabot bot deleted the dependabot/pip/sentence-transformers-3.2.1 branch December 9, 2024 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants