Run this model with HF Jobs
Run CAMeL-Lab/bert-base-arabic-camelbert-da 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/CAMeL-Lab/bert-base-arabic-camelbert-da. 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/CAMeL-Lab/bert-base-arabic-camelbert-da 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 CAMeL-Lab/bert-base-arabic-camelbert-da with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CAMeL-Lab/bert-base-arabic-camelbert-da with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="CAMeL-Lab/bert-base-arabic-camelbert-da")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("CAMeL-Lab/bert-base-arabic-camelbert-da") model = AutoModelForMaskedLM.from_pretrained("CAMeL-Lab/bert-base-arabic-camelbert-da", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Go Inoue commited on
Commit ·
9706a73
1
Parent(s): fd39d7b
Fix typo
Browse files2 unmodified lines34567891011125 unmodified lines1819202122232412 unmodified lines3738394041424344454647484950515253545556575859606162631 unmodified line656667686970713 unmodified lines757677787980812 unmodified lines- arlicense: apache-2.0widget:- text: "\UTF{0627}\UTF{0644}\UTF{0647}\UTF{062F}\UTF{0641} \UTF{0645}\UTF{0646} \UTF{0627}\UTF{0644}\UTF{062D}\UTF{064A}\UTF{0627}\UTF{0629} \UTF{0647}\UTF{0648} [MASK] ."---# bert-base-camelbert-msa## Model description5 unmodified lines|-|-|:-:|-:|-:|||`bert-base-camelbert-mix`|CA,DA,MSA|167GB|17.3B|||`bert-base-camelbert-ca`|CA|6GB|847M||\UTF{2714}|`bert-base-camelbert-da`|DA|54GB|5.8B|||`bert-base-camelbert-msa`|MSA|107GB|12.6B|||`bert-base-camelbert-msa-half`|MSA|53GB|6.3B|||`bert-base-camelbert-msa-quarter`|MSA|27GB|3.1B|12 unmodified lines```python>>> from transformers import pipeline>>> unmasker = pipeline('fill-mask', model='CAMeL-Lab/bert-base-camelbert-da')>>> unmasker("\UTF{0627}\UTF{0644}\UTF{0647}\UTF{062F}\UTF{0641} \UTF{0645}\UTF{0646} \UTF{0627}\UTF{0644}\UTF{062D}\UTF{064A}\UTF{0627}\UTF{0629} \UTF{0647}\UTF{0648} [MASK] .")[{'sequence': '[CLS] \UTF{0627}\UTF{0644}\UTF{0647}\UTF{062F}\UTF{0641} \UTF{0645}\UTF{0646} \UTF{0627}\UTF{0644}\UTF{062D}\UTF{064A}\UTF{0627}\UTF{0629} \UTF{0647}\UTF{0648}.. [SEP]','score': 0.062508225440979,'token': 18,'token_str': '.'},{'sequence': '[CLS] \UTF{0627}\UTF{0644}\UTF{0647}\UTF{062F}\UTF{0641} \UTF{0645}\UTF{0646} \UTF{0627}\UTF{0644}\UTF{062D}\UTF{064A}\UTF{0627}\UTF{0629} \UTF{0647}\UTF{0648} \UTF{0627}\UTF{0644}\UTF{0645}\UTF{0648}\UTF{062A}. [SEP]','score': 0.033172328025102615,'token': 4295,'token_str': '\UTF{0627}\UTF{0644}\UTF{0645}\UTF{0648}\UTF{062A}'},{'sequence': '[CLS] \UTF{0627}\UTF{0644}\UTF{0647}\UTF{062F}\UTF{0641} \UTF{0645}\UTF{0646} \UTF{0627}\UTF{0644}\UTF{062D}\UTF{064A}\UTF{0627}\UTF{0629} \UTF{0647}\UTF{0648} \UTF{0627}\UTF{0644}\UTF{062D}\UTF{064A}\UTF{0627}\UTF{0629}. [SEP]','score': 0.029575437307357788,'token': 3696,'token_str': '\UTF{0627}\UTF{0644}\UTF{062D}\UTF{064A}\UTF{0627}\UTF{0629}'},{'sequence': '[CLS] \UTF{0627}\UTF{0644}\UTF{0647}\UTF{062F}\UTF{0641} \UTF{0645}\UTF{0646} \UTF{0627}\UTF{0644}\UTF{062D}\UTF{064A}\UTF{0627}\UTF{0629} \UTF{0647}\UTF{0648} \UTF{0627}\UTF{0644}\UTF{0631}\UTF{062D}\UTF{064A}\UTF{0644}. [SEP]','score': 0.02724040113389492,'token': 11449,'token_str': '\UTF{0627}\UTF{0644}\UTF{0631}\UTF{062D}\UTF{064A}\UTF{0644}'},{'sequence': '[CLS] \UTF{0627}\UTF{0644}\UTF{0647}\UTF{062F}\UTF{0641} \UTF{0645}\UTF{0646} \UTF{0627}\UTF{0644}\UTF{062D}\UTF{064A}\UTF{0627}\UTF{0629} \UTF{0647}\UTF{0648} \UTF{0627}\UTF{0644}\UTF{062D}\UTF{0628}. [SEP]','score': 0.01564178802073002,'token': 3088,'token_str': '\UTF{0627}\UTF{0644}\UTF{062D}\UTF{0628}'}]```Here is how to use this model to get the features of a given text in PyTorch:1 unmodified linefrom transformers import AutoTokenizer, AutoModeltokenizer = AutoTokenizer.from_pretrained('CAMeL-Lab/bert-base-camelbert-da')model = AutoModel.from_pretrained('CAMeL-Lab/bert-base-camelbert-da')text = "\UTF{0645}\UTF{0631}\UTF{062D}\UTF{0628}\UTF{0627} \UTF{064A}\UTF{0627} \UTF{0639}\UTF{0627}\UTF{0644}\UTF{0645}."encoded_input = tokenizer(text, return_tensors='pt')output = model(**encoded_input)```3 unmodified linesfrom transformers import AutoTokenizer, TFAutoModeltokenizer = AutoTokenizer.from_pretrained('CAMeL-Lab/bert-base-camelbert-da')model = TFAutoModel.from_pretrained('CAMeL-Lab/bert-base-camelbert-da')text = "\UTF{0645}\UTF{0631}\UTF{062D}\UTF{0628}\UTF{0627} \UTF{064A}\UTF{0627} \UTF{0639}\UTF{0627}\UTF{0644}\UTF{0645}."encoded_input = tokenizer(text, return_tensors='tf')output = model(encoded_input)```2 unmodified lines34567891011125 unmodified lines1819202122232412 unmodified lines3738394041424344454647484950515253545556575859606162631 unmodified line656667686970713 unmodified lines757677787980812 unmodified lines- arlicense: apache-2.0widget:- text: "الهدف من الحياة هو [MASK] ."---# CAMeLBERT-DA## Model description5 unmodified lines|-|-|:-:|-:|-:|||`bert-base-camelbert-mix`|CA,DA,MSA|167GB|17.3B|||`bert-base-camelbert-ca`|CA|6GB|847M||✔|`bert-base-camelbert-da`|DA|54GB|5.8B|||`bert-base-camelbert-msa`|MSA|107GB|12.6B|||`bert-base-camelbert-msa-half`|MSA|53GB|6.3B|||`bert-base-camelbert-msa-quarter`|MSA|27GB|3.1B|12 unmodified lines```python>>> from transformers import pipeline>>> unmasker = pipeline('fill-mask', model='CAMeL-Lab/bert-base-camelbert-da')>>> unmasker("الهدف من الحياة هو [MASK] .")[{'sequence': '[CLS] الهدف من الحياة هو.. [SEP]','score': 0.062508225440979,'token': 18,'token_str': '.'},{'sequence': '[CLS] الهدف من الحياة هو الموت. [SEP]','score': 0.033172328025102615,'token': 4295,'token_str': 'الموت'},{'sequence': '[CLS] الهدف من الحياة هو الحياة. [SEP]','score': 0.029575437307357788,'token': 3696,'token_str': 'الحياة'},{'sequence': '[CLS] الهدف من الحياة هو الرحيل. [SEP]','score': 0.02724040113389492,'token': 11449,'token_str': 'الرحيل'},{'sequence': '[CLS] الهدف من الحياة هو الحب. [SEP]','score': 0.01564178802073002,'token': 3088,'token_str': 'الحب'}]```Here is how to use this model to get the features of a given text in PyTorch:1 unmodified linefrom transformers import AutoTokenizer, AutoModeltokenizer = AutoTokenizer.from_pretrained('CAMeL-Lab/bert-base-camelbert-da')model = AutoModel.from_pretrained('CAMeL-Lab/bert-base-camelbert-da')text = "مرحبا يا عالم."encoded_input = tokenizer(text, return_tensors='pt')output = model(**encoded_input)```3 unmodified linesfrom transformers import AutoTokenizer, TFAutoModeltokenizer = AutoTokenizer.from_pretrained('CAMeL-Lab/bert-base-camelbert-da')model = TFAutoModel.from_pretrained('CAMeL-Lab/bert-base-camelbert-da')text = "مرحبا يا عالم."encoded_input = tokenizer(text, return_tensors='tf')output = model(encoded_input)```
README.md+15-15