Go Inoue
commited on
Commit
·
a2bb58a
1
Parent(s):
286c8ed
Add model files
Browse files- README.md +44 -0
- config.json +95 -0
- optimizer.pt +3 -0
- pytorch_model.bin +3 -0
- scheduler.pt +3 -0
- special_tokens_map.json +1 -0
- tf_model.h5 +3 -0
- tokenizer_config.json +1 -0
- training_args.bin +3 -0
- vocab.txt +0 -0
README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- ar
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
widget:
|
| 6 |
+
- text: 'عامل ايه ؟'
|
| 7 |
+
---
|
| 8 |
+
# CAMeLBER-Mix POS-EGY Model
|
| 9 |
+
## Model description
|
| 10 |
+
**CAMeLBERT-Mix POS-EGY Model** is a Egyptian Arabic POS tagging model that was built by fine-tuning the [CAMeLBERT-Mix](https://huggingface.co/CAMeL-Lab/bert-base-arabic-camelbert-mix/) model.
|
| 11 |
+
For the fine-tuning, we used the ARZTB dataset .
|
| 12 |
+
Our fine-tuning procedure and the hyperparameters we used can be found in our paper *"[The Interplay of Variant, Size, and Task Type in Arabic Pre-trained Language Models](https://arxiv.org/abs/2103.06678)."* Our fine-tuning code can be found [here](https://github.com/CAMeL-Lab/CAMeLBERT).
|
| 13 |
+
|
| 14 |
+
## Intended uses
|
| 15 |
+
You can use the CAMeLBERT-Mix POS-EGY model as part of the transformers pipeline.
|
| 16 |
+
This model will also be available in [CAMeL Tools](https://github.com/CAMeL-Lab/camel_tools) soon.
|
| 17 |
+
|
| 18 |
+
#### How to use
|
| 19 |
+
To use the model with a transformers pipeline:
|
| 20 |
+
```python
|
| 21 |
+
>>> from transformers import pipeline
|
| 22 |
+
>>> pos = pipeline('text-classification', model='CAMeL-Lab/bert-base-arabic-camelbert-mix-pos-egy')
|
| 23 |
+
>>> text = 'عامل ايه ؟'
|
| 24 |
+
>>> pos(text)
|
| 25 |
+
[{'entity': 'adj', 'score': 0.9972628, 'index': 1, 'word': 'عامل', 'start': 0, 'end': 4}, {'entity': 'pron_interrog', 'score': 0.9525163, 'index': 2, 'word': 'ايه', 'start': 5, 'end': 8}, {'entity': 'punc', 'score': 0.99869114, 'index': 3, 'word': '؟', 'start': 9, 'end': 1
|
| 26 |
+
```
|
| 27 |
+
*Note*: to download our models, you would need `transformers>=3.5.0`. Otherwise, you could download the models
|
| 28 |
+
## Citation
|
| 29 |
+
```bibtex
|
| 30 |
+
@inproceedings{inoue-etal-2021-interplay,
|
| 31 |
+
title = "The Interplay of Variant, Size, and Task Type in {A}rabic Pre-trained Language Models",
|
| 32 |
+
author = "Inoue, Go and
|
| 33 |
+
Alhafni, Bashar and
|
| 34 |
+
Baimukan, Nurpeiis and
|
| 35 |
+
Bouamor, Houda and
|
| 36 |
+
Habash, Nizar",
|
| 37 |
+
booktitle = "Proceedings of the Sixth Arabic Natural Language Processing Workshop",
|
| 38 |
+
month = apr,
|
| 39 |
+
year = "2021",
|
| 40 |
+
address = "Kyiv, Ukraine (Online)",
|
| 41 |
+
publisher = "Association for Computational Linguistics",
|
| 42 |
+
abstract = "In this paper, we explore the effects of language variants, data sizes, and fine-tuning task types in Arabic pre-trained language models. To do so, we build three pre-trained language models across three variants of Arabic: Modern Standard Arabic (MSA), dialectal Arabic, and classical Arabic, in addition to a fourth language model which is pre-trained on a mix of the three. We also examine the importance of pre-training data size by building additional models that are pre-trained on a scaled-down set of the MSA variant. We compare our different models to each other, as well as to eight publicly available models by fine-tuning them on five NLP tasks spanning 12 datasets. Our results suggest that the variant proximity of pre-training data to fine-tuning data is more important than the pre-training data size. We exploit this insight in defining an optimized system selection model for the studied tasks.",
|
| 43 |
+
}
|
| 44 |
+
```
|
config.json
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "/Users/gi372/Research/bert-base-arabic-camelbert-mix-pos-egy",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"BertModel"
|
| 5 |
+
],
|
| 6 |
+
"attention_probs_dropout_prob": 0.1,
|
| 7 |
+
"classifier_dropout": null,
|
| 8 |
+
"gradient_checkpointing": false,
|
| 9 |
+
"hidden_act": "gelu",
|
| 10 |
+
"hidden_dropout_prob": 0.1,
|
| 11 |
+
"hidden_size": 768,
|
| 12 |
+
"id2label": {
|
| 13 |
+
"0": "abbrev",
|
| 14 |
+
"1": "adj",
|
| 15 |
+
"2": "adj_comp",
|
| 16 |
+
"3": "adj_num",
|
| 17 |
+
"4": "adv",
|
| 18 |
+
"5": "adv_interrog",
|
| 19 |
+
"6": "adv_rel",
|
| 20 |
+
"7": "conj",
|
| 21 |
+
"8": "conj_sub",
|
| 22 |
+
"9": "digit",
|
| 23 |
+
"10": "interj",
|
| 24 |
+
"11": "noun",
|
| 25 |
+
"12": "noun_num",
|
| 26 |
+
"13": "noun_prop",
|
| 27 |
+
"14": "noun_quant",
|
| 28 |
+
"15": "part",
|
| 29 |
+
"16": "part_det",
|
| 30 |
+
"17": "part_focus",
|
| 31 |
+
"18": "part_fut",
|
| 32 |
+
"19": "part_interrog",
|
| 33 |
+
"20": "part_neg",
|
| 34 |
+
"21": "part_restrict",
|
| 35 |
+
"22": "part_verb",
|
| 36 |
+
"23": "part_voc",
|
| 37 |
+
"24": "prep",
|
| 38 |
+
"25": "pron",
|
| 39 |
+
"26": "pron_dem",
|
| 40 |
+
"27": "pron_exclam",
|
| 41 |
+
"28": "pron_interrog",
|
| 42 |
+
"29": "pron_rel",
|
| 43 |
+
"30": "punc",
|
| 44 |
+
"31": "verb",
|
| 45 |
+
"32": "verb_pseudo"
|
| 46 |
+
},
|
| 47 |
+
"initializer_range": 0.02,
|
| 48 |
+
"intermediate_size": 3072,
|
| 49 |
+
"label2id": {
|
| 50 |
+
"abbrev": 0,
|
| 51 |
+
"adj": 1,
|
| 52 |
+
"adj_comp": 2,
|
| 53 |
+
"adj_num": 3,
|
| 54 |
+
"adv": 4,
|
| 55 |
+
"adv_interrog": 5,
|
| 56 |
+
"adv_rel": 6,
|
| 57 |
+
"conj": 7,
|
| 58 |
+
"conj_sub": 8,
|
| 59 |
+
"digit": 9,
|
| 60 |
+
"interj": 10,
|
| 61 |
+
"noun": 11,
|
| 62 |
+
"noun_num": 12,
|
| 63 |
+
"noun_prop": 13,
|
| 64 |
+
"noun_quant": 14,
|
| 65 |
+
"part": 15,
|
| 66 |
+
"part_det": 16,
|
| 67 |
+
"part_focus": 17,
|
| 68 |
+
"part_fut": 18,
|
| 69 |
+
"part_interrog": 19,
|
| 70 |
+
"part_neg": 20,
|
| 71 |
+
"part_restrict": 21,
|
| 72 |
+
"part_verb": 22,
|
| 73 |
+
"part_voc": 23,
|
| 74 |
+
"prep": 24,
|
| 75 |
+
"pron": 25,
|
| 76 |
+
"pron_dem": 26,
|
| 77 |
+
"pron_exclam": 27,
|
| 78 |
+
"pron_interrog": 28,
|
| 79 |
+
"pron_rel": 29,
|
| 80 |
+
"punc": 30,
|
| 81 |
+
"verb": 31,
|
| 82 |
+
"verb_pseudo": 32
|
| 83 |
+
},
|
| 84 |
+
"layer_norm_eps": 1e-12,
|
| 85 |
+
"max_position_embeddings": 512,
|
| 86 |
+
"model_type": "bert",
|
| 87 |
+
"num_attention_heads": 12,
|
| 88 |
+
"num_hidden_layers": 12,
|
| 89 |
+
"pad_token_id": 0,
|
| 90 |
+
"position_embedding_type": "absolute",
|
| 91 |
+
"transformers_version": "4.11.3",
|
| 92 |
+
"type_vocab_size": 2,
|
| 93 |
+
"use_cache": true,
|
| 94 |
+
"vocab_size": 30000
|
| 95 |
+
}
|
optimizer.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0fe354f9a7173ab31e15cff9ba589f7b20c3a5b1b679ab786c5aa2529f6e4352
|
| 3 |
+
size 868188464
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bf497a2bccaae682909d724eb0cf7223a9816b3abdfc1c6afaab85a17294b4a6
|
| 3 |
+
size 436481449
|
scheduler.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dc1b98de0211ce68f21b1fbf5dd2548632a2178d14e10c2d109c9c9fc1020309
|
| 3 |
+
size 326
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]"}
|
tf_model.h5
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a328b81f3f69e1a4d18e986b3b4c974298856c496257823ec2497cc37100ffc4
|
| 3 |
+
size 436592640
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"do_lower_case": false, "special_tokens_map_file": null, "full_tokenizer_file": null}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:18006cd10e2cf69f56e6f43b2e22444a5bdf158e402d8911f9305465ccd6077a
|
| 3 |
+
size 1355
|
vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|