tomaarsen HF staff commited on
Commit
b33b300
1 Parent(s): e1b7f86

Add 'sentence-transformers' tag for easier discoverability

Browse files

Hello

@PhilipMay

!

## Pull Request overview
* Add the `sentence-transformers` tag.

## Details
The upcoming Sentence Transformers v3 update will introduce training directly with `Dataset` instances, e.g. like so:

```python
from datasets import load_dataset
from sentence_transformers import SentenceTransformer, SentenceTransformerTrainer
from sentence_transformers.losses import MultipleNegativesRankingLoss

# 1. Load a model to finetune
model = SentenceTransformer("microsoft/mpnet-base")

# 2. Load a dataset to finetune on
dataset = load_dataset("sentence-transformers/all-nli", "pair")
train_dataset = dataset["train"]
eval_dataset = dataset["dev"]

# 3. Define a loss function
loss = MultipleNegativesRankingLoss(model)

# 4. Create a trainer & train
trainer = SentenceTransformerTrainer(
model=model,
train_dataset=train_dataset,
eval_dataset=eval_dataset,
loss=loss,
)
trainer.train()

# 5. Save the trained model
model.save_pretrained("models/mpnet-base-all-nli")
```

In preparation for the release, I'm going through and tagging some excellent datasets that immediately match one of the dataset formats required for one of the [loss functions](https://sbert.net/docs/training/loss_overview.html) as [`sentence-transformers`](https://huggingface.co./datasets?other=sentence-transformers). Then I can link to datasets with this tag in the Sentence Transformers documentation.

This dataset in particular matches the `(sentence_A, sentence_B) pairs` with a similarity score format, allowing this dataset to be used out of the box for CosineSimilarityLoss, AnglELoss, CoSENTLoss.

- Tom Aarsen

Files changed (1) hide show
  1. README.md +2 -0
README.md CHANGED
@@ -29,6 +29,8 @@ task_categories:
29
  task_ids:
30
  - text-scoring
31
  - semantic-similarity-scoring
 
 
32
  pretty_name: STSb Multi MT
33
  dataset_info:
34
  - config_name: de
 
29
  task_ids:
30
  - text-scoring
31
  - semantic-similarity-scoring
32
+ tags:
33
+ - sentence-transformers
34
  pretty_name: STSb Multi MT
35
  dataset_info:
36
  - config_name: de