cedricbonhomme commited on
Commit
929b652
·
verified ·
1 Parent(s): 814dfa8

End of training

Browse files
Files changed (4) hide show
  1. README.md +38 -48
  2. config.json +1 -1
  3. model.safetensors +1 -1
  4. training_args.bin +1 -1
README.md CHANGED
@@ -1,53 +1,47 @@
1
  ---
2
- base_model: hfl/chinese-macbert-base
3
- datasets:
4
- - CIRCL/Vulnerability-CNVD
5
  library_name: transformers
6
  license: apache-2.0
7
- metrics:
8
- - accuracy
9
  tags:
10
  - generated_from_trainer
11
- - text-classification
12
- - classification
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
- # VLAI: A RoBERTa-Based Model for Automated Vulnerability Severity Classification (Chinese Text)
 
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 [Vulnerability-Lookup project page](https://vulnerability.circl.lu) 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
- ## How to use
 
 
 
 
 
 
 
 
 
32
 
33
- You can use this model directly with the Hugging Face `transformers` library for text classification:
34
 
35
- ```python
36
- from transformers import pipeline
37
 
38
- classifier = pipeline(
39
- "text-classification",
40
- model="CIRCL/vulnerability-severity-classification-chinese-macbert-base"
41
- )
42
 
43
- # Example usage for a Chinese vulnerability description
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
 
52
  ## Training procedure
53
 
@@ -55,31 +49,27 @@ print(result_chinese)
55
 
56
  The following hyperparameters were used during training:
57
  - learning_rate: 3e-05
58
- - train_batch_size: 32
59
- - eval_batch_size: 32
60
  - seed: 42
61
  - optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
62
  - lr_scheduler_type: linear
63
  - num_epochs: 5
64
 
65
- It achieves the following results on the evaluation set:
66
- - Loss: 1.2224
67
- - Accuracy: 0.7783
68
-
69
  ### Training results
70
 
71
- | Training Loss | Epoch | Step | Validation Loss | Accuracy |
72
- |:-------------:|:-----:|:-----:|:---------------:|:--------:|
73
- | 1.2400 | 1.0 | 3588 | 1.1658 | 0.7567 |
74
- | 1.1318 | 2.0 | 7176 | 1.1025 | 0.7711 |
75
- | 1.0106 | 3.0 | 10764 | 1.0848 | 0.7829 |
76
- | 0.6185 | 4.0 | 14352 | 1.1507 | 0.7807 |
77
- | 0.6463 | 5.0 | 17940 | 1.2224 | 0.7783 |
78
 
79
 
80
  ### Framework versions
81
 
82
- - Transformers 5.3.0
83
- - Pytorch 2.10.0+cu128
84
- - Datasets 4.8.3
85
  - 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: 2.5405
22
+ - Accuracy: 0.7661
23
+ - F1 Macro: 0.6864
24
+ - Low Precision: 0.5879
25
+ - Low Recall: 0.4169
26
+ - Low F1: 0.4879
27
+ - Medium Precision: 0.7843
28
+ - Medium Recall: 0.8171
29
+ - Medium F1: 0.8004
30
+ - High Precision: 0.7680
31
+ - High Recall: 0.7737
32
+ - High F1: 0.7709
33
 
34
+ ## Model description
35
 
36
+ More information needed
 
37
 
38
+ ## Intended uses & limitations
 
 
 
39
 
40
+ More information needed
 
 
 
 
 
41
 
42
+ ## Training and evaluation data
43
 
44
+ More information needed
45
 
46
  ## Training procedure
47
 
 
49
 
50
  The following hyperparameters were used during training:
51
  - learning_rate: 3e-05
52
+ - train_batch_size: 64
53
+ - eval_batch_size: 64
54
  - seed: 42
55
  - optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
56
  - lr_scheduler_type: linear
57
  - num_epochs: 5
58
 
 
 
 
 
59
  ### Training results
60
 
61
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 Macro | Low Precision | Low Recall | Low F1 | Medium Precision | Medium Recall | Medium F1 | High Precision | High Recall | High F1 |
62
+ |:-------------:|:-----:|:----:|:---------------:|:--------:|:--------:|:-------------:|:----------:|:------:|:----------------:|:-------------:|:---------:|:--------------:|:-----------:|:-------:|
63
+ | 2.2708 | 1.0 | 1590 | 2.3968 | 0.7482 | 0.6143 | 0.6555 | 0.1967 | 0.3026 | 0.7461 | 0.8416 | 0.7910 | 0.7589 | 0.7398 | 0.7493 |
64
+ | 2.3716 | 2.0 | 3180 | 2.2675 | 0.7627 | 0.6657 | 0.5966 | 0.3380 | 0.4315 | 0.7648 | 0.8413 | 0.8012 | 0.7837 | 0.7461 | 0.7644 |
65
+ | 1.7175 | 3.0 | 4770 | 2.3348 | 0.7679 | 0.6878 | 0.5996 | 0.4134 | 0.4894 | 0.7861 | 0.8188 | 0.8021 | 0.7672 | 0.7768 | 0.7719 |
66
+ | 1.7819 | 4.0 | 6360 | 2.4131 | 0.7643 | 0.6844 | 0.5736 | 0.4165 | 0.4826 | 0.7909 | 0.8020 | 0.7964 | 0.7571 | 0.7922 | 0.7743 |
67
+ | 1.5224 | 5.0 | 7950 | 2.5405 | 0.7661 | 0.6864 | 0.5879 | 0.4169 | 0.4879 | 0.7843 | 0.8171 | 0.8004 | 0.7680 | 0.7737 | 0.7709 |
68
 
69
 
70
  ### Framework versions
71
 
72
+ - Transformers 5.4.0
73
+ - Pytorch 2.11.0+cu130
74
+ - Datasets 4.8.4
75
  - Tokenizers 0.22.2
config.json CHANGED
@@ -39,7 +39,7 @@
39
  "pooler_type": "first_token_transform",
40
  "problem_type": "single_label_classification",
41
  "tie_word_embeddings": true,
42
- "transformers_version": "5.3.0",
43
  "type_vocab_size": 2,
44
  "use_cache": false,
45
  "vocab_size": 21128
 
39
  "pooler_type": "first_token_transform",
40
  "problem_type": "single_label_classification",
41
  "tie_word_embeddings": true,
42
+ "transformers_version": "5.4.0",
43
  "type_vocab_size": 2,
44
  "use_cache": false,
45
  "vocab_size": 21128
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a5a2edb509486b6ccab75444049c7f84444b1b704a9f1b45ba8568e22276362d
3
  size 409103292
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1e9422416a6d74001deb9c6e5ef0caadc3dc07fecd7b556630339cfe76b43382
3
  size 409103292
training_args.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:8c8729a52b86b3d5a80dcc124919836fe2d108cbf50326c0e6c512ce210cd309
3
  size 5265
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:003d1a67690b110b26ce2a643db3953d4877c1dcfc591316e756d9e4d545e502
3
  size 5265