Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Ernest Nuclei Templates Dataset v1 (Instruction Format)
|
| 2 |
+
|
| 3 |
+
This is a restructured version of the Ernest Nuclei Templates dataset optimized for instruction tuning.
|
| 4 |
+
|
| 5 |
+
## Format
|
| 6 |
+
|
| 7 |
+
Each example has this structure:
|
| 8 |
+
|
| 9 |
+
```json
|
| 10 |
+
{
|
| 11 |
+
"instruction": "Generate a Nuclei template for CVE-2024-1234",
|
| 12 |
+
"input": "Title: XSS in Product\nSummary: Description...\nSeverity: high",
|
| 13 |
+
"output": "id: cve-2024-1234\n\ninfo:\n name: ...\n\nhttp:\n - method: GET\n ...",
|
| 14 |
+
"category": "cve",
|
| 15 |
+
"severity": "high",
|
| 16 |
+
"id": "CVE-2024-1234"
|
| 17 |
+
}
|
| 18 |
+
```
|
| 19 |
+
|
| 20 |
+
## Usage
|
| 21 |
+
|
| 22 |
+
```python
|
| 23 |
+
from datasets import load_dataset
|
| 24 |
+
|
| 25 |
+
dataset = load_dataset('json', data_files={
|
| 26 |
+
'train': 'train.jsonl',
|
| 27 |
+
'test': 'test.jsonl',
|
| 28 |
+
'validation': 'validation.jsonl'
|
| 29 |
+
})
|
| 30 |
+
|
| 31 |
+
# For instruction tuning
|
| 32 |
+
example = dataset['train'][0]
|
| 33 |
+
print(f"Instruction: {example['instruction']}")
|
| 34 |
+
print(f"Input: {example['input']}")
|
| 35 |
+
print(f"Output: {example['output']}")
|
| 36 |
+
```
|
| 37 |
+
|
| 38 |
+
## Advantages
|
| 39 |
+
|
| 40 |
+
- **Flatter structure**: Easier to work with in ML frameworks
|
| 41 |
+
- **Instruction format**: Ready for instruction-tuning (Alpaca, GPT-4 style)
|
| 42 |
+
- **Text-focused**: Input and output are plain text strings
|
| 43 |
+
- **Smaller size**: ~30% smaller than nested format
|
| 44 |
+
- **Faster loading**: Less parsing overhead
|
| 45 |
+
|
| 46 |
+
## Original Dataset
|
| 47 |
+
|
| 48 |
+
See the original nested format at: `../ernest-nuclei-templates-v1/`
|