Blanca commited on
Commit
dc85ae0
1 Parent(s): b9126f8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +151 -0
README.md CHANGED
@@ -1,3 +1,154 @@
1
  ---
 
 
 
 
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+
3
+ language:
4
+ - ca
5
+
6
  license: apache-2.0
7
+
8
+ tags:
9
+ - "catalan"
10
+ - "paraphrase"
11
+
12
+ datasets:
13
+ - "Parafraseja"
14
+
15
+ metrics:
16
+ - combined_score
17
+ - f1
18
+ - accuracy
19
+
20
+ inference:
21
+ parameters:
22
+ aggregation_strategy: "first"
23
+
24
+ model-index:
25
+ - name: roberta-large-ca-paraphrase
26
+ results:
27
+ - task:
28
+ type: sequence-classification
29
+ dataset:
30
+ type: paraphrase
31
+ name: Parafraseja
32
+ metrics:
33
+ - name: F1
34
+ type: f1
35
+ value: 0.866779089376054
36
+ - name: combined_score
37
+ type: combined_score
38
+ value: 0.864264544688027
39
+
40
+ widget:
41
+
42
+ - text: "Tinc un amic a Manresa. </s></s> A Manresa hi viu un amic meu."
43
+
44
+ - text: "La dona va anar a l'hotel en moto. </s></s> Ella va agafar el cotxe per anar a l'hotel."
45
+
46
  ---
47
+
48
+ # Catalan BERTa (roberta-large-ca-v2) finetuned for Paraphrase Detection
49
+
50
+ ## Table of Contents
51
+ <details>
52
+ <summary>Click to expand</summary>
53
+
54
+ - [Model description](#model-description)
55
+ - [Intended uses and limitations](#intended-use)
56
+ - [How to use](#how-to-use)
57
+ - [Limitations and bias](#limitations-and-bias)
58
+ - [Training](#training)
59
+ - [Training data](#training-data)
60
+ - [Training procedure](#training-procedure)
61
+ - [Evaluation](#evaluation)
62
+ - [Variable and metrics](#variable-and-metrics)
63
+ - [Evaluation results](#evaluation-results)
64
+ - [Additional information](#additional-information)
65
+ - [Author](#author)
66
+ - [Contact information](#contact-information)
67
+ - [Copyright](#copyright)
68
+ - [Licensing information](#licensing-information)
69
+ - [Funding](#funding)
70
+ - [Citing information](#citing-information)
71
+ - [Disclaimer](#disclaimer)
72
+ </details>
73
+
74
+ ## Model description
75
+
76
+ The **roberta-large-ca-paraphrase** is a Paraphrase Detection model for the Catalan language fine-tuned from the roberta-large-ca-v2 model, a [RoBERTa](https://arxiv.org/abs/1907.11692) base model pre-trained on a medium-size corpus collected from publicly available corpora and crawlers.
77
+
78
+ ## Intended uses and limitations
79
+
80
+ **roberta-large-ca-paraphrase** model can be used to detect if two sentences are in a paraphrase relation. The model is limited by its training dataset and may not generalize well for all use cases.
81
+
82
+ ## How to use
83
+
84
+ Here is how to use this model:
85
+
86
+ ```python
87
+ from transformers import pipeline
88
+ from pprint import pprint
89
+
90
+ nlp = pipeline("text-classification", model="projecte-aina/roberta-large-ca-paraphrase")
91
+ example = "Tinc un amic a Manresa. </s></s> A Manresa hi viu un amic meu."
92
+
93
+ paraphrase = nlp(example)
94
+ pprint(paraphrase)
95
+ ```
96
+
97
+ ## Limitations and bias
98
+ At the time of submission, no measures have been taken to estimate the bias embedded in the model. However, we are well aware that our models may be biased since the corpora have been collected using crawling techniques on multiple web sources. We intend to conduct research in these areas in the future, and if completed, this model card will be updated.
99
+
100
+ ## Training
101
+
102
+ ### Training data
103
+ We used the Paraphase Detection dataset in Catalan [Parafraseja](https://huggingface.co/datasets/projecte-aina/Parafraseja) for training and evaluation.
104
+
105
+ ### Training procedure
106
+ The model was trained with a batch size of 16 and a learning rate of 5e-5 for 5 epochs. We then selected the best checkpoint using the downstream task metric in the corresponding development set and then evaluated it on the test set.
107
+
108
+ ## Evaluation
109
+
110
+ ### Variable and metrics
111
+
112
+ This model was finetuned maximizing the combined_score.
113
+
114
+ ## Evaluation results
115
+ We evaluated the _roberta-large-ca-paraphrase_ on the Parafraseja test set against standard multilingual and monolingual baselines:
116
+
117
+
118
+ | Model | Parafraseja (combined_score) |
119
+ | ------------|:-------------|
120
+ | roberta-large-ca-v2 |**86.42** |
121
+ | roberta-base-ca-v2 |84.38 |
122
+ | mBERT | 79.66 |
123
+ | XLM-RoBERTa | 77.83 |
124
+
125
+ ## Additional information
126
+
127
+ ### Author
128
+ Text Mining Unit (TeMU) at the Barcelona Supercomputing Center (bsc-temu@bsc.es)
129
+
130
+ ### Contact information
131
+ For further information, send an email to aina@bsc.es
132
+
133
+ ### Copyright
134
+ Copyright (c) 2022 Text Mining Unit at Barcelona Supercomputing Center
135
+
136
+ ### Licensing information
137
+ [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0)
138
+
139
+ ### Funding
140
+ This work was funded by the [Departament de la Vicepresidència i de Polítiques Digitals i Territori de la Generalitat de Catalunya](https://politiquesdigitals.gencat.cat/ca/inici/index.html#googtrans(ca|en) within the framework of [Projecte AINA](https://politiquesdigitals.gencat.cat/ca/economia/catalonia-ai/aina).
141
+
142
+ ### Citation Information
143
+ NA
144
+
145
+ ### Disclaimer
146
+
147
+ <details>
148
+ <summary>Click to expand</summary>
149
+
150
+ The models published in this repository are intended for a generalist purpose and are available to third parties. These models may have bias and/or any other undesirable distortions.
151
+
152
+ When third parties, deploy or provide systems and/or services to other parties using any of these models (or using systems based on these models) or become users of the models, they should note that it is their responsibility to mitigate the risks arising from their use and, in any event, to comply with applicable regulations, including regulations regarding the use of Artificial Intelligence.
153
+
154
+ In no event shall the owner and creator of the models (BSC – Barcelona Supercomputing Center) be liable for any results arising from the use made by third parties of these models.