cedricbonhomme commited on
Commit
e60200d
·
verified ·
1 Parent(s): bd40f72

End of training

Browse files
Files changed (3) hide show
  1. README.md +26 -45
  2. emissions.csv +2 -2
  3. model.safetensors +1 -1
README.md CHANGED
@@ -1,51 +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
- 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
  ## Training procedure
51
 
@@ -53,27 +39,22 @@ print(result_chinese)
53
 
54
  The following hyperparameters were used during training:
55
  - learning_rate: 3e-05
56
- - train_batch_size: 64
57
- - eval_batch_size: 64
58
  - seed: 42
59
  - optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
60
  - lr_scheduler_type: linear
61
  - num_epochs: 5
62
 
63
- It achieves the following results on the evaluation set:
64
- - Loss: 0.6059
65
- - Accuracy: 0.7771
66
-
67
-
68
  ### Training results
69
 
70
- | Training Loss | Epoch | Step | Validation Loss | Accuracy |
71
- |:-------------:|:-----:|:----:|:---------------:|:--------:|
72
- | 0.5764 | 1.0 | 1772 | 0.6157 | 0.7462 |
73
- | 0.5644 | 2.0 | 3544 | 0.5618 | 0.7663 |
74
- | 0.4589 | 3.0 | 5316 | 0.5615 | 0.7781 |
75
- | 0.3881 | 4.0 | 7088 | 0.5791 | 0.7823 |
76
- | 0.3433 | 5.0 | 8860 | 0.6059 | 0.7771 |
77
 
78
 
79
  ### Framework versions
@@ -81,4 +62,4 @@ It achieves the following results on the evaluation set:
81
  - Transformers 4.57.3
82
  - Pytorch 2.9.1+cu128
83
  - Datasets 4.4.2
84
- - Tokenizers 0.22.1
 
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: 0.6086
22
+ - Accuracy: 0.7746
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
 
 
39
 
40
  The following hyperparameters were used during training:
41
  - learning_rate: 3e-05
42
+ - train_batch_size: 32
43
+ - eval_batch_size: 32
44
  - seed: 42
45
  - optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
46
  - lr_scheduler_type: linear
47
  - num_epochs: 5
48
 
 
 
 
 
 
49
  ### Training results
50
 
51
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy |
52
+ |:-------------:|:-----:|:-----:|:---------------:|:--------:|
53
+ | 0.6059 | 1.0 | 3548 | 0.5956 | 0.7432 |
54
+ | 0.5083 | 2.0 | 7096 | 0.5697 | 0.7664 |
55
+ | 0.491 | 3.0 | 10644 | 0.5535 | 0.7730 |
56
+ | 0.4476 | 4.0 | 14192 | 0.5666 | 0.7790 |
57
+ | 0.3577 | 5.0 | 17740 | 0.6086 | 0.7746 |
58
 
59
 
60
  ### Framework versions
 
62
  - Transformers 4.57.3
63
  - Pytorch 2.9.1+cu128
64
  - Datasets 4.4.2
65
+ - Tokenizers 0.22.2
emissions.csv CHANGED
@@ -1,2 +1,2 @@
1
- timestamp,project_name,run_id,experiment_id,duration,emissions,emissions_rate,cpu_power,gpu_power,ram_power,cpu_energy,gpu_energy,ram_energy,energy_consumed,country_name,country_iso_code,region,cloud_provider,cloud_region,os,python_version,codecarbon_version,cpu_count,cpu_model,gpu_count,gpu_model,longitude,latitude,ram_total_size,tracking_mode,on_cloud,pue
2
- 2026-01-03T12:51:21,codecarbon,b34798ef-0b78-4cee-90c2-8e8713063c5a,5b0fa12a-3dd7-45bb-9766-cc326314d9f1,2547.9638344610576,0.127837422724597,5.0172385100449054e-05,42.5,635.5354141556119,755.7507977485657,0.030019676328265212,0.6507438997613697,0.5336937614800426,1.2144573375696777,Luxembourg,LUX,,,,Linux-6.8.0-90-generic-x86_64-with-glibc2.39,3.12.3,2.8.4,224,Intel(R) Xeon(R) Platinum 8480+,4,4 x NVIDIA L40S,6.1661,49.7498,2015.3354606628418,machine,N,1.0
 
1
+ timestamp,project_name,run_id,experiment_id,duration,emissions,emissions_rate,cpu_power,gpu_power,ram_power,cpu_energy,gpu_energy,ram_energy,energy_consumed,water_consumed,country_name,country_iso_code,region,cloud_provider,cloud_region,os,python_version,codecarbon_version,cpu_count,cpu_model,gpu_count,gpu_model,longitude,latitude,ram_total_size,tracking_mode,cpu_utilization_percent,gpu_utilization_percent,ram_utilization_percent,ram_used_gb,on_cloud,pue,wue
2
+ 2026-01-09T10:30:02,codecarbon,10fef713-6914-4471-bbfb-6264fe2c2ca7,5b0fa12a-3dd7-45bb-9766-cc326314d9f1,3486.109665968921,0.08144179050348038,2.3361798195423276e-05,70.0001582310907,663.0685817263877,70.0,0.06543725066806824,0.6428308792642952,0.06543004039795555,0.7736981703303191,0.0,Luxembourg,LUX,,,,Linux-6.8.0-88-generic-x86_64-with-glibc2.39,3.12.3,3.2.1,224,Intel(R) Xeon(R) Platinum 8480+,2,2 x NVIDIA H100 NVL,6.1661,49.7498,2015.3354606628418,machine,0.9989925158318941,73.37708693149108,1.1,21.73262945207015,N,1.0,0.0
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:5f7155a033821ee610bc068c70a623f4d7b5cc045751bef79b5a4264f3b6e459
3
  size 409103316
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:690b132fc5b94e270503cd6e31880decad98d2ba478d1c41b693c6c22d31787c
3
  size 409103316