Instructions to use ZurichNLP/unsup-simcse-xlm-roberta-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ZurichNLP/unsup-simcse-xlm-roberta-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="ZurichNLP/unsup-simcse-xlm-roberta-base")# Load model directly from transformers import AutoTokenizer, RobertaForCL tokenizer = AutoTokenizer.from_pretrained("ZurichNLP/unsup-simcse-xlm-roberta-base") model = RobertaForCL.from_pretrained("ZurichNLP/unsup-simcse-xlm-roberta-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -102,7 +102,10 @@ pipeline_tag: feature-extraction
|
|
| 102 |
|
| 103 |
See a similar English model released by Gao et al.: https://huggingface.co/princeton-nlp/unsup-simcse-roberta-base
|
| 104 |
|
| 105 |
-
Fine-tuning was done using the [reference implementation of SimCSE](https://github.com/princeton-nlp/SimCSE) and the 1M sentences from English Wikipedia released by the authors
|
|
|
|
|
|
|
|
|
|
| 106 |
```bash
|
| 107 |
python train.py \
|
| 108 |
--model_name_or_path xlm-roberta-base \
|
|
|
|
| 102 |
|
| 103 |
See a similar English model released by Gao et al.: https://huggingface.co/princeton-nlp/unsup-simcse-roberta-base
|
| 104 |
|
| 105 |
+
Fine-tuning was done using the [reference implementation of SimCSE](https://github.com/princeton-nlp/SimCSE) and the 1M sentences from English Wikipedia released by the authors.
|
| 106 |
+
As a sentence representation we use the average of the last hidden states (`pooler_type=avg`), which ensures compatibility to Sentence-BERT.
|
| 107 |
+
|
| 108 |
+
Fine-tuning command:
|
| 109 |
```bash
|
| 110 |
python train.py \
|
| 111 |
--model_name_or_path xlm-roberta-base \
|