mrm8488 / electricidad-small-discriminator

huggingface.co
Total runs: 114
24-hour runs: -1
7-day runs: 2
30-day runs: 52
Model's Last Updated: March 31 2022

Introduction of electricidad-small-discriminator

Model Details of electricidad-small-discriminator

ELECTRICIDAD: The Spanish Electra Imgur

ELECTRICIDAD is a small 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 ⚙
Param # Value
Layers \t12
Hidden 256 \t
Params 14M
Evaluation metrics (for discriminator) 🧾
Metric # Score
Accuracy 0.94
Precision 0.76
AUC 0.92
Benchmarks 🔨

WIP 🚧

How to use the discriminator in transformers
from transformers import ElectraForPreTraining, ElectraTokenizerFast
import torch

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

sentence = "el zorro rojo es muy rápido"
fake_sentence = "el zorro rojo es muy ser"

fake_tokens = tokenizer.tokenize(sentence)
fake_inputs = tokenizer.encode(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" % int(prediction), end="") for prediction in predictions.tolist()[1:-1]]

# Output:
'''
el  zorro   rojo     es    muy    ser      0      0      0      0      0      1[None, None, None, None, None, None]
'''

As you can see there is a 1 in the place where the model detected the fake token ( ser ). So, it works! 🎉

Electricidad-small fine-tuned models

Acknowledgments

I thank 🤗/transformers team for answering my doubts and Google for helping me with the TensorFlow Research Cloud program.

Citation

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

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

Created by Manuel Romero/@mrm8488

Made with ♥ in Spain

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

114
Total runs
-1
24-hour runs
1
3-day runs
2
7-day runs
52
30-day runs

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

electricidad-small-discriminator huggingface.co

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

electricidad-small-discriminator huggingface.co Url

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

mrm8488 electricidad-small-discriminator online free

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

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

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

electricidad-small-discriminator install

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

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

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

Url of electricidad-small-discriminator

electricidad-small-discriminator huggingface.co Url

Provider of electricidad-small-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: 793
Run Growth: 592
Growth Rate: 74.65%
Updated:March 19 2023
huggingface.co

Total runs: 101
Run Growth: 48
Growth Rate: 48.00%
Updated:June 20 2023
huggingface.co

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

Total runs: 57
Run Growth: 33
Growth Rate: 62.26%
Updated:May 21 2021