mrm8488 / electricidad-base-discriminator

huggingface.co
Total runs: 51
24-hour runs: 0
7-day runs: 2
30-day runs: -279
Model's Last Updated: March 31 2022

Introduction of electricidad-base-discriminator

Model Details of electricidad-base-discriminator

ELECTRICIDAD: The Spanish Electra Imgur

Electricidad-base-discriminator (uncased) is a base Electra like model (discriminator in this case) trained on a Large Spanish Corpus (aka BETO's 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 .

Model details ⚙
Name # Value
Layers 12
Hidden 768
Params 110M
Evaluation metrics (for discriminator) 🧾
Metric # Score
Accuracy 0.985
Precision 0.726
AUC 0.922
Fast example of usage 🚀
from transformers import ElectraForPreTraining, ElectraTokenizerFast
import torch

discriminator = ElectraForPreTraining.from_pretrained("mrm8488/electricidad-base-discriminator")
tokenizer = ElectraTokenizerFast.from_pretrained("mrm8488/electricidad-base-discriminator")

sentence = "El rápido zorro marrón salta sobre el perro perezoso"
fake_sentence = "El rápido zorro marrón amar sobre el perro perezoso"

fake_tokens = tokenizer.tokenize(fake_sentence)
fake_inputs = tokenizer.encode(fake_sentence, return_tensors="pt")
discriminator_outputs = discriminator(fake_inputs)
predictions = torch.round((torch.sign(discriminator_outputs[0]) + 1) / 2)

[print("%7s" % token, end="") for token in fake_tokens]

[print("%7s" % prediction, end="") for prediction in predictions.tolist()]

# Output:
'''
el rapido  zorro  marro    ##n   amar  sobre     el  perro   pere ##zoso    0.0    0.0    0.0    0.0    0.0    0.0    1.0    1.0    0.0    0.0    0.0    0.0    0.0[None, None, None, None, None, None, None, None, None, None, None, None, None
'''

As you can see there are 1s in the places where the model detected a fake token. So, it works! 🎉

Some models fine-tuned on a downstream task 🛠️

Question Answering

POS

NER

Spanish LM model comparison 📊
Dataset Metric RoBERTa-b RoBERTa-l BETO mBERT BERTIN Electricidad-b
UD-POS F1 0.9907 0.9901 0.9900 0.9886 0.9904 0.9818
Conll-NER F1 0.8851 0.8772 0.8759 0.8691 0.8627 0.7954
Capitel-POS F1 0.9846 0.9851 0.9836 0.9839 0.9826 0.9816
Capitel-NER F1 0.8959 0.8998 0.8771 0.8810 0.8741 0.8035
STS Combined 0.8423 0.8420 0.8216 0.8249 0.7822 0.8065
MLDoc Accuracy 0.9595 0.9600 0.9650 0.9560 0.9673 0.9490
PAWS-X F1 0.9035 0.9000 0.8915 0.9020 0.8820 0.9045
XNLI Accuracy 0.8016 0.7958 0.8130 0.7876 0.7864 0.7878
Acknowledgments

I thank 🤗/transformers team for allowing me to train the model (specially to Julien Chaumond ).

Citation

If you want to cite this model you can use this:

@misc{mromero2020electricidad-base-discriminator,
  title={Spanish Electra by Manuel Romero},
  author={Romero, Manuel},
  publisher={Hugging Face},
  journal={Hugging Face Hub},
  howpublished={\url{https://huggingface.co/mrm8488/electricidad-base-discriminator/}},
  year={2020}
}

Created by Manuel Romero/@mrm8488

Made with in Spain

Runs of mrm8488 electricidad-base-discriminator on huggingface.co

51
Total runs
0
24-hour runs
1
3-day runs
2
7-day runs
-279
30-day runs

More Information About electricidad-base-discriminator huggingface.co Model

electricidad-base-discriminator huggingface.co

electricidad-base-discriminator huggingface.co is an AI model on huggingface.co that provides electricidad-base-discriminator's model effect (), which can be used instantly with this mrm8488 electricidad-base-discriminator model. huggingface.co supports a free trial of the electricidad-base-discriminator model, and also provides paid use of the electricidad-base-discriminator. Support call electricidad-base-discriminator model through api, including Node.js, Python, http.

electricidad-base-discriminator huggingface.co Url

https://huggingface.co/mrm8488/electricidad-base-discriminator

mrm8488 electricidad-base-discriminator online free

electricidad-base-discriminator huggingface.co is an online trial and call api platform, which integrates electricidad-base-discriminator's modeling effects, including api services, and provides a free online trial of electricidad-base-discriminator, you can try electricidad-base-discriminator online for free by clicking the link below.

mrm8488 electricidad-base-discriminator online free url in huggingface.co:

https://huggingface.co/mrm8488/electricidad-base-discriminator

electricidad-base-discriminator install

electricidad-base-discriminator is an open source model from GitHub that offers a free installation service, and any user can find electricidad-base-discriminator on GitHub to install. At the same time, huggingface.co provides the effect of electricidad-base-discriminator install, users can directly use electricidad-base-discriminator installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

electricidad-base-discriminator install url in huggingface.co:

https://huggingface.co/mrm8488/electricidad-base-discriminator

Url of electricidad-base-discriminator

electricidad-base-discriminator huggingface.co Url

Provider of electricidad-base-discriminator huggingface.co

mrm8488
ORGANIZATIONS

Other API from mrm8488

huggingface.co

Total runs: 855
Run Growth: 264
Growth Rate: 30.88%
Updated:February 23 2024
huggingface.co

Total runs: 201
Run Growth: 57
Growth Rate: 28.36%
Updated:March 19 2023
huggingface.co

Total runs: 72
Run Growth: 32
Growth Rate: 44.44%
Updated:January 24 2024
huggingface.co

Total runs: 56
Run Growth: 40
Growth Rate: 76.92%
Updated:June 20 2023