End of training
Browse files- README.md +116 -0
- config.json +79 -0
- model.safetensors +3 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +56 -0
- training_args.bin +3 -0
- vocab.txt +0 -0
README.md
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
base_model: google-bert/bert-base-chinese
|
| 4 |
+
tags:
|
| 5 |
+
- generated_from_trainer
|
| 6 |
+
metrics:
|
| 7 |
+
- precision
|
| 8 |
+
- recall
|
| 9 |
+
- f1
|
| 10 |
+
- accuracy
|
| 11 |
+
model-index:
|
| 12 |
+
- name: ner_based_bert-base-chinese
|
| 13 |
+
results: []
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 17 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 18 |
+
|
| 19 |
+
# ner_based_bert-base-chinese
|
| 20 |
+
|
| 21 |
+
This model is a fine-tuned version of [google-bert/bert-base-chinese](https://huggingface.co/google-bert/bert-base-chinese) on the None dataset.
|
| 22 |
+
It achieves the following results on the evaluation set:
|
| 23 |
+
- Loss: 0.1461
|
| 24 |
+
- Precision: 0.9651
|
| 25 |
+
- Recall: 0.9712
|
| 26 |
+
- F1: 0.9681
|
| 27 |
+
- Accuracy: 0.9873
|
| 28 |
+
|
| 29 |
+
## Model description
|
| 30 |
+
|
| 31 |
+
More information needed
|
| 32 |
+
|
| 33 |
+
## Intended uses & limitations
|
| 34 |
+
|
| 35 |
+
More information needed
|
| 36 |
+
|
| 37 |
+
## Training and evaluation data
|
| 38 |
+
|
| 39 |
+
More information needed
|
| 40 |
+
|
| 41 |
+
## Training procedure
|
| 42 |
+
|
| 43 |
+
### Training hyperparameters
|
| 44 |
+
|
| 45 |
+
The following hyperparameters were used during training:
|
| 46 |
+
- learning_rate: 2e-05
|
| 47 |
+
- train_batch_size: 16
|
| 48 |
+
- eval_batch_size: 16
|
| 49 |
+
- seed: 42
|
| 50 |
+
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 51 |
+
- lr_scheduler_type: linear
|
| 52 |
+
- num_epochs: 50
|
| 53 |
+
- mixed_precision_training: Native AMP
|
| 54 |
+
|
| 55 |
+
### Training results
|
| 56 |
+
|
| 57 |
+
| Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 | Accuracy |
|
| 58 |
+
|:-------------:|:-----:|:-----:|:---------------:|:---------:|:------:|:------:|:--------:|
|
| 59 |
+
| No log | 1.0 | 367 | 0.1262 | 0.9355 | 0.9449 | 0.9401 | 0.9738 |
|
| 60 |
+
| 0.0701 | 2.0 | 734 | 0.0725 | 0.9663 | 0.9687 | 0.9675 | 0.9867 |
|
| 61 |
+
| 0.0494 | 3.0 | 1101 | 0.0769 | 0.9663 | 0.9712 | 0.9688 | 0.9871 |
|
| 62 |
+
| 0.0494 | 4.0 | 1468 | 0.0902 | 0.9653 | 0.9749 | 0.9701 | 0.9880 |
|
| 63 |
+
| 0.0306 | 5.0 | 1835 | 0.0796 | 0.9665 | 0.9749 | 0.9707 | 0.9876 |
|
| 64 |
+
| 0.0245 | 6.0 | 2202 | 0.0968 | 0.9509 | 0.9699 | 0.9603 | 0.9847 |
|
| 65 |
+
| 0.0221 | 7.0 | 2569 | 0.0956 | 0.9638 | 0.9674 | 0.9656 | 0.9864 |
|
| 66 |
+
| 0.0221 | 8.0 | 2936 | 0.0983 | 0.9698 | 0.9662 | 0.9680 | 0.9877 |
|
| 67 |
+
| 0.0154 | 9.0 | 3303 | 0.0958 | 0.9589 | 0.9649 | 0.9619 | 0.9867 |
|
| 68 |
+
| 0.0145 | 10.0 | 3670 | 0.1168 | 0.9614 | 0.9674 | 0.9644 | 0.9861 |
|
| 69 |
+
| 0.0104 | 11.0 | 4037 | 0.1010 | 0.9653 | 0.9762 | 0.9707 | 0.9883 |
|
| 70 |
+
| 0.0104 | 12.0 | 4404 | 0.1306 | 0.9554 | 0.9674 | 0.9614 | 0.9841 |
|
| 71 |
+
| 0.0115 | 13.0 | 4771 | 0.1135 | 0.9540 | 0.9612 | 0.9576 | 0.9855 |
|
| 72 |
+
| 0.0099 | 14.0 | 5138 | 0.0968 | 0.9675 | 0.9699 | 0.9687 | 0.9889 |
|
| 73 |
+
| 0.0066 | 15.0 | 5505 | 0.1148 | 0.9636 | 0.9624 | 0.9630 | 0.9864 |
|
| 74 |
+
| 0.0066 | 16.0 | 5872 | 0.0903 | 0.9650 | 0.9687 | 0.9669 | 0.9894 |
|
| 75 |
+
| 0.0049 | 17.0 | 6239 | 0.1217 | 0.9649 | 0.9649 | 0.9649 | 0.9853 |
|
| 76 |
+
| 0.0049 | 18.0 | 6606 | 0.1147 | 0.9626 | 0.9674 | 0.965 | 0.9865 |
|
| 77 |
+
| 0.0049 | 19.0 | 6973 | 0.1154 | 0.9675 | 0.9712 | 0.9694 | 0.9874 |
|
| 78 |
+
| 0.0022 | 20.0 | 7340 | 0.1007 | 0.9676 | 0.9737 | 0.9706 | 0.9885 |
|
| 79 |
+
| 0.0024 | 21.0 | 7707 | 0.1255 | 0.9687 | 0.9699 | 0.9693 | 0.9877 |
|
| 80 |
+
| 0.0015 | 22.0 | 8074 | 0.1439 | 0.9651 | 0.9699 | 0.9675 | 0.9853 |
|
| 81 |
+
| 0.0015 | 23.0 | 8441 | 0.1346 | 0.9688 | 0.9724 | 0.9706 | 0.9873 |
|
| 82 |
+
| 0.003 | 24.0 | 8808 | 0.1243 | 0.9676 | 0.9724 | 0.97 | 0.9868 |
|
| 83 |
+
| 0.0016 | 25.0 | 9175 | 0.1278 | 0.9640 | 0.9737 | 0.9688 | 0.9874 |
|
| 84 |
+
| 0.0025 | 26.0 | 9542 | 0.1216 | 0.9593 | 0.9737 | 0.9664 | 0.9880 |
|
| 85 |
+
| 0.0025 | 27.0 | 9909 | 0.1290 | 0.9652 | 0.9737 | 0.9694 | 0.9880 |
|
| 86 |
+
| 0.0007 | 28.0 | 10276 | 0.1389 | 0.9613 | 0.9662 | 0.9637 | 0.9861 |
|
| 87 |
+
| 0.0013 | 29.0 | 10643 | 0.1306 | 0.9637 | 0.9662 | 0.9650 | 0.9867 |
|
| 88 |
+
| 0.0015 | 30.0 | 11010 | 0.1452 | 0.9613 | 0.9662 | 0.9637 | 0.9867 |
|
| 89 |
+
| 0.0015 | 31.0 | 11377 | 0.1405 | 0.9673 | 0.9649 | 0.9661 | 0.9861 |
|
| 90 |
+
| 0.0014 | 32.0 | 11744 | 0.1428 | 0.9626 | 0.9674 | 0.965 | 0.9870 |
|
| 91 |
+
| 0.0002 | 33.0 | 12111 | 0.1530 | 0.9650 | 0.9662 | 0.9656 | 0.9867 |
|
| 92 |
+
| 0.0002 | 34.0 | 12478 | 0.1525 | 0.9699 | 0.9687 | 0.9693 | 0.9867 |
|
| 93 |
+
| 0.0006 | 35.0 | 12845 | 0.1372 | 0.9688 | 0.9712 | 0.9700 | 0.9874 |
|
| 94 |
+
| 0.0004 | 36.0 | 13212 | 0.1359 | 0.9689 | 0.9762 | 0.9725 | 0.9885 |
|
| 95 |
+
| 0.0005 | 37.0 | 13579 | 0.1432 | 0.9688 | 0.9737 | 0.9713 | 0.9879 |
|
| 96 |
+
| 0.0005 | 38.0 | 13946 | 0.1443 | 0.9676 | 0.9724 | 0.97 | 0.9876 |
|
| 97 |
+
| 0.0006 | 39.0 | 14313 | 0.1414 | 0.9688 | 0.9724 | 0.9706 | 0.9880 |
|
| 98 |
+
| 0.0005 | 40.0 | 14680 | 0.1511 | 0.9663 | 0.9687 | 0.9675 | 0.9871 |
|
| 99 |
+
| 0.0003 | 41.0 | 15047 | 0.1438 | 0.9639 | 0.9712 | 0.9675 | 0.9873 |
|
| 100 |
+
| 0.0003 | 42.0 | 15414 | 0.1519 | 0.9650 | 0.9687 | 0.9669 | 0.9873 |
|
| 101 |
+
| 0.0001 | 43.0 | 15781 | 0.1580 | 0.9638 | 0.9687 | 0.9662 | 0.9867 |
|
| 102 |
+
| 0.0004 | 44.0 | 16148 | 0.1462 | 0.9650 | 0.9687 | 0.9669 | 0.9868 |
|
| 103 |
+
| 0.0001 | 45.0 | 16515 | 0.1478 | 0.9651 | 0.9699 | 0.9675 | 0.9868 |
|
| 104 |
+
| 0.0001 | 46.0 | 16882 | 0.1461 | 0.9663 | 0.9712 | 0.9688 | 0.9870 |
|
| 105 |
+
| 0.0002 | 47.0 | 17249 | 0.1456 | 0.9663 | 0.9712 | 0.9688 | 0.9870 |
|
| 106 |
+
| 0.0001 | 48.0 | 17616 | 0.1451 | 0.9651 | 0.9712 | 0.9681 | 0.9871 |
|
| 107 |
+
| 0.0001 | 49.0 | 17983 | 0.1456 | 0.9651 | 0.9712 | 0.9681 | 0.9871 |
|
| 108 |
+
| 0.0001 | 50.0 | 18350 | 0.1461 | 0.9651 | 0.9712 | 0.9681 | 0.9873 |
|
| 109 |
+
|
| 110 |
+
|
| 111 |
+
### Framework versions
|
| 112 |
+
|
| 113 |
+
- Transformers 4.48.3
|
| 114 |
+
- Pytorch 2.6.0+cu126
|
| 115 |
+
- Datasets 3.2.0
|
| 116 |
+
- Tokenizers 0.21.0
|
config.json
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "google-bert/bert-base-chinese",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"BertForTokenClassification"
|
| 5 |
+
],
|
| 6 |
+
"attention_probs_dropout_prob": 0.1,
|
| 7 |
+
"classifier_dropout": null,
|
| 8 |
+
"directionality": "bidi",
|
| 9 |
+
"hidden_act": "gelu",
|
| 10 |
+
"hidden_dropout_prob": 0.1,
|
| 11 |
+
"hidden_size": 768,
|
| 12 |
+
"id2label": {
|
| 13 |
+
"0": "O",
|
| 14 |
+
"1": "B-phone",
|
| 15 |
+
"2": "I-phone",
|
| 16 |
+
"3": "E-phone",
|
| 17 |
+
"4": "B-name",
|
| 18 |
+
"5": "I-name",
|
| 19 |
+
"6": "E-name",
|
| 20 |
+
"7": "S-name",
|
| 21 |
+
"8": "B-area",
|
| 22 |
+
"9": "I-area",
|
| 23 |
+
"10": "E-area",
|
| 24 |
+
"11": "S-area",
|
| 25 |
+
"12": "B-sex",
|
| 26 |
+
"13": "E-sex",
|
| 27 |
+
"14": "S-sex",
|
| 28 |
+
"15": "B-wechat",
|
| 29 |
+
"16": "I-wechat",
|
| 30 |
+
"17": "E-wechat",
|
| 31 |
+
"18": "B-age",
|
| 32 |
+
"19": "I-age",
|
| 33 |
+
"20": "E-age",
|
| 34 |
+
"21": "S-age"
|
| 35 |
+
},
|
| 36 |
+
"initializer_range": 0.02,
|
| 37 |
+
"intermediate_size": 3072,
|
| 38 |
+
"label2id": {
|
| 39 |
+
"B-age": 18,
|
| 40 |
+
"B-area": 8,
|
| 41 |
+
"B-name": 4,
|
| 42 |
+
"B-phone": 1,
|
| 43 |
+
"B-sex": 12,
|
| 44 |
+
"B-wechat": 15,
|
| 45 |
+
"E-age": 20,
|
| 46 |
+
"E-area": 10,
|
| 47 |
+
"E-name": 6,
|
| 48 |
+
"E-phone": 3,
|
| 49 |
+
"E-sex": 13,
|
| 50 |
+
"E-wechat": 17,
|
| 51 |
+
"I-age": 19,
|
| 52 |
+
"I-area": 9,
|
| 53 |
+
"I-name": 5,
|
| 54 |
+
"I-phone": 2,
|
| 55 |
+
"I-wechat": 16,
|
| 56 |
+
"O": 0,
|
| 57 |
+
"S-age": 21,
|
| 58 |
+
"S-area": 11,
|
| 59 |
+
"S-name": 7,
|
| 60 |
+
"S-sex": 14
|
| 61 |
+
},
|
| 62 |
+
"layer_norm_eps": 1e-12,
|
| 63 |
+
"max_position_embeddings": 512,
|
| 64 |
+
"model_type": "bert",
|
| 65 |
+
"num_attention_heads": 12,
|
| 66 |
+
"num_hidden_layers": 12,
|
| 67 |
+
"pad_token_id": 0,
|
| 68 |
+
"pooler_fc_size": 768,
|
| 69 |
+
"pooler_num_attention_heads": 12,
|
| 70 |
+
"pooler_num_fc_layers": 3,
|
| 71 |
+
"pooler_size_per_head": 128,
|
| 72 |
+
"pooler_type": "first_token_transform",
|
| 73 |
+
"position_embedding_type": "absolute",
|
| 74 |
+
"torch_dtype": "float32",
|
| 75 |
+
"transformers_version": "4.48.3",
|
| 76 |
+
"type_vocab_size": 2,
|
| 77 |
+
"use_cache": true,
|
| 78 |
+
"vocab_size": 21128
|
| 79 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:827aea98f9f26a3bdcda7be81c9bcf80aa9cfd39ebb7ce2ccb70c20b26d63bac
|
| 3 |
+
size 406799208
|
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,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"added_tokens_decoder": {
|
| 3 |
+
"0": {
|
| 4 |
+
"content": "[PAD]",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false,
|
| 9 |
+
"special": true
|
| 10 |
+
},
|
| 11 |
+
"100": {
|
| 12 |
+
"content": "[UNK]",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false,
|
| 17 |
+
"special": true
|
| 18 |
+
},
|
| 19 |
+
"101": {
|
| 20 |
+
"content": "[CLS]",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false,
|
| 25 |
+
"special": true
|
| 26 |
+
},
|
| 27 |
+
"102": {
|
| 28 |
+
"content": "[SEP]",
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"normalized": false,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false,
|
| 33 |
+
"special": true
|
| 34 |
+
},
|
| 35 |
+
"103": {
|
| 36 |
+
"content": "[MASK]",
|
| 37 |
+
"lstrip": false,
|
| 38 |
+
"normalized": false,
|
| 39 |
+
"rstrip": false,
|
| 40 |
+
"single_word": false,
|
| 41 |
+
"special": true
|
| 42 |
+
}
|
| 43 |
+
},
|
| 44 |
+
"clean_up_tokenization_spaces": false,
|
| 45 |
+
"cls_token": "[CLS]",
|
| 46 |
+
"do_lower_case": false,
|
| 47 |
+
"extra_special_tokens": {},
|
| 48 |
+
"mask_token": "[MASK]",
|
| 49 |
+
"model_max_length": 512,
|
| 50 |
+
"pad_token": "[PAD]",
|
| 51 |
+
"sep_token": "[SEP]",
|
| 52 |
+
"strip_accents": null,
|
| 53 |
+
"tokenize_chinese_chars": true,
|
| 54 |
+
"tokenizer_class": "BertTokenizer",
|
| 55 |
+
"unk_token": "[UNK]"
|
| 56 |
+
}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7f11b13ef1af56d399e23912bb77d77fe4739a93cc8ab0a27824ef4fa91df99e
|
| 3 |
+
size 5304
|
vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|