Spaces:
Configuration error
Configuration error
Upload 8 files
Browse files- README.md +88 -16
- config.json +48 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +14 -0
- training_args.bin +3 -0
- vocab.txt +0 -0
README.md
CHANGED
|
@@ -1,19 +1,91 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
-
|
| 12 |
-
-
|
| 13 |
-
-
|
| 14 |
-
|
| 15 |
-
-
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
---
|
| 18 |
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
tags:
|
| 4 |
+
- generated_from_trainer
|
| 5 |
+
datasets:
|
| 6 |
+
- conll2003
|
| 7 |
+
metrics:
|
| 8 |
+
- precision
|
| 9 |
+
- recall
|
| 10 |
+
- f1
|
| 11 |
+
- accuracy
|
| 12 |
+
model-index:
|
| 13 |
+
- name: dark-bert-finetuned-ner
|
| 14 |
+
results:
|
| 15 |
+
- task:
|
| 16 |
+
name: Token Classification
|
| 17 |
+
type: token-classification
|
| 18 |
+
dataset:
|
| 19 |
+
name: conll2003
|
| 20 |
+
type: conll2003
|
| 21 |
+
config: conll2003
|
| 22 |
+
split: train
|
| 23 |
+
args: conll2003
|
| 24 |
+
metrics:
|
| 25 |
+
- name: Precision
|
| 26 |
+
type: precision
|
| 27 |
+
value: 0.928300642821823
|
| 28 |
+
- name: Recall
|
| 29 |
+
type: recall
|
| 30 |
+
value: 0.9478290138000673
|
| 31 |
+
- name: F1
|
| 32 |
+
type: f1
|
| 33 |
+
value: 0.9379631942709634
|
| 34 |
+
- name: Accuracy
|
| 35 |
+
type: accuracy
|
| 36 |
+
value: 0.9859009831047272
|
| 37 |
---
|
| 38 |
|
| 39 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 40 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 41 |
+
|
| 42 |
+
# dark-bert-finetuned-ner
|
| 43 |
+
|
| 44 |
+
This model is a fine-tuned version of [bert-base-cased](https://huggingface.co/bert-base-cased) on the conll2003 dataset.
|
| 45 |
+
It achieves the following results on the evaluation set:
|
| 46 |
+
- Loss: 0.0639
|
| 47 |
+
- Precision: 0.9283
|
| 48 |
+
- Recall: 0.9478
|
| 49 |
+
- F1: 0.9380
|
| 50 |
+
- Accuracy: 0.9859
|
| 51 |
+
|
| 52 |
+
## Model description
|
| 53 |
+
|
| 54 |
+
More information needed
|
| 55 |
+
|
| 56 |
+
## Intended uses & limitations
|
| 57 |
+
|
| 58 |
+
More information needed
|
| 59 |
+
|
| 60 |
+
## Training and evaluation data
|
| 61 |
+
|
| 62 |
+
More information needed
|
| 63 |
+
|
| 64 |
+
## Training procedure
|
| 65 |
+
|
| 66 |
+
### Training hyperparameters
|
| 67 |
+
|
| 68 |
+
The following hyperparameters were used during training:
|
| 69 |
+
- learning_rate: 2e-05
|
| 70 |
+
- train_batch_size: 8
|
| 71 |
+
- eval_batch_size: 8
|
| 72 |
+
- seed: 42
|
| 73 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 74 |
+
- lr_scheduler_type: linear
|
| 75 |
+
- num_epochs: 3
|
| 76 |
+
|
| 77 |
+
### Training results
|
| 78 |
+
|
| 79 |
+
| Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 | Accuracy |
|
| 80 |
+
|:-------------:|:-----:|:----:|:---------------:|:---------:|:------:|:------:|:--------:|
|
| 81 |
+
| 0.0881 | 1.0 | 1756 | 0.0716 | 0.9172 | 0.9322 | 0.9246 | 0.9817 |
|
| 82 |
+
| 0.0375 | 2.0 | 3512 | 0.0610 | 0.9275 | 0.9455 | 0.9364 | 0.9857 |
|
| 83 |
+
| 0.0207 | 3.0 | 5268 | 0.0639 | 0.9283 | 0.9478 | 0.9380 | 0.9859 |
|
| 84 |
+
|
| 85 |
+
|
| 86 |
+
### Framework versions
|
| 87 |
+
|
| 88 |
+
- Transformers 4.22.1
|
| 89 |
+
- Pytorch 1.10.0
|
| 90 |
+
- Datasets 2.5.1
|
| 91 |
+
- Tokenizers 0.12.1
|
config.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "bert-base-cased",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"BertForTokenClassification"
|
| 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": "O",
|
| 14 |
+
"1": "B-PER",
|
| 15 |
+
"2": "I-PER",
|
| 16 |
+
"3": "B-ORG",
|
| 17 |
+
"4": "I-ORG",
|
| 18 |
+
"5": "B-LOC",
|
| 19 |
+
"6": "I-LOC",
|
| 20 |
+
"7": "B-MISC",
|
| 21 |
+
"8": "I-MISC"
|
| 22 |
+
},
|
| 23 |
+
"initializer_range": 0.02,
|
| 24 |
+
"intermediate_size": 3072,
|
| 25 |
+
"label2id": {
|
| 26 |
+
"B-LOC": "5",
|
| 27 |
+
"B-MISC": "7",
|
| 28 |
+
"B-ORG": "3",
|
| 29 |
+
"B-PER": "1",
|
| 30 |
+
"I-LOC": "6",
|
| 31 |
+
"I-MISC": "8",
|
| 32 |
+
"I-ORG": "4",
|
| 33 |
+
"I-PER": "2",
|
| 34 |
+
"O": "0"
|
| 35 |
+
},
|
| 36 |
+
"layer_norm_eps": 1e-12,
|
| 37 |
+
"max_position_embeddings": 512,
|
| 38 |
+
"model_type": "bert",
|
| 39 |
+
"num_attention_heads": 12,
|
| 40 |
+
"num_hidden_layers": 12,
|
| 41 |
+
"pad_token_id": 0,
|
| 42 |
+
"position_embedding_type": "absolute",
|
| 43 |
+
"torch_dtype": "float32",
|
| 44 |
+
"transformers_version": "4.22.1",
|
| 45 |
+
"type_vocab_size": 2,
|
| 46 |
+
"use_cache": true,
|
| 47 |
+
"vocab_size": 28996
|
| 48 |
+
}
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f81344e728f5a18bf527fc1c141e71c6554ae790d2c2fc5e068fee0713ac1e19
|
| 3 |
+
size 134
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cls_token": "[CLS]",
|
| 3 |
+
"mask_token": "[MASK]",
|
| 4 |
+
"pad_token": "[PAD]",
|
| 5 |
+
"sep_token": "[SEP]",
|
| 6 |
+
"unk_token": "[UNK]"
|
| 7 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cls_token": "[CLS]",
|
| 3 |
+
"do_lower_case": false,
|
| 4 |
+
"mask_token": "[MASK]",
|
| 5 |
+
"model_max_length": 512,
|
| 6 |
+
"name_or_path": "bert-base-cased",
|
| 7 |
+
"pad_token": "[PAD]",
|
| 8 |
+
"sep_token": "[SEP]",
|
| 9 |
+
"special_tokens_map_file": null,
|
| 10 |
+
"strip_accents": null,
|
| 11 |
+
"tokenize_chinese_chars": true,
|
| 12 |
+
"tokenizer_class": "BertTokenizer",
|
| 13 |
+
"unk_token": "[UNK]"
|
| 14 |
+
}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f4ea86c3e8509c5fef6d6b91a39c5f8e73fb0cc9bca85d28f63529a95d83a912
|
| 3 |
+
size 129
|
vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|