File size: 1,327 Bytes
528c6e8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b1e93d6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
license: mit
language:
- zh
- en
pretty_name: CTF Dataset
task_categories:
- text-generation
- question-answering
tags:
- ctf
- cybersecurity
- capture-the-flag
- sft
- sharegpt
- chatml
size_categories:
- 1K<n<10K
configs:
- config_name: default
  data_files:
  - split: train
    path: ctf-dataset.jsonl
---

## ctf-dataset

CTF 与网络安全知识的 ShareGPT/ChatML 风格 SFT 数据集,可用于 LoRA 微调。

### 数据格式

每行是一个 JSON 对象,核心字段如下:

| 字段 | 说明 |
|---|---|
| `id` | 样本唯一 ID |
| `dataset` | 数据集名称,当前为 `ctf-dataset` |
| `category` | 来源主题或 CTF/安全类别 |
| `ctf_task_type` | 任务类型标签 |
| `messages` | ShareGPT 消息数组,包含 `system` / `user` / `assistant` |
| `metadata` | 来源路径、章节、字符数、chunk 等溯源信息 |

### LLaMA-Factory 接入`ctf-dataset.jsonl` 放入 LLaMA-Factory 的 `data/` 目录后,在 `data/dataset_info.json` 中添加:

```json
{
  "ctf_dataset": {
    "file_name": "ctf-dataset.jsonl",
    "formatting": "sharegpt",
    "columns": {
      "messages": "messages"
    },
    "tags": {
      "role_tag": "role",
      "content_tag": "content",
      "user_tag": "user",
      "assistant_tag": "assistant",
      "system_tag": "system"
    }
  }
}
```