Token Classification
Transformers
Safetensors
Arabic
bert
hadith
sanad
matn
hadith-separator
hadith_separator
islam
hadithBERT
Instructions to use SHK4K/hadith-segmentation-bert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SHK4K/hadith-segmentation-bert with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="SHK4K/hadith-segmentation-bert")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("SHK4K/hadith-segmentation-bert") model = AutoModelForTokenClassification.from_pretrained("SHK4K/hadith-segmentation-bert", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Set real id2label names (B-SANAD/I-SANAD/B-MATN/I-MATN)
Browse files- config.json +9 -9
config.json
CHANGED
|
@@ -12,19 +12,19 @@
|
|
| 12 |
"hidden_dropout_prob": 0.1,
|
| 13 |
"hidden_size": 768,
|
| 14 |
"id2label": {
|
| 15 |
-
"0": "
|
| 16 |
-
"1": "
|
| 17 |
-
"2": "
|
| 18 |
-
"3": "
|
| 19 |
},
|
| 20 |
"initializer_range": 0.02,
|
| 21 |
"intermediate_size": 3072,
|
| 22 |
"is_decoder": false,
|
| 23 |
"label2id": {
|
| 24 |
-
"
|
| 25 |
-
"
|
| 26 |
-
"
|
| 27 |
-
"
|
| 28 |
},
|
| 29 |
"layer_norm_eps": 1e-12,
|
| 30 |
"max_position_embeddings": 512,
|
|
@@ -37,4 +37,4 @@
|
|
| 37 |
"type_vocab_size": 2,
|
| 38 |
"use_cache": false,
|
| 39 |
"vocab_size": 64000
|
| 40 |
-
}
|
|
|
|
| 12 |
"hidden_dropout_prob": 0.1,
|
| 13 |
"hidden_size": 768,
|
| 14 |
"id2label": {
|
| 15 |
+
"0": "B-SANAD",
|
| 16 |
+
"1": "I-SANAD",
|
| 17 |
+
"2": "B-MATN",
|
| 18 |
+
"3": "I-MATN"
|
| 19 |
},
|
| 20 |
"initializer_range": 0.02,
|
| 21 |
"intermediate_size": 3072,
|
| 22 |
"is_decoder": false,
|
| 23 |
"label2id": {
|
| 24 |
+
"B-SANAD": 0,
|
| 25 |
+
"I-SANAD": 1,
|
| 26 |
+
"B-MATN": 2,
|
| 27 |
+
"I-MATN": 3
|
| 28 |
},
|
| 29 |
"layer_norm_eps": 1e-12,
|
| 30 |
"max_position_embeddings": 512,
|
|
|
|
| 37 |
"type_vocab_size": 2,
|
| 38 |
"use_cache": false,
|
| 39 |
"vocab_size": 64000
|
| 40 |
+
}
|