End of training
Browse files- README.md +24 -43
- model.safetensors +1 -1
- tokenizer.json +2 -14
- tokenizer_config.json +2 -44
README.md
CHANGED
|
@@ -1,52 +1,37 @@
|
|
| 1 |
---
|
| 2 |
-
base_model: hfl/chinese-macbert-base
|
| 3 |
-
datasets:
|
| 4 |
-
- CIRCL/Vulnerability-CNVD
|
| 5 |
library_name: transformers
|
| 6 |
license: apache-2.0
|
| 7 |
-
|
| 8 |
-
- accuracy
|
| 9 |
tags:
|
| 10 |
- generated_from_trainer
|
| 11 |
-
|
| 12 |
-
-
|
| 13 |
-
- nlp
|
| 14 |
-
- chinese
|
| 15 |
-
- vulnerability
|
| 16 |
-
pipeline_tag: text-classification
|
| 17 |
-
language: zh
|
| 18 |
model-index:
|
| 19 |
- name: vulnerability-severity-classification-chinese-macbert-base
|
| 20 |
results: []
|
| 21 |
---
|
| 22 |
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
This model is a fine-tuned version of [hfl/chinese-macbert-base](https://huggingface.co/hfl/chinese-macbert-base) on the dataset [CIRCL/Vulnerability-CNVD](https://huggingface.co/datasets/CIRCL/Vulnerability-CNVD).
|
| 26 |
-
|
| 27 |
-
For more information, visit the [this project page](https://www.vulnerability-lookup.org/user-manual/ai/) or the [ML-Gateway GitHub repository](https://github.com/vulnerability-lookup/ML-Gateway), which demonstrates its usage in a FastAPI server.
|
| 28 |
|
|
|
|
| 29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
-
##
|
| 32 |
|
| 33 |
-
|
| 34 |
|
| 35 |
-
|
| 36 |
-
from transformers import pipeline
|
| 37 |
|
| 38 |
-
|
| 39 |
-
"text-classification",
|
| 40 |
-
model="CIRCL/vulnerability-severity-classification-chinese-macbert-base"
|
| 41 |
-
)
|
| 42 |
|
| 43 |
-
#
|
| 44 |
-
description_chinese = "TOTOLINK A3600R是中国吉翁电子(TOTOLINK)公司的一款6天线1200M无线路由器。TOTOLINK A3600R存在缓冲区溢出漏洞,该漏洞源于/cgi-bin/cstecgi.cgi文件的UploadCustomModule函数中的File参数未能正确验证输入数据的长度大小,攻击者可利用该漏洞在系统上执行任意代码或者导致拒绝服务。"
|
| 45 |
-
result_chinese = classifier(description_chinese)
|
| 46 |
-
print(result_chinese)
|
| 47 |
-
# Expected output example: [{'label': '高', 'score': 0.9802}]
|
| 48 |
-
```
|
| 49 |
|
|
|
|
| 50 |
|
| 51 |
## Training procedure
|
| 52 |
|
|
@@ -61,24 +46,20 @@ The following hyperparameters were used during training:
|
|
| 61 |
- lr_scheduler_type: linear
|
| 62 |
- num_epochs: 5
|
| 63 |
|
| 64 |
-
It achieves the following results on the evaluation set:
|
| 65 |
-
- Loss: 0.5997
|
| 66 |
-
- Accuracy: 0.7846
|
| 67 |
-
|
| 68 |
### Training results
|
| 69 |
|
| 70 |
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|
| 71 |
|:-------------:|:-----:|:-----:|:---------------:|:--------:|
|
| 72 |
-
|
|
| 73 |
-
|
|
| 74 |
-
|
|
| 75 |
-
| 0.
|
| 76 |
-
| 0.
|
| 77 |
|
| 78 |
|
| 79 |
### Framework versions
|
| 80 |
|
| 81 |
-
- Transformers
|
| 82 |
-
- Pytorch 2.
|
| 83 |
-
- Datasets 4.
|
| 84 |
- Tokenizers 0.22.2
|
|
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
| 2 |
library_name: transformers
|
| 3 |
license: apache-2.0
|
| 4 |
+
base_model: hfl/chinese-macbert-base
|
|
|
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
| 7 |
+
metrics:
|
| 8 |
+
- accuracy
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
model-index:
|
| 10 |
- name: vulnerability-severity-classification-chinese-macbert-base
|
| 11 |
results: []
|
| 12 |
---
|
| 13 |
|
| 14 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 15 |
+
should probably proofread and complete it, then remove this comment. -->
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
+
# vulnerability-severity-classification-chinese-macbert-base
|
| 18 |
|
| 19 |
+
This model is a fine-tuned version of [hfl/chinese-macbert-base](https://huggingface.co/hfl/chinese-macbert-base) on an unknown dataset.
|
| 20 |
+
It achieves the following results on the evaluation set:
|
| 21 |
+
- Loss: 1.2224
|
| 22 |
+
- Accuracy: 0.7783
|
| 23 |
|
| 24 |
+
## Model description
|
| 25 |
|
| 26 |
+
More information needed
|
| 27 |
|
| 28 |
+
## Intended uses & limitations
|
|
|
|
| 29 |
|
| 30 |
+
More information needed
|
|
|
|
|
|
|
|
|
|
| 31 |
|
| 32 |
+
## Training and evaluation data
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
+
More information needed
|
| 35 |
|
| 36 |
## Training procedure
|
| 37 |
|
|
|
|
| 46 |
- lr_scheduler_type: linear
|
| 47 |
- num_epochs: 5
|
| 48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
### Training results
|
| 50 |
|
| 51 |
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|
| 52 |
|:-------------:|:-----:|:-----:|:---------------:|:--------:|
|
| 53 |
+
| 1.2400 | 1.0 | 3588 | 1.1658 | 0.7567 |
|
| 54 |
+
| 1.1318 | 2.0 | 7176 | 1.1025 | 0.7711 |
|
| 55 |
+
| 1.0106 | 3.0 | 10764 | 1.0848 | 0.7829 |
|
| 56 |
+
| 0.6185 | 4.0 | 14352 | 1.1507 | 0.7807 |
|
| 57 |
+
| 0.6463 | 5.0 | 17940 | 1.2224 | 0.7783 |
|
| 58 |
|
| 59 |
|
| 60 |
### Framework versions
|
| 61 |
|
| 62 |
+
- Transformers 5.3.0
|
| 63 |
+
- Pytorch 2.10.0+cu128
|
| 64 |
+
- Datasets 4.8.3
|
| 65 |
- Tokenizers 0.22.2
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 409103292
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a5a2edb509486b6ccab75444049c7f84444b1b704a9f1b45ba8568e22276362d
|
| 3 |
size 409103292
|
tokenizer.json
CHANGED
|
@@ -1,19 +1,7 @@
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
-
"truncation":
|
| 4 |
-
|
| 5 |
-
"max_length": 512,
|
| 6 |
-
"strategy": "LongestFirst",
|
| 7 |
-
"stride": 0
|
| 8 |
-
},
|
| 9 |
-
"padding": {
|
| 10 |
-
"strategy": "BatchLongest",
|
| 11 |
-
"direction": "Right",
|
| 12 |
-
"pad_to_multiple_of": null,
|
| 13 |
-
"pad_id": 0,
|
| 14 |
-
"pad_type_id": 0,
|
| 15 |
-
"pad_token": "[PAD]"
|
| 16 |
-
},
|
| 17 |
"added_tokens": [
|
| 18 |
{
|
| 19 |
"id": 0,
|
|
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
+
"truncation": null,
|
| 4 |
+
"padding": null,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
"added_tokens": [
|
| 6 |
{
|
| 7 |
"id": 0,
|
tokenizer_config.json
CHANGED
|
@@ -1,50 +1,8 @@
|
|
| 1 |
{
|
| 2 |
-
"
|
| 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": true,
|
| 47 |
-
"
|
| 48 |
"mask_token": "[MASK]",
|
| 49 |
"model_max_length": 1000000000000000019884624838656,
|
| 50 |
"pad_token": "[PAD]",
|
|
|
|
| 1 |
{
|
| 2 |
+
"backend": "tokenizers",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
"cls_token": "[CLS]",
|
| 4 |
"do_lower_case": true,
|
| 5 |
+
"is_local": false,
|
| 6 |
"mask_token": "[MASK]",
|
| 7 |
"model_max_length": 1000000000000000019884624838656,
|
| 8 |
"pad_token": "[PAD]",
|