Update README.md
Browse files
README.md
CHANGED
@@ -5,6 +5,7 @@ tags:
|
|
5 |
- feature-extraction
|
6 |
- sentence-similarity
|
7 |
- transformers
|
|
|
8 |
---
|
9 |
|
10 |
# hugorosen/flaubert_base_uncased-xnli-sts
|
@@ -25,7 +26,7 @@ Then you can use the model like this:
|
|
25 |
|
26 |
```python
|
27 |
from sentence_transformers import SentenceTransformer
|
28 |
-
sentences = ["
|
29 |
|
30 |
model = SentenceTransformer('hugorosen/flaubert_base_uncased-xnli-sts')
|
31 |
embeddings = model.encode(sentences)
|
@@ -50,7 +51,7 @@ def mean_pooling(model_output, attention_mask):
|
|
50 |
|
51 |
|
52 |
# Sentences we want sentence embeddings for
|
53 |
-
sentences = [
|
54 |
|
55 |
# Load model from HuggingFace Hub
|
56 |
tokenizer = AutoTokenizer.from_pretrained('hugorosen/flaubert_base_uncased-xnli-sts')
|
@@ -76,22 +77,17 @@ print(sentence_embeddings)
|
|
76 |
|
77 |
<!--- Describe how your model was evaluated -->
|
78 |
|
79 |
-
|
80 |
|
81 |
|
82 |
## Training
|
83 |
-
|
84 |
|
85 |
-
|
86 |
|
87 |
-
|
88 |
-
```
|
89 |
-
{'batch_size': 16, 'sampler': 'torch.utils.data.sampler.RandomSampler', 'batch_sampler': 'torch.utils.data.sampler.BatchSampler'}
|
90 |
-
```
|
91 |
-
|
92 |
-
**Loss**:
|
93 |
|
94 |
-
`
|
95 |
|
96 |
Parameters of the fit()-Method:
|
97 |
```
|
|
|
5 |
- feature-extraction
|
6 |
- sentence-similarity
|
7 |
- transformers
|
8 |
+
- fr
|
9 |
---
|
10 |
|
11 |
# hugorosen/flaubert_base_uncased-xnli-sts
|
|
|
26 |
|
27 |
```python
|
28 |
from sentence_transformers import SentenceTransformer
|
29 |
+
sentences = ["Ceci est une phrase d'exemple", "Chaque phrase est convertie"]
|
30 |
|
31 |
model = SentenceTransformer('hugorosen/flaubert_base_uncased-xnli-sts')
|
32 |
embeddings = model.encode(sentences)
|
|
|
51 |
|
52 |
|
53 |
# Sentences we want sentence embeddings for
|
54 |
+
sentences = ["Ceci est une phrase d'exemple", "Chaque phrase est convertie"]
|
55 |
|
56 |
# Load model from HuggingFace Hub
|
57 |
tokenizer = AutoTokenizer.from_pretrained('hugorosen/flaubert_base_uncased-xnli-sts')
|
|
|
77 |
|
78 |
<!--- Describe how your model was evaluated -->
|
79 |
|
80 |
+
This model scores 76.9% on STS test (french)
|
81 |
|
82 |
|
83 |
## Training
|
84 |
+
### Pre-training
|
85 |
|
86 |
+
We use the pre-trained [flaubert/flaubert_base_uncased](https://huggingface.co/flaubert/flaubert_base_cased). Please refer to the model card for more detailed information about the pre-training procedure.
|
87 |
|
88 |
+
### Fine-tuning
|
|
|
|
|
|
|
|
|
|
|
89 |
|
90 |
+
we fine-tune the model using a `CosineSimilarityLoss` on XNLI and STS dataset (french).
|
91 |
|
92 |
Parameters of the fit()-Method:
|
93 |
```
|