mmazuecos commited on
Commit
5ab547e
1 Parent(s): 2a6a4d0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +0 -112
README.md CHANGED
@@ -1,112 +0,0 @@
1
- ---
2
- pipeline_tag: sentence-similarity
3
- tags:
4
- - sentence-transformers
5
- - feature-extraction
6
- - sentence-similarity
7
- ---
8
-
9
- # bertin-roberta-base-finetuning-esnli
10
-
11
- This is a [sentence-transformers](https://www.SBERT.net) model trained on a collection of NLI tasks for Spanish. It maps sentences & paragraphs to a 512 dimensional dense vector space and can be used for tasks like clustering or semantic search.
12
-
13
- Based around the siamese networks approach from [this paper](https://arxiv.org/pdf/1908.10084.pdf).
14
- <!--- Describe your model here -->
15
-
16
- ## Usage (Sentence-Transformers)
17
-
18
- Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed:
19
-
20
- ```
21
- pip install -U sentence-transformers
22
- ```
23
-
24
- Then you can use the model like this:
25
-
26
- ```python
27
- from sentence_transformers import SentenceTransformer
28
- sentences = ["Este es un ejemplo", "Cada oración es transformada"]
29
-
30
- model = SentenceTransformer('hackathon-pln-es/bertin-roberta-base-finetuning-esnli')
31
- embeddings = model.encode(sentences)
32
- print(embeddings)
33
- ```
34
-
35
- ## Evaluation Results
36
-
37
- <!--- Describe how your model was evaluated -->
38
- Our model was evaluated on the task of Semantic Textual Similarity using the [SemEval-2015 Task](https://alt.qcri.org/semeval2015/task2/) for [Spanish](http://alt.qcri.org/semeval2015/task2/data/uploads/sts2015-es-test.zip).
39
-
40
- | | [BETO STS](https://huggingface.co/espejelomar/sentece-embeddings-BETO) | BERTIN STS (this model) | Relative improvement |
41
- |-------------------:|---------:|-----------:|---------------------:|
42
- | cosine_pearson | 0.609803 | 0.670862 | +10.01 |
43
- | cosine_spearman | 0.528776 | 0.598593 | +13.20 |
44
- | euclidean_pearson | 0.590613 | 0.675257 | +14.33 |
45
- | euclidean_spearman | 0.526529 | 0.604656 | +14.84 |
46
- | manhattan_pearson | 0.589108 | 0.676706 | +14.87 |
47
- | manhattan_spearman | 0.525910 | 0.606461 | +15.32 |
48
- | dot_pearson | 0.544078 | 0.586429 | +7.78 |
49
- | dot_spearman | 0.460427 | 0.495614 | +7.64 |
50
-
51
-
52
- ## Training
53
- The model was trained with the parameters:
54
-
55
- **Dataset**
56
-
57
- We used a collection of datasets of Natural Language Inference as training data:
58
- - [ESXNLI](https://raw.githubusercontent.com/artetxem/esxnli/master/esxnli.tsv), only the part in spanish
59
- - [SNLI](https://nlp.stanford.edu/projects/snli/), automatically translated
60
- - [MultiNLI](https://cims.nyu.edu/~sbowman/multinli/), automatically translated
61
-
62
- The whole dataset used is available [here](https://huggingface.co/hackathon-pln-es/coming-soon).
63
-
64
- **DataLoader**:
65
-
66
- `sentence_transformers.datasets.NoDuplicatesDataLoader.NoDuplicatesDataLoader` of length 1127 with parameters:
67
- ```
68
- {'batch_size': 64}
69
- ```
70
-
71
- **Loss**:
72
-
73
- `sentence_transformers.losses.MultipleNegativesRankingLoss.MultipleNegativesRankingLoss` with parameters:
74
- ```
75
- {'scale': 20.0, 'similarity_fct': 'cos_sim'}
76
- ```
77
-
78
- Parameters of the fit()-Method:
79
- ```
80
- {
81
- "epochs": 20,
82
- "evaluation_steps": 0,
83
- "evaluator": "sentence_transformers.evaluation.EmbeddingSimilarityEvaluator.EmbeddingSimilarityEvaluator",
84
- "max_grad_norm": 1,
85
- "optimizer_class": "<class 'transformers.optimization.AdamW'>",
86
- "optimizer_params": {
87
- "lr": 2e-05
88
- },
89
- "scheduler": "WarmupLinear",
90
- "steps_per_epoch": null,
91
- "warmup_steps": 1127,
92
- "weight_decay": 0.01
93
- }
94
- ```
95
-
96
-
97
- ## Full Model Architecture
98
- ```
99
- SentenceTransformer(
100
- (0): Transformer({'max_seq_length': 514, 'do_lower_case': False}) with Transformer model: RobertaModel
101
- (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False})
102
- (2): Dense({'in_features': 768, 'out_features': 512, 'bias': True, 'activation_function': 'torch.nn.modules.activation.Tanh'})
103
- )
104
- ```
105
-
106
- ## Authors
107
-
108
- [Anibal Pérez](https://huggingface.co/Anarpego),
109
- [Emilio Tomás Ariza](https://huggingface.co/medardodt),
110
- [Lautaro Gesuelli](https://huggingface.co/Lgesuelli) y
111
- [Mauricio Mazuecos](https://huggingface.co/mmazuecos).
112
-