Token Classification
Transformers
TensorBoard
Arabic
bert
fill-mask
Named Entity Recognition
Arabic NER
Nested NER
Instructions to use SinaLab/ArabicNER-Wojood with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SinaLab/ArabicNER-Wojood with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="SinaLab/ArabicNER-Wojood")# Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("SinaLab/ArabicNER-Wojood") model = AutoModelForMaskedLM.from_pretrained("SinaLab/ArabicNER-Wojood", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| { | |
| "output_path": "/var/home/nhamad/WojoodData/output-nested", | |
| "train_path": "/var/home/nhamad/WojoodData/nested/train.txt", | |
| "val_path": "/var/home/nhamad/WojoodData/nested/val.txt", | |
| "test_path": "/var/home/nhamad/WojoodData/nested/test.txt", | |
| "bert_model": "aubmindlab/bert-base-arabertv2", | |
| "gpus": [ | |
| 0 | |
| ], | |
| "log_interval": 10, | |
| "batch_size": 8, | |
| "num_workers": 0, | |
| "data_config": { | |
| "fn": "arabiner.data.datasets.NestedTagsDataset", | |
| "kwargs": { | |
| "max_seq_len": 512 | |
| } | |
| }, | |
| "trainer_config": { | |
| "fn": "arabiner.trainers.BertNestedTrainer", | |
| "kwargs": { | |
| "max_epochs": 50 | |
| } | |
| }, | |
| "network_config": { | |
| "fn": "arabiner.nn.BertNestedTagger", | |
| "kwargs": { | |
| "dropout": 0.1, | |
| "bert_model": "aubmindlab/bert-base-arabertv2", | |
| "num_labels": [ | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4 | |
| ] | |
| } | |
| }, | |
| "optimizer": { | |
| "fn": "torch.optim.AdamW", | |
| "kwargs": { | |
| "lr": 0.0001 | |
| } | |
| }, | |
| "lr_scheduler": { | |
| "fn": "torch.optim.lr_scheduler.ExponentialLR", | |
| "kwargs": { | |
| "gamma": 1 | |
| } | |
| }, | |
| "loss": { | |
| "fn": "torch.nn.CrossEntropyLoss", | |
| "kwargs": {} | |
| }, | |
| "overwrite": false, | |
| "seed": 1 | |
| } |