Toimil commited on
Commit
747c250
·
verified ·
1 Parent(s): abdd1c4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +47 -3
README.md CHANGED
@@ -1,3 +1,47 @@
1
- ---
2
- license: cc-by-nc-4.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-nc-4.0
3
+ language:
4
+ - es
5
+ base_model:
6
+ - dccuchile/bert-base-spanish-wwm-uncased
7
+ datasets:
8
+ - manueltonneau/spanish-hate-speech-superset
9
+ tags:
10
+ - BETO
11
+ - beto
12
+ - hate_speech
13
+ - immigrant
14
+ - misogyny
15
+ - BERT
16
+ - spanish
17
+ pipeline_tag: fill-mask
18
+ library_name: transformers
19
+ widget:
20
+ - text: Los [MASK] son los causantes del aumento del desempleo
21
+ ---
22
+ # immisoBETO
23
+
24
+ immisoBETO is a domain adaptation of a [Spanish BERT](https://huggingface.co/dccuchile/bert-base-spanish-wwm-uncased) language model, specifically adapted to the immigrant and misogyny domain.
25
+
26
+ It was adapted using a guided lexical masking strategy during masked language model (MLM) pretraining.
27
+ Instead of randomly masking tokens, we prioritized masking words appearing in a [immigrant](https://github.com/fmplaza/hate-speech-spanish-lexicons/blob/master/immigrant_lexicon.txt) and [misogyny](https://github.com/fmplaza/hate-speech-spanish-lexicons/blob/master/misogyny_lexicon.txt)-specific lexicon.
28
+ The base corpus used for domain adaptation was the [Spanish Hate Speech Superset](https://huggingface.co/datasets/manueltonneau/spanish-hate-speech-superset).
29
+
30
+
31
+ For training the model we used a batch size of 8, with a learning rate of 2e-5. We trained the model for four epochs using a NVIDIA GeForce RTX 5090 GPU.
32
+
33
+ ## Usage
34
+
35
+ ```python
36
+ from transformers import pipeline
37
+ pipe = pipeline("fill-mask", model="citiusLTL/immisoBETO")
38
+ text = pipe("Los [MASK] son los causantes del aumento del desempleo")
39
+ print(text)
40
+ ```
41
+
42
+ ## Load model directly
43
+ ```python
44
+ from transformers import AutoTokenizer, AutoModelForMaskedLM
45
+ tokenizer = AutoTokenizer.from_pretrained("citiusLTL/immisoBETO")
46
+ model = AutoModelForMaskedLM.from_pretrained("citiusLTL/immisoBETO")
47
+ ```