Electricidad-base-generator (uncased) is a
base Electra like model (generator in this case) trained on a + 20 GB of the
OSCAR Spanish corpus.
As mentioned in the original
paper:
ELECTRA is a new method for self-supervised language representation learning. It can be used to pre-train transformer networks using relatively little compute. ELECTRA models are trained to distinguish "real" input tokens vs "fake" input tokens generated by another neural network, similar to the discriminator of a
GAN. At small scale, ELECTRA achieves strong results even when trained on a single GPU. At large scale, ELECTRA achieves state-of-the-art results on the
SQuAD 2.0 dataset.
For a detailed description and experimental results, please refer the paper
ELECTRA: Pre-training Text Encoders as Discriminators Rather Than Generators.
1from transformers import pipeline
2
3fill_mask = pipeline(
4 "fill-mask",
5 model="mrm8488/electricidad-base-generator",
6 tokenizer="mrm8488/electricidad-base-generator"
7)
8
9print(
10 fill_mask(f"HuggingFace está creando {fill_mask.tokenizer.mask_token} que la comunidad usa para resolver tareas de NLP.")
11)
12
13# Output: [{'sequence': '[CLS] huggingface esta creando herramientas que la comunidad usa para resolver tareas de nlp. [SEP]', 'score': 0.0896105170249939, 'token': 8760, 'token_str': 'herramientas'}, ...]
14
I thank
🤗/transformers team for allowing me to train the model (specially to
Julien Chaumond).