Run this model with HF Jobs
Run aubmindlab/araelectra-base-generator on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/aubmindlab/araelectra-base-generator. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/aubmindlab/araelectra-base-generator on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use aubmindlab/araelectra-base-generator with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use aubmindlab/araelectra-base-generator with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="aubmindlab/araelectra-base-generator")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("aubmindlab/araelectra-base-generator") model = AutoModelForMaskedLM.from_pretrained("aubmindlab/araelectra-base-generator", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
23e2aff
1
Parent(s): d276459
added citation
Browse files20 unmodified lines2122232425262728293031323340 unmodified lines747576777879808182838485868788899091929394959697989910010110210310410510610720 unmodified linesfrom transformers import pipelinefill_mask = pipeline("fill-mask",model="aubmindlab/araelectra-base-generator",tokenizer="aubmindlab/araelectra-base-generator")print(fill_mask(" عاصمة لبنان هي [MASK] .))```40 unmodified lines# TensorFlow 1.x modelsThe TF1.x model are available in the HuggingFace models repo.You can download them as follows:- via git-lfs: clone all the models in a repo```bashcurl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bashsudo apt-get install git-lfsgit lfs installgit clone https://huggingface.co/aubmindlab/MODEL_NAMEtar -C ./MODEL_NAME -zxvf /content/MODEL_NAME/tf1_model.tar.gz```where `MODEL_NAME` is any model under the `aubmindlab` name- via `wget`:- Go to the tf1_model.tar.gz file on huggingface.co/models/aubmindlab/MODEL_NAME.- copy the `oid sha256`- then run `wget https://cdn-lfs.huggingface.co/aubmindlab/aragpt2-base/INSERT_THE_SHA_HERE` (ex: for `aragpt2-base`: `wget https://cdn-lfs.huggingface.co/aubmindlab/aragpt2-base/3766fc03d7c2593ff2fb991d275e96b81b0ecb2098b71ff315611d052ce65248`)# If you used this model please cite us as :```@misc{antoun2020aragpt2,title={AraGPT2: Pre-Trained Transformer for Arabic Language Generation},author={Wissam Antoun and Fady Baly and Hazem Hajj},year={2020},eprint={2012.15520},archivePrefix={arXiv},primaryClass={cs.CL}}```20 unmodified lines2122232425262728293031323340 unmodified lines747576777879808182838485868788899091929394959697989920 unmodified linesfrom transformers import pipelinefill_mask = pipeline("fill-mask",model="aubmindlab/araelectra-base-generator",tokenizer="aubmindlab/araelectra-base-generator")print(fill_mask(" عاصمة لبنان هي [MASK] .))```40 unmodified lines# 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 andBaly, Fady andHajj, 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",}```
README.md+18-26