Instructions to use voidism/diffcse-bert-base-uncased-sts with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use voidism/diffcse-bert-base-uncased-sts with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="voidism/diffcse-bert-base-uncased-sts")# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("voidism/diffcse-bert-base-uncased-sts") model = AutoModel.from_pretrained("voidism/diffcse-bert-base-uncased-sts") - Notebooks
- Google Colab
- Kaggle
update README
Browse files
README.md
CHANGED
|
@@ -3,13 +3,7 @@ license: apache-2.0
|
|
| 3 |
---
|
| 4 |
# DiffCSE: Difference-based Contrastive Learning for Sentence Embeddings
|
| 5 |
|
| 6 |
-
[](https://img.shields.io/badge/Version-v0.1.0-blue)
|
| 7 |
-
[](https://opensource.org/licenses/MIT)
|
| 8 |
-
[](https://arxiv.org/abs/2204.10298)
|
| 9 |
-
[](https://huggingface.co/voidism)
|
| 10 |
-
[](https://github.com/huggingface/transformers)
|
| 11 |
-
[](https://twitter.com/YungSungChuang/status/1517518077902000129)
|
| 12 |
-
[](https://github.com/voidism/DiffCSE/stargazers)
|
| 13 |
|
| 14 |
[](https://colab.research.google.com/github/voidism/DiffCSE/blob/master/diffcse_evaluation.ipynb)
|
| 15 |
|
|
@@ -32,7 +26,7 @@ Authors:
|
|
| 32 |
Our code is mainly based on the code of [SimCSE](https://arxiv.org/abs/2104.08821). Please refer to their [repository](https://github.com/princeton-nlp/SimCSE) for more detailed information.
|
| 33 |
|
| 34 |
## Overview
|
| 35 |
-

|
| 36 |
|
| 37 |
We propose DiffCSE, an unsupervised contrastive learning framework for learning sentence embeddings. DiffCSE learns sentence embeddings that are sensitive to the difference between the original sentence and an edited sentence, where the edited sentence is obtained by stochastically masking out the original sentence and then sampling from a masked language model. We show that DiffSCE is an instance of equivariant contrastive learning [(Dangovski et al., 2021)](https://arxiv.org/abs/2111.00899), which generalizes contrastive learning and learns representations that are insensitive to certain types of augmentations and sensitive to other "harmful" types of augmentations. Our experiments show that DiffCSE achieves state-of-the-art results among unsupervised sentence representation learning methods, outperforming unsupervised SimCSE by 2.3 absolute points on semantic textual similarity tasks.
|
| 38 |
|
|
|
|
| 3 |
---
|
| 4 |
# DiffCSE: Difference-based Contrastive Learning for Sentence Embeddings
|
| 5 |
|
| 6 |
+
[](https://img.shields.io/badge/Version-v0.1.0-blue) [](https://opensource.org/licenses/MIT) [](https://arxiv.org/abs/2204.10298) [](https://huggingface.co/voidism) [](https://github.com/huggingface/transformers) [](https://twitter.com/YungSungChuang/status/1517518077902000129) [](https://github.com/voidism/DiffCSE/stargazers)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
[](https://colab.research.google.com/github/voidism/DiffCSE/blob/master/diffcse_evaluation.ipynb)
|
| 9 |
|
|
|
|
| 26 |
Our code is mainly based on the code of [SimCSE](https://arxiv.org/abs/2104.08821). Please refer to their [repository](https://github.com/princeton-nlp/SimCSE) for more detailed information.
|
| 27 |
|
| 28 |
## Overview
|
| 29 |
+

|
| 30 |
|
| 31 |
We propose DiffCSE, an unsupervised contrastive learning framework for learning sentence embeddings. DiffCSE learns sentence embeddings that are sensitive to the difference between the original sentence and an edited sentence, where the edited sentence is obtained by stochastically masking out the original sentence and then sampling from a masked language model. We show that DiffSCE is an instance of equivariant contrastive learning [(Dangovski et al., 2021)](https://arxiv.org/abs/2111.00899), which generalizes contrastive learning and learns representations that are insensitive to certain types of augmentations and sensitive to other "harmful" types of augmentations. Our experiments show that DiffCSE achieves state-of-the-art results among unsupervised sentence representation learning methods, outperforming unsupervised SimCSE by 2.3 absolute points on semantic textual similarity tasks.
|
| 32 |
|