Lyon28 / Electra-Small

huggingface.co
Total runs: 3
24-hour runs: 0
7-day runs: 1
30-day runs: 0
Model's Last Updated: June 29 2025

Introduction of Electra-Small

Model Details of Electra-Small

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.

For a detailed description and experimental results, please refer to our paper ELECTRA: Pre-training Text Encoders as Discriminators Rather Than Generators .

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 discriminator in transformers
from transformers import ElectraForPreTraining, ElectraTokenizerFast
import torch

discriminator = ElectraForPreTraining.from_pretrained("google/electra-small-discriminator")
tokenizer = ElectraTokenizerFast.from_pretrained("google/electra-small-discriminator")

sentence = "The quick brown fox jumps over the lazy dog"
fake_sentence = "The quick brown fox fake over the lazy dog"

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" % int(prediction), end="") for prediction in predictions.squeeze().tolist()]

Runs of Lyon28 Electra-Small on huggingface.co

3
Total runs
0
24-hour runs
0
3-day runs
1
7-day runs
0
30-day runs

More Information About Electra-Small huggingface.co Model

More Electra-Small license Visit here:

https://choosealicense.com/licenses/apache-2.0

Electra-Small huggingface.co

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

Electra-Small huggingface.co Url

https://huggingface.co/Lyon28/Electra-Small

Lyon28 Electra-Small online free

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

Lyon28 Electra-Small online free url in huggingface.co:

https://huggingface.co/Lyon28/Electra-Small

Electra-Small install

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

Electra-Small install url in huggingface.co:

https://huggingface.co/Lyon28/Electra-Small

Url of Electra-Small

Electra-Small huggingface.co Url

Provider of Electra-Small huggingface.co

Lyon28
ORGANIZATIONS

Other API from Lyon28

huggingface.co

Total runs: 449
Run Growth: 449
Growth Rate: 100.00%
Updated:December 11 2025
huggingface.co

Total runs: 255
Run Growth: 255
Growth Rate: 100.00%
Updated:December 11 2025
huggingface.co

Total runs: 202
Run Growth: 202
Growth Rate: 100.00%
Updated:December 11 2025
huggingface.co

Total runs: 125
Run Growth: 125
Growth Rate: 100.00%
Updated:December 09 2025
huggingface.co

Total runs: 123
Run Growth: 123
Growth Rate: 100.00%
Updated:December 09 2025
huggingface.co

Total runs: 40
Run Growth: 40
Growth Rate: 100.00%
Updated:December 09 2025
huggingface.co

Total runs: 27
Run Growth: 27
Growth Rate: 100.00%
Updated:December 09 2025
huggingface.co

Total runs: 8
Run Growth: 0
Growth Rate: 0.00%
Updated:July 08 2025
huggingface.co

Total runs: 7
Run Growth: -2
Growth Rate: -28.57%
Updated:July 11 2025
huggingface.co

Total runs: 6
Run Growth: -10
Growth Rate: -166.67%
Updated:August 14 2025
huggingface.co

Total runs: 6
Run Growth: -7
Growth Rate: -116.67%
Updated:August 12 2025
huggingface.co

Total runs: 6
Run Growth: 3
Growth Rate: 50.00%
Updated:July 01 2025
huggingface.co

Total runs: 5
Run Growth: 5
Growth Rate: 100.00%
Updated:May 19 2025
huggingface.co

Total runs: 5
Run Growth: 2
Growth Rate: 40.00%
Updated:January 06 2026
huggingface.co

Total runs: 2
Run Growth: 2
Growth Rate: 100.00%
Updated:May 19 2025
huggingface.co

Total runs: 1
Run Growth: -2
Growth Rate: -200.00%
Updated:June 28 2025
huggingface.co

Total runs: 1
Run Growth: -2
Growth Rate: -200.00%
Updated:July 01 2025
huggingface.co

Total runs: 1
Run Growth: 1
Growth Rate: 100.00%
Updated:May 19 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:December 05 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:July 26 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:December 03 2025