
Ru-ELECTRA
Language304 ops42.4M params
An ELECTRA text encoder, pre-trained to detect which input tokens were replaced.
Language · 304 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
How this diagram was made
transformers.AutoModelForMaskedLM.from_config()
This model is ELECTRA with a masked language modeling head; in the paper, the generator is usually a small masked language model that is trained jointly with the discriminator.
About this model's family
ELECTRA is a method for pre-training text encoders with a task called replaced token detection. Instead of masking the input, it corrupts the text by replacing some tokens with plausible alternatives sampled from a small generator network. A discriminator then predicts, for each token, whether it was replaced by a generator sample or not. The paper argues this is more efficient than masked language modeling (MLM) because the task is defined over all input tokens rather than just the small subset that was masked out.
The name stands for Efficiently Learning an Encoder that Classifies Token Replacements Accurately. Although the two networks are structured like a GAN, the generator is trained with maximum likelihood rather than adversarially. After pre-training, the generator is thrown out and only the discriminator is fine-tuned on downstream tasks.
The paper reports that a model trained on one GPU for 4 days outperforms GPT on the GLUE natural language understanding benchmark. At scale, it reports performing comparably to RoBERTa and XLNet while using less than 1/4 of their compute.
Key idea. The paper replaces masked language modeling with replaced token detection, training a discriminator to tell original tokens from ones substituted by a small generator network.
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
@misc{clark2020electrapretrainingtextencoders,
title={ELECTRA: Pre-training Text Encoders as Discriminators Rather Than Generators},
author={Kevin Clark and Minh-Thang Luong and Quoc V. Le and Christopher D. Manning},
year={2020},
eprint={2003.10555},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2003.10555},
}