aubmindlab / araelectra-base-generator

huggingface.co
Total runs: 114
24-hour runs: 0
7-day runs: -8
30-day runs: 40
Model's Last Updated: March 22 2023
fill-mask

Introduction of araelectra-base-generator

Model Details of araelectra-base-generator

AraELECTRA

ELECTRA is a 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 . AraELECTRA achieves state-of-the-art results on Arabic QA dataset.

For a detailed description, please refer to the AraELECTRA paper AraELECTRA: Pre-Training Text Discriminators for Arabic Language Understanding .

How to use the generator in transformers
from transformers import pipeline

fill_mask = pipeline(
    "fill-mask",
    model="aubmindlab/araelectra-base-generator",
    tokenizer="aubmindlab/araelectra-base-generator"
)

print(
    fill_mask(" عاصمة لبنان هي [MASK] .)
)

Preprocessing

It is recommended to apply our preprocessing function before training/testing on any dataset.

Install the arabert python package to segment text for AraBERT v1 & v2 or to clean your data pip install arabert

from arabert.preprocess import ArabertPreprocessor

model_name="aubmindlab/araelectra-base"
arabert_prep = ArabertPreprocessor(model_name=model_name)

text = "ولن نبالغ إذا قلنا إن هاتف أو كمبيوتر المكتب في زمننا هذا ضروري"
arabert_prep.preprocess(text)

>>> output: ولن نبالغ إذا قلنا : إن هاتف أو كمبيوتر المكتب في زمننا هذا ضروري

Model

Model HuggingFace Model Name Size (MB/Params)
AraELECTRA-base-generator araelectra-base-generator 227MB/60M
AraELECTRA-base-discriminator araelectra-base-discriminator 516MB/135M

Compute

Model Hardware num of examples (seq len = 512) Batch Size Num of Steps Time (in days)
AraELECTRA-base TPUv3-8 - 256 2M 24

Dataset

The pretraining data used for the new AraELECTRA model is also used for AraGPT2 and AraELECTRA .

The dataset consists of 77GB or 200,095,961 lines or 8,655,948,860 words or 82,232,988,358 chars (before applying Farasa Segmentation)

For the new dataset we added the unshuffled OSCAR corpus, after we thoroughly filter it, to the previous dataset used in AraBERTv1 but with out the websites that we previously crawled:

TensorFlow 1.x models

You can find the PyTorch, TF2 and TF1 models in HuggingFace's Transformer Library under the aubmindlab username

  • wget https://huggingface.co/aubmindlab/MODEL_NAME/resolve/main/tf1_model.tar.gz where MODEL_NAME is any model under the aubmindlab name

If you used this model please cite us as :

@inproceedings{antoun-etal-2021-araelectra,
    title = "{A}ra{ELECTRA}: Pre-Training Text Discriminators for {A}rabic Language Understanding",
    author = "Antoun, Wissam  and
      Baly, Fady  and
      Hajj, Hazem",
    booktitle = "Proceedings of the Sixth Arabic Natural Language Processing Workshop",
    month = apr,
    year = "2021",
    address = "Kyiv, Ukraine (Virtual)",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/2021.wanlp-1.20",
    pages = "191--195",
}

Acknowledgments

Thanks to TensorFlow Research Cloud (TFRC) for the free access to Cloud TPUs, couldn't have done it without this program, and to the AUB MIND Lab Members for the continous support. Also thanks to Yakshof and Assafir for data and storage access. Another thanks for Habib Rahal ( https://www.behance.net/rahalhabib ), for putting a face to AraBERT.

Contacts

Wissam Antoun : Linkedin | Twitter | Github | [email protected] | [email protected]

Fady Baly : Linkedin | Twitter | Github | [email protected] | [email protected]

Runs of aubmindlab araelectra-base-generator on huggingface.co

114
Total runs
0
24-hour runs
0
3-day runs
-8
7-day runs
40
30-day runs

More Information About araelectra-base-generator huggingface.co Model

araelectra-base-generator huggingface.co

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

araelectra-base-generator huggingface.co Url

https://huggingface.co/aubmindlab/araelectra-base-generator

aubmindlab araelectra-base-generator online free

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

aubmindlab araelectra-base-generator online free url in huggingface.co:

https://huggingface.co/aubmindlab/araelectra-base-generator

araelectra-base-generator install

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

araelectra-base-generator install url in huggingface.co:

https://huggingface.co/aubmindlab/araelectra-base-generator

Url of araelectra-base-generator

araelectra-base-generator huggingface.co Url

Provider of araelectra-base-generator huggingface.co

aubmindlab
ORGANIZATIONS

Other API from aubmindlab