ELECTRA: Pre-training Text Encoders as Discriminators Rather Than Generators
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.
This repository contains code to pre-train ELECTRA, including small ELECTRA models on a single GPU. It also supports fine-tuning ELECTRA on downstream tasks including classification tasks (e.g,.
GLUE
), QA tasks (e.g.,
SQuAD
), and sequence tagging tasks (e.g.,
text chunking
).
How to use the generator in
transformers
from transformers import pipeline
fill_mask = pipeline(
"fill-mask",
model="google/electra-large-generator",
tokenizer="google/electra-large-generator"
)
print(
fill_mask(f"HuggingFace is creating a {nlp.tokenizer.mask_token} that the community uses to solve NLP tasks.")
)
Runs of google electra-large-generator on huggingface.co
778
Total runs
0
24-hour runs
64
3-day runs
155
7-day runs
232
30-day runs
More Information About electra-large-generator huggingface.co Model
electra-large-generator huggingface.co is an AI model on huggingface.co that provides electra-large-generator's model effect (), which can be used instantly with this google electra-large-generator model. huggingface.co supports a free trial of the electra-large-generator model, and also provides paid use of the electra-large-generator. Support call electra-large-generator model through api, including Node.js, Python, http.
electra-large-generator huggingface.co is an online trial and call api platform, which integrates electra-large-generator's modeling effects, including api services, and provides a free online trial of electra-large-generator, you can try electra-large-generator online for free by clicking the link below.
google electra-large-generator online free url in huggingface.co:
electra-large-generator is an open source model from GitHub that offers a free installation service, and any user can find electra-large-generator on GitHub to install. At the same time, huggingface.co provides the effect of electra-large-generator install, users can directly use electra-large-generator installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
electra-large-generator install url in huggingface.co: