Instructions to use hananour/darija-ner with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hananour/darija-ner with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="hananour/darija-ner")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("hananour/darija-ner") model = AutoModelForTokenClassification.from_pretrained("hananour/darija-ner", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload BertForTokenClassification
Browse files- config.json +18 -20
config.json
CHANGED
|
@@ -9,30 +9,28 @@
|
|
| 9 |
"hidden_dropout_prob": 0.3,
|
| 10 |
"hidden_size": 768,
|
| 11 |
"id2label": {
|
| 12 |
-
"0": "
|
| 13 |
-
"1": "
|
| 14 |
-
"2": "
|
| 15 |
-
"3": "
|
| 16 |
-
"4": "
|
| 17 |
-
"5": "
|
| 18 |
-
"6": "
|
| 19 |
-
"7": "
|
| 20 |
-
"8": "
|
| 21 |
-
"9": "LABEL_9"
|
| 22 |
},
|
| 23 |
"initializer_range": 0.02,
|
| 24 |
"intermediate_size": 3072,
|
| 25 |
"label2id": {
|
| 26 |
-
"
|
| 27 |
-
"
|
| 28 |
-
"
|
| 29 |
-
"
|
| 30 |
-
"
|
| 31 |
-
"
|
| 32 |
-
"
|
| 33 |
-
"
|
| 34 |
-
"
|
| 35 |
-
"LABEL_9": 9
|
| 36 |
},
|
| 37 |
"layer_norm_eps": 1e-12,
|
| 38 |
"max_position_embeddings": 512,
|
|
|
|
| 9 |
"hidden_dropout_prob": 0.3,
|
| 10 |
"hidden_size": 768,
|
| 11 |
"id2label": {
|
| 12 |
+
"0": "B-LOC",
|
| 13 |
+
"1": "O",
|
| 14 |
+
"2": "B-ORG",
|
| 15 |
+
"3": "B-MISC",
|
| 16 |
+
"4": "I-ORG",
|
| 17 |
+
"5": "I-MISC",
|
| 18 |
+
"6": "I-LOC",
|
| 19 |
+
"7": "B-PER",
|
| 20 |
+
"8": "I-PER"
|
|
|
|
| 21 |
},
|
| 22 |
"initializer_range": 0.02,
|
| 23 |
"intermediate_size": 3072,
|
| 24 |
"label2id": {
|
| 25 |
+
"B-LOC": "0",
|
| 26 |
+
"B-MISC": "3",
|
| 27 |
+
"B-ORG": "2",
|
| 28 |
+
"B-PER": "7",
|
| 29 |
+
"I-LOC": "6",
|
| 30 |
+
"I-MISC": "5",
|
| 31 |
+
"I-ORG": "4",
|
| 32 |
+
"I-PER": "8",
|
| 33 |
+
"O": "1"
|
|
|
|
| 34 |
},
|
| 35 |
"layer_norm_eps": 1e-12,
|
| 36 |
"max_position_embeddings": 512,
|