Commit 02ce8cb
authored
Add CrossEncoder to the Sentence Transformers "How to Use" snippet & patch SetFit (#1337)
Hello!
## Pull Request overview
* Add CrossEncoder to the Sentence Transformers "How to Use" snippet
* Patch "How to Use" for SetFit models (that are also tagged as Sentence
Transformers)
## Details
This PR adds the `CrossEncoder` class to the "How to Use" snippets. I'm
working on feature parity of these models with the more common
`SentenceTransformer` models, and the recent Sentence Transformers v4.0
release was a big step in that.
We're already at 150 models:
https://huggingface.co/models?pipeline_tag=text-ranking&library=sentence-transformers
Beyond that, this ensures that `[widgetExample.source_sentence,
...widgetExample.sentences]` doesn't crash, apparently that currently
happens for some SetFit models, e.g.:
https://huggingface.co/faodl/setfit-paraphrase-mpnet-base-v2-5ClassesDesc-multilabel-augmented?library=sentence-transformers
- Tom Aarsen1 parent 9b3e2cf commit 02ce8cb
1 file changed
+20
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
920 | 920 | | |
921 | 921 | | |
922 | 922 | | |
923 | | - | |
| 923 | + | |
924 | 924 | | |
925 | 925 | | |
926 | 926 | | |
927 | 927 | | |
928 | 928 | | |
929 | 929 | | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
930 | 949 | | |
931 | 950 | | |
932 | 951 | | |
| |||
0 commit comments