Datasets:
Tasks:
Text Generation
Modalities:
Text
Formats:
json
Languages:
English
Size:
10K - 100K
Tags:
code
License:
morpheuslord
commited on
Commit
•
e1932a8
1
Parent(s):
5ba1046
Update README.md
Browse files
README.md
CHANGED
@@ -7,6 +7,42 @@ language:
|
|
7 |
tags:
|
8 |
- code
|
9 |
pretty_name: CVE-LLm-Dataset
|
10 |
-
data_source: Custom data collected from CVE database
|
11 |
data_formats: JSONL
|
12 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
tags:
|
8 |
- code
|
9 |
pretty_name: CVE-LLm-Dataset
|
10 |
+
data_source: Custom data collected from the CVE database
|
11 |
data_formats: JSONL
|
12 |
---
|
13 |
+
# CVE-llm_dataset
|
14 |
+
This dataset is intended to train an LLM model for an utterly CVE-focused input and output.
|
15 |
+
|
16 |
+
## Data extraction:
|
17 |
+
For the data extraction, I first downloaded the CVE database from NVD lists and then loaded them using the `cve_dataset_2.py` and `cve_dataset.py` both have produce different datasets one is for llama and the other is for openai GPT.
|
18 |
+
|
19 |
+
The CVE json files are mapped in this format:
|
20 |
+
```
|
21 |
+
cves:
|
22 |
+
|
|
23 |
+
├─1999
|
24 |
+
| ├─0xxx
|
25 |
+
| | ├─CVE-1999-0001.json
|
26 |
+
| | └─CVE-1999-0999.json
|
27 |
+
| └─1xxx
|
28 |
+
| ├─CVE-1999-1000.json
|
29 |
+
| └─CVE-1999-1598.json
|
30 |
+
└─2023
|
31 |
+
|
32 |
+
```
|
33 |
+
The programs traverse through these folders extract the data in the files and arrange them into usable formats for the fine-tuning process.
|
34 |
+
|
35 |
+
## llama2 Model dataset:
|
36 |
+
The llama2 fine-tuned dataset follows this format:
|
37 |
+
```
|
38 |
+
{
|
39 |
+
"instruction": "Explain CVE-1999-0001",
|
40 |
+
"input": "Explain the vulnerability: CVE-1999-0001",
|
41 |
+
"output": "ip_input.c in BSD-derived TCP/IP implementations allows remote attackers to cause a denial of service (crash or hang) via crafted packets.\nAffected Products: n/a\nReferences: [{'tags': ['x_refsource_CONFIRM'], 'url': 'http://www.openbsd.org/errata23.html#tcpfix'}, {'name': '5707', 'tags': ['vdb-entry', 'x_refsource_OSVDB'], 'url': 'http://www.osvdb.org/5707'}]\nCVE State: PUBLISHED"
|
42 |
+
}
|
43 |
+
```
|
44 |
+
The instruction is what we instruct the AI to do with the data provided For example we can command the AI `To take in user input analyze it and then based on what he asks returns an answer` This is also where we can add a `role` or a `personal` to the AI.
|
45 |
+
|
46 |
+
The input is the user Input of the main query or data that must be processed by the AI. This is a crucial piece of information that the AI will process in order to provide an output.
|
47 |
+
|
48 |
+
The output is the format that we define and tell the AI to generate answers in that format or provide that answer to the question asked.
|