Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,211 @@
|
|
1 |
-
---
|
2 |
-
license: cc-by-4.0
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: cc-by-4.0
|
3 |
+
language:
|
4 |
+
- es
|
5 |
+
metrics:
|
6 |
+
- accuracy
|
7 |
+
pipeline_tag: text-classification
|
8 |
+
library_name: transformers
|
9 |
+
tags:
|
10 |
+
- lgbt
|
11 |
+
- classification
|
12 |
+
---
|
13 |
+
|
14 |
+
# Model Card for Model ID
|
15 |
+
|
16 |
+
<!-- Provide a quick summary of what the model is/does. -->
|
17 |
+
|
18 |
+
This modelcard aims to be a base template for new models. It has been generated using [this raw template](https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/templates/modelcard_template.md?plain=1).
|
19 |
+
|
20 |
+
## Model Details
|
21 |
+
|
22 |
+
### Model Description
|
23 |
+
|
24 |
+
1. The process begins by recovering discriminatory phrases for the LGBTQIA+ community from Twitter, Instagram and Tiktok (197 phrases) available at
|
25 |
+
[https://zenodo.org/records/13756092]
|
26 |
+
2. Then preprocess them, label them by 3 evaluator raters como lgbtfobic (1) and non-lgbtfobic (0)
|
27 |
+
3. Augmentation was necessary applying backtranslation and synonyms (1200 phrases) available at .
|
28 |
+
4. Then adjust the BETO model based on BERT (dccuchile/bert-base-spanish-wwm-uncased) for discriminatory phrase detection for the LGBT community.
|
29 |
+
5. In this way the lgbetO v1.0.0 model was generated.
|
30 |
+
|
31 |
+
- **Developed by:** [Mart铆nez-Araneda, C; Segura Navarrete, A.; Gutierrez Valenzuela, Mariella; Maldonado Mintiel, Diego; G贸mez Meneses, P.; Vidal-Castro; Christian ]
|
32 |
+
- **Model type:** [text-classification]
|
33 |
+
- **Language(s) (NLP):** [Spanish]
|
34 |
+
- **License:** [cc-by-4.0]
|
35 |
+
- **Finetuned from model [dccuchile/bert-base-spanish-wwm-uncased]:** More information of base model [https://github.com/dccuchile/beto]
|
36 |
+
|
37 |
+
### Model Sources [optional]
|
38 |
+
|
39 |
+
<!-- Provide the basic links for the model.
|
40 |
+
|
41 |
+
- **Repository:** [More Information Needed]
|
42 |
+
- **Paper [optional]:** [More Information Needed]
|
43 |
+
- **Demo [optional]:** [More Information Needed]
|
44 |
+
-->
|
45 |
+
## Uses
|
46 |
+
|
47 |
+
This model can be used to detect offensive and discriminatory language against lgbt community. It could be used as a moderation service in forums and digital spaces.
|
48 |
+
|
49 |
+
### Direct Use
|
50 |
+
|
51 |
+
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
52 |
+
|
53 |
+
[More Information Needed]
|
54 |
+
|
55 |
+
### Out-of-Scope Use
|
56 |
+
|
57 |
+
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
58 |
+
|
59 |
+
[More Information Needed]
|
60 |
+
|
61 |
+
## Bias, Risks, and Limitations
|
62 |
+
|
63 |
+
This model has its own bias from having been adjusted with a small data set.<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
64 |
+
|
65 |
+
[More Information Needed]
|
66 |
+
|
67 |
+
### Recommendations
|
68 |
+
|
69 |
+
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
70 |
+
|
71 |
+
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
72 |
+
|
73 |
+
## How to Get Started with the Model
|
74 |
+
#lybraries
|
75 |
+
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
76 |
+
# Define la ruta de donde cargar谩s el modelo
|
77 |
+
#load_directory = "./lgbetO"
|
78 |
+
# Cargar el modelo entrenado
|
79 |
+
#model = AutoModelForSequenceClassification.from_pretrained(load_directory)
|
80 |
+
# Cargar el tokenizer
|
81 |
+
#tokenizer = AutoTokenizer.from_pretrained(load_directory)
|
82 |
+
## Training Details
|
83 |
+
|
84 |
+
The training process begins by retrieving offensive/non-offensive and discriminatory/non-discriminatory language against phrases related to the lgbt community from twitter, instagram and tiktok,
|
85 |
+
preprocessing them, labeling them by 3 raters, augmenting them with backtranslation and synonyms,
|
86 |
+
and adjusting the BETO base model (dccuchile/bert-base -spanish-wwm-uncased) for discriminatory phrase detection for the lgbt community.
|
87 |
+
|
88 |
+
### Training Data
|
89 |
+
|
90 |
+
https://zenodo.org/records/13756092
|
91 |
+
|
92 |
+
### Training Procedure
|
93 |
+
|
94 |
+
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
95 |
+
|
96 |
+
#### Preprocessing [optional]
|
97 |
+
|
98 |
+
[More Information Needed]
|
99 |
+
|
100 |
+
|
101 |
+
#### Training Hyperparameters
|
102 |
+
|
103 |
+
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
104 |
+
|
105 |
+
#### Speeds, Sizes, Times [optional]
|
106 |
+
|
107 |
+
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
108 |
+
|
109 |
+
[More Information Needed]
|
110 |
+
|
111 |
+
## Evaluation
|
112 |
+
|
113 |
+
<!-- This section describes the evaluation protocols and provides the results. -->
|
114 |
+
|
115 |
+
### Testing Data, Factors & Metrics
|
116 |
+
|
117 |
+
#### Testing Data
|
118 |
+
|
119 |
+
<!-- This should link to a Dataset Card if possible. -->
|
120 |
+
|
121 |
+
[More Information Needed]
|
122 |
+
|
123 |
+
#### Factors
|
124 |
+
|
125 |
+
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
126 |
+
|
127 |
+
[More Information Needed]
|
128 |
+
|
129 |
+
#### Metrics
|
130 |
+
|
131 |
+
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
132 |
+
|
133 |
+
[More Information Needed]
|
134 |
+
|
135 |
+
### Results
|
136 |
+
|
137 |
+
[More Information Needed]
|
138 |
+
|
139 |
+
#### Summary
|
140 |
+
|
141 |
+
|
142 |
+
|
143 |
+
## Model Examination [optional]
|
144 |
+
|
145 |
+
<!-- Relevant interpretability work for the model goes here -->
|
146 |
+
|
147 |
+
[More Information Needed]
|
148 |
+
|
149 |
+
## Environmental Impact
|
150 |
+
|
151 |
+
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
152 |
+
|
153 |
+
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
154 |
+
|
155 |
+
- **Hardware Type:** Google Cloud Platform [More Information Needed]
|
156 |
+
- **Hours used:** [More Information Needed]
|
157 |
+
- **Cloud Provider:** [More Information Needed]
|
158 |
+
- **Compute Region:** southamerica
|
159 |
+
- **Carbon Emitted:** 0.14kgCO$_2$eq/kWh
|
160 |
+
|
161 |
+
|
162 |
+
Experiments were conducted using Google Cloud Platform in region southamerica-east1, which has a carbon efficiency of 0.2 kgCO$_2$eq/kWh. A cumulative of 10 hours of computation was performed on hardware of type T4 (TDP of 70W).
|
163 |
+
|
164 |
+
Total emissions are estimated to be 0.14 kgCO$_2$eq of which 100 percents were directly offset by the cloud provider.
|
165 |
+
|
166 |
+
|
167 |
+
## Technical Specifications [optional]
|
168 |
+
|
169 |
+
### Model Architecture and Objective
|
170 |
+
|
171 |
+
[More Information Needed]
|
172 |
+
|
173 |
+
### Compute Infrastructure
|
174 |
+
(GPU) del backend de Google Compute Engine en Python 3
|
175 |
+
|
176 |
+
#### Hardware
|
177 |
+
RAM: 3.87 GB/12.67 GB
|
178 |
+
Disco: 33.96 GB/112.64 GB
|
179 |
+
|
180 |
+
#### Software
|
181 |
+
[More Information Needed]
|
182 |
+
|
183 |
+
## Citation [optional]
|
184 |
+
|
185 |
+
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
186 |
+
|
187 |
+
**BibTeX:**
|
188 |
+
|
189 |
+
[More Information Needed]
|
190 |
+
|
191 |
+
**APA:**
|
192 |
+
|
193 |
+
[More Information Needed]
|
194 |
+
|
195 |
+
## Glossary [optional]
|
196 |
+
|
197 |
+
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
198 |
+
|
199 |
+
[More Information Needed]
|
200 |
+
|
201 |
+
## More Information [optional]
|
202 |
+
|
203 |
+
[More Information Needed]
|
204 |
+
|
205 |
+
## Model Card Authors [optional]
|
206 |
+
|
207 |
+
[More Information Needed]
|
208 |
+
|
209 |
+
## Model Card Contact
|
210 |
+
|
211 |
+
[cmartinez@ucsc.cl]
|