Text Classification
Laya
Safetensors
Chinese
English
cybersecurity
security-incident-triage
typed-decisions
cissp
cisp
cs-eval
Instructions to use sds-ai/Yeev with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Laya
How to use sds-ai/Yeev with Laya:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse files- .evaluation_shards/predictions-00.jsonl +0 -0
- .evaluation_shards/predictions-01.jsonl +0 -0
- README.md +292 -1
- encoder/config.json +84 -0
- model.safetensors +3 -0
- rl_agent_config.json +42 -0
- tokenizer/tokenizer.json +0 -0
- tokenizer/tokenizer_config.json +15 -0
- training_manifest.json +21 -0
.evaluation_shards/predictions-00.jsonl
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
.evaluation_shards/predictions-01.jsonl
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
README.md
CHANGED
|
@@ -1,3 +1,294 @@
|
|
| 1 |
---
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
language:
|
| 3 |
+
- zh
|
| 4 |
+
- en
|
| 5 |
+
library_name: laya
|
| 6 |
+
pipeline_tag: text-classification
|
| 7 |
+
tags:
|
| 8 |
+
- cybersecurity
|
| 9 |
+
- security-incident-triage
|
| 10 |
+
- typed-decisions
|
| 11 |
+
- cissp
|
| 12 |
+
- cisp
|
| 13 |
+
- cs-eval
|
| 14 |
+
- laya
|
| 15 |
+
base_model: convaiinnovations/laya
|
| 16 |
---
|
| 17 |
+
|
| 18 |
+
# 👁🗨 Yeev:网络安全结构化决策模型
|
| 19 |
+
|
| 20 |
+
Yeev 是一个面向网络安全场景的 **Typed-Decision Model**。它基于 [Laya](https://huggingface.co/convaiinnovations/laya) 微调,输入一段安全状态和一组结构化问题,直接返回选项分布、置信度和结构化答案。
|
| 21 |
+
|
| 22 |
+
模型名称参考了 Jev 的命名与结构化决策理念;Yeev 不是 Jev 的权重复制,也不是自回归文本生成模型。Yeev 更适合需要稳定标签、概率分布和批量决策的安全工作流。
|
| 23 |
+
|
| 24 |
+
> Yeev is a Laya-based, non-autoregressive typed-decision model for cybersecurity question answering and security-incident triage. It returns structured choices, ordinal scores, and yes/no probabilities in one forward pass.
|
| 25 |
+
|
| 26 |
+
## 🔍 模型概览 | Model Card
|
| 27 |
+
|
| 28 |
+
- **模型名称:** `sds-ai/Yeev`
|
| 29 |
+
- **项目地址:** <https://huggingface.co/sds-ai/Yeev>
|
| 30 |
+
- **底座模型:** [`convaiinnovations/laya`](https://huggingface.co/convaiinnovations/laya)
|
| 31 |
+
- **推理库:** `laya==0.3.3`
|
| 32 |
+
- **模型格式:** Laya checkpoint,包含 `model.safetensors`、encoder、tokenizer 和 `rl_agent_config.json`
|
| 33 |
+
- **输入:** `state` + typed `questions`
|
| 34 |
+
- **输出:** `choice`、`score`、`noul` 三类结构化答案
|
| 35 |
+
- **语言:** 中文、英文;实际效果取决于题目和领域数据
|
| 36 |
+
- **模型权重 SHA-256:** `746c0f8b9333fe686ee410139603afe6984420dc1b135e475697a825c4695c9b`
|
| 37 |
+
|
| 38 |
+
Yeev 不生成长篇自然语言答案,而是直接在请求时定义答案空间:
|
| 39 |
+
|
| 40 |
+
- `choice`:在多个命名选项中选择一个;
|
| 41 |
+
- `score`:在有序等级中给出期望分数和分布;
|
| 42 |
+
- `noul`:返回 `true` 的概率,适合判断题、是否存在风险等二元任务。
|
| 43 |
+
|
| 44 |
+
## 🎯 适用场景 | Use Cases
|
| 45 |
+
|
| 46 |
+
Yeev 的应急响应定位是 **辅助告警分诊与响应优先级判断**:根据告警证据,结构化评估是否可能是真实事件、建议调查/监控/遏制/关闭分流,并给出严重性和紧急度分布。它提供决策支持,不会执行隔离、封禁或删除操作。
|
| 47 |
+
|
| 48 |
+
### 🧯 应急响应样例:覆盖 12 类安全告警
|
| 49 |
+
|
| 50 |
+
以下 `Gold` 是数据记录提供的标签概率分布中概率最高的类别;严重性、紧急度同样列出最高概率等级。概率用于表示数据中的软标签,不代表真实世界发生概率。
|
| 51 |
+
|
| 52 |
+
| 数据样例 | 事件与响应关注点 | Gold 处置路径 | Gold 严重性 / 紧急度 | 样本数 |
|
| 53 |
+
|---|---|---|---|---:|
|
| 54 |
+
| #1 `dormant_account_use` | 休眠 180 天的服务账号无 MFA 成功登录 | 调查 `investigate` · 0.583 | 低 `Low` · 0.433 / 常规 `Routine` · 0.517 | 195 |
|
| 55 |
+
| #2 `brute_force` | 95 次登录失败后出现一次成功登录 | 调查 · 0.650 | 高 `High` · 0.683 / 紧急 `Critical` · 0.733 | 182 |
|
| 56 |
+
| #3 `disabled_logging` | 主机 `auditd` 停止,审计日志中断 45 分钟 | 调查 · 0.633 | 高 · 0.467 / 升高 `Elevated` · 0.417 | 191 |
|
| 57 |
+
| #5 `mass_download` | 未识别来源在 60 秒内读取 450 个文件 | 调查 · 0.617 | 高 · 0.517 / 紧急 · 0.567 | 191 |
|
| 58 |
+
| #6 `data_egress` | CI runner 向外部目的地传输 12 GB 数据,来源网络未识别 | 调查 · 0.600 | 中 `Moderate` · 0.467 / 升高 · 0.437 | 186 |
|
| 59 |
+
| #7 `suspicious_process` | 服务器执行未知二进制 `svc_monitor.exe` | 调查 · 0.650 | 高 · 0.450 / 紧急 · 0.583 | 189 |
|
| 60 |
+
| #9 `privilege_escalation` | CI runner 在变更窗口外成功提升权限 | 遏制 `contain` · 0.633 | 中 · 0.500 / 紧急 · 0.684 | 192 |
|
| 61 |
+
| #17 `malware_signature` | 终端代理命中 `Malware.Variant.Alpha` 特征 | 调查 · 0.550 | 中 · 0.517 / 升高 · 0.517 | 185 |
|
| 62 |
+
| #19 `token_reuse` | 特权承包商账号的会话令牌从第二个地址出现 | 调查 · 0.690 | 高 · 0.593 / 紧急 · 0.450 | 186 |
|
| 63 |
+
| #20 `new_country_login` | 首次从陌生国家登录,但 MFA 成功且来源在 allowlist | 监控 `monitor` · 0.517 | 低 · 0.400 / 常规 · 0.483 | 203 |
|
| 64 |
+
| #22 `impossible_travel` | 共享邮箱短时间内从远距离地点登录,来源均在 allowlist | 关闭为良性 `close_benign` · 0.600 | 高 · 0.500 / 常规 · 0.383 | 183 |
|
| 65 |
+
| #25 `config_drift` | 安全组新增 `0.0.0.0/0` 到 TCP/22 的入站规则 | 调查 · 0.600 | 高 · 0.433 / 紧急 · 0.450 | 187 |
|
| 66 |
+
|
| 67 |
+
处置标签对应的是模型的结构化决策空间:`monitor` 用于继续观察,`investigate` 用于升级调查,`contain` 表示建议进入经授权的遏制流程,`close_benign` 表示可进入良性关闭流程。它们是数据集中的 gold 标签示例,不表示已执行的响应动作;生产流程应由分析师核实证据并授权。
|
| 68 |
+
|
| 69 |
+
### 📘 安全知识问答与基准评测
|
| 70 |
+
|
| 71 |
+
认证题库和知识评测可以用 `choice` 输出稳定选项,支持题库回归、分类统计与错题分析。例如 CS-Eval 样例:
|
| 72 |
+
|
| 73 |
+
> **题目:** What do researchers continue to explore to enhance deep learning's impact on cybersecurity?
|
| 74 |
+
> **选项片段:** B) Hybrid approaches and novel architectures
|
| 75 |
+
> **数据集 Gold:** `B`
|
| 76 |
+
|
| 77 |
+
Gold 是数据集标注,多选题在训练数据中会被规范化为多个 `noul` 判断;这便于统一评测,但不等同于生成式模型输出完整解释。
|
| 78 |
+
|
| 79 |
+
## 🚀 快速开始 | Quickstart
|
| 80 |
+
|
| 81 |
+
建议使用 Python 3.10+、CUDA 版 PyTorch 和 GPU 环境。该 checkpoint 按 `laya==0.3.3` 训练和验证,建议固定运行时版本:
|
| 82 |
+
|
| 83 |
+
```bash
|
| 84 |
+
python -m pip install "laya==0.3.3"
|
| 85 |
+
```
|
| 86 |
+
|
| 87 |
+
### 💻 真实事件样例结构化研判
|
| 88 |
+
|
| 89 |
+
如安全事件告警:休眠 180 天、未启用 MFA 的服务账号成功登录。
|
| 90 |
+
|
| 91 |
+
```python
|
| 92 |
+
import json
|
| 93 |
+
from pathlib import Path
|
| 94 |
+
import laya
|
| 95 |
+
|
| 96 |
+
sample = """
|
| 97 |
+
{
|
| 98 |
+
"state": {
|
| 99 |
+
"alert": {
|
| 100 |
+
"description": "a long-unused account became active",
|
| 101 |
+
"evidence": "The unprivileged service account `svc_task_alpha` initiated a session from IP `198.51.100.24` following 180 days of zero activity. Authentication was successful without MFA using credentials that were last rotated six months ago.",
|
| 102 |
+
"rule": "dormant_account_use"
|
| 103 |
+
},
|
| 104 |
+
"context": {
|
| 105 |
+
"asset_criticality": "low",
|
| 106 |
+
"change_window_active": false,
|
| 107 |
+
"source_on_allowlist": false
|
| 108 |
+
},
|
| 109 |
+
"history": {
|
| 110 |
+
"credential_rotation_days_ago": 180,
|
| 111 |
+
"distinct_countries_30d": 4,
|
| 112 |
+
"logins_30d": 287,
|
| 113 |
+
"prior_alerts_90d": 8
|
| 114 |
+
},
|
| 115 |
+
"principal": {
|
| 116 |
+
"mfa_enrolled": false,
|
| 117 |
+
"name": "usr-support-752",
|
| 118 |
+
"privileges": [
|
| 119 |
+
"repo:read"
|
| 120 |
+
],
|
| 121 |
+
"type": "service_account"
|
| 122 |
+
}
|
| 123 |
+
},
|
| 124 |
+
"questions": {
|
| 125 |
+
"credential_compromise": {
|
| 126 |
+
"instructions": "The evidence indicates a credential or account has been compromised.",
|
| 127 |
+
"type": "noul"
|
| 128 |
+
},
|
| 129 |
+
"disposition": {
|
| 130 |
+
"criteria": {
|
| 131 |
+
"close_benign": "Expected, explainable activity; close without analyst time.",
|
| 132 |
+
"contain": "Contain the host or account immediately; do not wait for triage.",
|
| 133 |
+
"investigate": "Warrants an analyst opening an investigation.",
|
| 134 |
+
"monitor": "Not clearly malicious, but worth watching for recurrence."
|
| 135 |
+
},
|
| 136 |
+
"instructions": "How should this security alert be dispositioned?",
|
| 137 |
+
"type": "choice"
|
| 138 |
+
},
|
| 139 |
+
"severity": {
|
| 140 |
+
"criteria": [
|
| 141 |
+
"Negligible: no access to anything sensitive.",
|
| 142 |
+
"Low: limited access, easily reversed.",
|
| 143 |
+
"Moderate: access to internal systems or non-public data.",
|
| 144 |
+
"High: access to production, secrets or customer data.",
|
| 145 |
+
"Critical: active compromise of crown-jewel systems."
|
| 146 |
+
],
|
| 147 |
+
"instructions": "How severe is the potential impact if this alert is real?",
|
| 148 |
+
"type": "score"
|
| 149 |
+
},
|
| 150 |
+
"true_positive": {
|
| 151 |
+
"criteria": {
|
| 152 |
+
"false": "Benign activity, a misconfiguration, or a known false positive.",
|
| 153 |
+
"true": "The underlying behaviour is malicious or unauthorised."
|
| 154 |
+
},
|
| 155 |
+
"instructions": "This alert reflects genuinely malicious or unauthorised activity.",
|
| 156 |
+
"type": "noul"
|
| 157 |
+
},
|
| 158 |
+
"urgency": {
|
| 159 |
+
"criteria": [
|
| 160 |
+
"No time pressure; can wait indefinitely.",
|
| 161 |
+
"Routine; handle within the normal queue.",
|
| 162 |
+
"Elevated; should be handled within the same week.",
|
| 163 |
+
"Critical; requires action within the same day."
|
| 164 |
+
],
|
| 165 |
+
"instructions": "How quickly must a responder act on this alert?",
|
| 166 |
+
"type": "score"
|
| 167 |
+
}
|
| 168 |
+
}
|
| 169 |
+
}
|
| 170 |
+
"""
|
| 171 |
+
|
| 172 |
+
model_dir = "/path/to/Yeev" # 替换为包含 model.safetensors 的 checkpoint 目录
|
| 173 |
+
agent = laya.load(model_dir, device="cuda")
|
| 174 |
+
result = agent.predict(sample["state"], sample["questions"])
|
| 175 |
+
|
| 176 |
+
print("事件规则:", sample["state"]["alert"]["rule"])
|
| 177 |
+
print("事件摘要:", sample["state"]["alert"]["description"])
|
| 178 |
+
print("Yeev 回复:")
|
| 179 |
+
print(json.dumps(result["answers"], ensure_ascii=False, indent=2))
|
| 180 |
+
print("Gold(仅作标签参考):")
|
| 181 |
+
print(json.dumps(sample["gold"], ensure_ascii=False, indent=2))
|
| 182 |
+
```
|
| 183 |
+
|
| 184 |
+
#### 🗣️ 模型回复实例
|
| 185 |
+
|
| 186 |
+
```json
|
| 187 |
+
{
|
| 188 |
+
"credential_compromise": {
|
| 189 |
+
"noul": 0.5244,
|
| 190 |
+
"confidence": 0.5244
|
| 191 |
+
},
|
| 192 |
+
"disposition": {
|
| 193 |
+
"choice": "investigate",
|
| 194 |
+
"probabilities": {
|
| 195 |
+
"close_benign": 0.0725,
|
| 196 |
+
"contain": 0.048,
|
| 197 |
+
"investigate": 0.5835,
|
| 198 |
+
"monitor": 0.2959
|
| 199 |
+
},
|
| 200 |
+
"confidence": 0.2709
|
| 201 |
+
},
|
| 202 |
+
"severity": {
|
| 203 |
+
"score": 1.1511,
|
| 204 |
+
"probabilities": {
|
| 205 |
+
"0": 0.2075,
|
| 206 |
+
"1": 0.5032,
|
| 207 |
+
"2": 0.23,
|
| 208 |
+
"3": 0.0491,
|
| 209 |
+
"4": 0.0101
|
| 210 |
+
},
|
| 211 |
+
"confidence": 0.2517
|
| 212 |
+
},
|
| 213 |
+
"true_positive": {
|
| 214 |
+
"noul": 0.5377,
|
| 215 |
+
"confidence": 0.5377
|
| 216 |
+
},
|
| 217 |
+
"urgency": {
|
| 218 |
+
"score": 1.3916,
|
| 219 |
+
"probabilities": {
|
| 220 |
+
"0": 0.098,
|
| 221 |
+
"1": 0.5022,
|
| 222 |
+
"2": 0.3101,
|
| 223 |
+
"3": 0.0897
|
| 224 |
+
},
|
| 225 |
+
"confidence": 0.1683
|
| 226 |
+
}
|
| 227 |
+
}
|
| 228 |
+
```
|
| 229 |
+
|
| 230 |
+
本例中,模型选择 `investigate`;严重性分布以 `1`(Low)最高,紧急度分布以 `1`(Routine)最高。对应 Gold 的 `disposition=investigate` 概率为 0.583333。
|
| 231 |
+
|
| 232 |
+
|
| 233 |
+
## 📊 评测结果 | Evaluation
|
| 234 |
+
|
| 235 |
+
| Benchmark | Cases | Decisions | Hard accuracy | Case exact match |
|
| 236 |
+
|---|---:|---:|---:|---:|
|
| 237 |
+
| CISSP | 3,741 | 3,741 | 99.09% | 99.09% |
|
| 238 |
+
| CISP | 1,298 | 1,298 | 99.31% | 99.31% |
|
| 239 |
+
| CS-Eval | 4,368 | 5,179 | 98.47% | 98.21% |
|
| 240 |
+
| Security incident | 2,270 | 11,350 | 98.98% | 95.46% |
|
| 241 |
+
|
| 242 |
+
### 🏅 CS-Eval 评审结果 | CS-Eval Benchmark
|
| 243 |
+
|
| 244 |
+
| 评审维度 | 得分 |
|
| 245 |
+
|---|---:|
|
| 246 |
+
| **综合得分** | **89.47** |
|
| 247 |
+
| 系统安全及软件安全基础 | 93.00 |
|
| 248 |
+
| 访问控制与身份管理 | 87.16 |
|
| 249 |
+
| 加密技术与密钥管理 | 91.24 |
|
| 250 |
+
| 基础设施安全 | 89.35 |
|
| 251 |
+
| AI 与网络安全 | 93.07 |
|
| 252 |
+
| 漏洞管理与渗透测试 | 90.61 |
|
| 253 |
+
| 威胁检测与预防 | 89.48 |
|
| 254 |
+
| 数据安全和隐私保护 | 88.10 |
|
| 255 |
+
| 供应链安全 | 92.69 |
|
| 256 |
+
| 安全架构设计 | 90.73 |
|
| 257 |
+
| 业务连续性与应急响应恢复 | 82.00 |
|
| 258 |
+
| 中文任务 | 89.31 |
|
| 259 |
+
| 英文任务 | 91.78 |
|
| 260 |
+
|
| 261 |
+
### 🔎 与 SecGPT-14B 的公开结果对照
|
| 262 |
+
|
| 263 |
+
参考 [SecGPT 的 `evaltion.py`](https://github.com/Clouditera/SecGPT/blob/main/evaltion/evaltion.py) 和 [SecGPT-14B 模型卡](https://huggingface.co/clouditera/SecGPT-14B/raw/main/README.md):
|
| 264 |
+
|
| 265 |
+
| 指标 | Yeev | SecGPT-14B |
|
| 266 |
+
|---|---:|---:|
|
| 267 |
+
| CISSP | 99.09% | 78.84% |
|
| 268 |
+
| CS-EVAL | 98.21% case exact | 88.60% |
|
| 269 |
+
| CISP | 99.31% | 未提供 |
|
| 270 |
+
| Security incident | 95.46% case exact | 未提供 |
|
| 271 |
+
|
| 272 |
+
## ⚙️ 技术说明 | Technical Notes
|
| 273 |
+
|
| 274 |
+
- Yeev 使用非自回归 typed-decision 推理,不需要从自然语言回答中解析 `A/B/C/D`。
|
| 275 |
+
- 每个调用中的问题可以拥有不同的选项集合;选项描述和问题说明会参与编码。
|
| 276 |
+
- `choice` 返回选项概率分布;`score` 返回有序分布和期望分数;`noul` 返回 `true` 概率。
|
| 277 |
+
- 当前 checkpoint 的训练配置为 `max_len=1024`、`head_max_len=256`;长输入和大量选项应先在目标环境做上下文长度验证。
|
| 278 |
+
- 生产使用前应在独立验证集上重新校准概率,并设置人工升级、审计日志和权限边界。
|
| 279 |
+
|
| 280 |
+
## ⚠️ 限制与安全边界 | Limitations
|
| 281 |
+
|
| 282 |
+
1. README 中的 benchmark 数字不是独立测试集或生产质量保证。
|
| 283 |
+
2. 题库标签可能存在错误、版本差异和过时知识;应核验高风险结论。
|
| 284 |
+
3. Security incident 数据包含场景规则监督,输出概率不等同于真实世界事件发生概率。
|
| 285 |
+
4. 模型不能替代安全分析师,也不应未经授权自动执行隔离、删除、封禁、扫描或外传数据等操作。
|
| 286 |
+
5. 使用者需要同时遵守底座模型、题库和部署环境的许可证、隐私与合规要求。
|
| 287 |
+
|
| 288 |
+
## 🔗 参考项目 | References
|
| 289 |
+
|
| 290 |
+
- [Yee-R1-mini](https://huggingface.co/sds-ai/Yee-R1-mini)
|
| 291 |
+
- [Laya](https://huggingface.co/convaiinnovations/laya)
|
| 292 |
+
|
| 293 |
+
> Yeev is intended for research, evaluation, and human-in-the-loop security workflows. Validate labels and calibrate probabilities on an independent validation set before deployment.
|
| 294 |
+
|
encoder/config.json
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"ModernBertForMaskedLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 50281,
|
| 8 |
+
"classifier_activation": "gelu",
|
| 9 |
+
"classifier_bias": false,
|
| 10 |
+
"classifier_dropout": 0.0,
|
| 11 |
+
"classifier_pooling": "mean",
|
| 12 |
+
"cls_token_id": 50281,
|
| 13 |
+
"decoder_bias": true,
|
| 14 |
+
"deterministic_flash_attn": false,
|
| 15 |
+
"dtype": "float32",
|
| 16 |
+
"embedding_dropout": 0.0,
|
| 17 |
+
"eos_token_id": 50282,
|
| 18 |
+
"global_attn_every_n_layers": 3,
|
| 19 |
+
"gradient_checkpointing": false,
|
| 20 |
+
"hidden_activation": "gelu",
|
| 21 |
+
"hidden_size": 1024,
|
| 22 |
+
"initializer_cutoff_factor": 2.0,
|
| 23 |
+
"initializer_range": 0.02,
|
| 24 |
+
"intermediate_size": 2624,
|
| 25 |
+
"layer_norm_eps": 1e-05,
|
| 26 |
+
"layer_types": [
|
| 27 |
+
"full_attention",
|
| 28 |
+
"sliding_attention",
|
| 29 |
+
"sliding_attention",
|
| 30 |
+
"full_attention",
|
| 31 |
+
"sliding_attention",
|
| 32 |
+
"sliding_attention",
|
| 33 |
+
"full_attention",
|
| 34 |
+
"sliding_attention",
|
| 35 |
+
"sliding_attention",
|
| 36 |
+
"full_attention",
|
| 37 |
+
"sliding_attention",
|
| 38 |
+
"sliding_attention",
|
| 39 |
+
"full_attention",
|
| 40 |
+
"sliding_attention",
|
| 41 |
+
"sliding_attention",
|
| 42 |
+
"full_attention",
|
| 43 |
+
"sliding_attention",
|
| 44 |
+
"sliding_attention",
|
| 45 |
+
"full_attention",
|
| 46 |
+
"sliding_attention",
|
| 47 |
+
"sliding_attention",
|
| 48 |
+
"full_attention",
|
| 49 |
+
"sliding_attention",
|
| 50 |
+
"sliding_attention",
|
| 51 |
+
"full_attention",
|
| 52 |
+
"sliding_attention",
|
| 53 |
+
"sliding_attention",
|
| 54 |
+
"full_attention"
|
| 55 |
+
],
|
| 56 |
+
"local_attention": 128,
|
| 57 |
+
"max_position_embeddings": 8192,
|
| 58 |
+
"mlp_bias": false,
|
| 59 |
+
"mlp_dropout": 0.0,
|
| 60 |
+
"model_type": "modernbert",
|
| 61 |
+
"norm_bias": false,
|
| 62 |
+
"norm_eps": 1e-05,
|
| 63 |
+
"num_attention_heads": 16,
|
| 64 |
+
"num_hidden_layers": 28,
|
| 65 |
+
"pad_token_id": 50283,
|
| 66 |
+
"position_embedding_type": "absolute",
|
| 67 |
+
"repad_logits_with_grad": false,
|
| 68 |
+
"rope_parameters": {
|
| 69 |
+
"full_attention": {
|
| 70 |
+
"rope_theta": 160000.0,
|
| 71 |
+
"rope_type": "default"
|
| 72 |
+
},
|
| 73 |
+
"sliding_attention": {
|
| 74 |
+
"rope_theta": 10000.0,
|
| 75 |
+
"rope_type": "default"
|
| 76 |
+
}
|
| 77 |
+
},
|
| 78 |
+
"sep_token_id": 50282,
|
| 79 |
+
"sparse_pred_ignore_index": -100,
|
| 80 |
+
"sparse_prediction": false,
|
| 81 |
+
"tie_word_embeddings": true,
|
| 82 |
+
"transformers_version": "5.18.0.dev0",
|
| 83 |
+
"vocab_size": 50368
|
| 84 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:746c0f8b9333fe686ee410139603afe6984420dc1b135e475697a825c4695c9b
|
| 3 |
+
size 842609220
|
rl_agent_config.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"encoder": "answerdotai/ModernBERT-large",
|
| 3 |
+
"head_layers": 2,
|
| 4 |
+
"max_len": 1024,
|
| 5 |
+
"head_max_len": 256,
|
| 6 |
+
"max_prefixes": 6,
|
| 7 |
+
"act_costs": {
|
| 8 |
+
"escalate": 0.5
|
| 9 |
+
},
|
| 10 |
+
"cost_wrong_act": 3.0,
|
| 11 |
+
"amp_dtype": "fp16",
|
| 12 |
+
"model_name": "laya-security-incidents",
|
| 13 |
+
"temperature": [
|
| 14 |
+
1.0,
|
| 15 |
+
1.0,
|
| 16 |
+
1.0
|
| 17 |
+
],
|
| 18 |
+
"temperature_by_options": {},
|
| 19 |
+
"training": {
|
| 20 |
+
"data_format": "laya-readable-training-v1",
|
| 21 |
+
"data_sha256": "d1508c7ed6e84cba75a520d89ddde35c0c4ba4b6b09b4ec8381ef8ed28043d83",
|
| 22 |
+
"fit_decisions": 21568,
|
| 23 |
+
"temperature_calibration": "not_performed",
|
| 24 |
+
"tokenizer_sha256": "6c8aaa9a542084f2457eab775d4eeb51f92a70c0fd9de28d5edb0ddec3c08d30",
|
| 25 |
+
"max_len": 1024,
|
| 26 |
+
"head_max_len": 256,
|
| 27 |
+
"epochs_completed": 10,
|
| 28 |
+
"world_size": 2,
|
| 29 |
+
"micro_batch_per_gpu": 4,
|
| 30 |
+
"gradient_accumulation": 8,
|
| 31 |
+
"effective_batch_size": 64,
|
| 32 |
+
"lr_encoder": 2.5e-05,
|
| 33 |
+
"lr_head": 0.0001,
|
| 34 |
+
"seed": 42,
|
| 35 |
+
"base_model": "convaiinnovations/laya",
|
| 36 |
+
"base_model_revision": "1c5edc17a7acd8701df6fc341c0d179f1c62c982",
|
| 37 |
+
"act_head_frozen": true,
|
| 38 |
+
"seconds": 13999.479
|
| 39 |
+
},
|
| 40 |
+
"gradient_checkpointing": true,
|
| 41 |
+
"fine_tuned": true
|
| 42 |
+
}
|
tokenizer/tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer/tokenizer_config.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"clean_up_tokenization_spaces": true,
|
| 3 |
+
"cls_token": "[CLS]",
|
| 4 |
+
"local_files_only": false,
|
| 5 |
+
"mask_token": "[MASK]",
|
| 6 |
+
"model_input_names": [
|
| 7 |
+
"input_ids",
|
| 8 |
+
"attention_mask"
|
| 9 |
+
],
|
| 10 |
+
"model_max_length": 8192,
|
| 11 |
+
"pad_token": "[PAD]",
|
| 12 |
+
"sep_token": "[SEP]",
|
| 13 |
+
"tokenizer_class": "PreTrainedTokenizerFast",
|
| 14 |
+
"unk_token": "[UNK]"
|
| 15 |
+
}
|
training_manifest.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"data_format": "laya-readable-training-v1",
|
| 3 |
+
"data_sha256": "d1508c7ed6e84cba75a520d89ddde35c0c4ba4b6b09b4ec8381ef8ed28043d83",
|
| 4 |
+
"fit_decisions": 21568,
|
| 5 |
+
"temperature_calibration": "not_performed",
|
| 6 |
+
"tokenizer_sha256": "6c8aaa9a542084f2457eab775d4eeb51f92a70c0fd9de28d5edb0ddec3c08d30",
|
| 7 |
+
"max_len": 1024,
|
| 8 |
+
"head_max_len": 256,
|
| 9 |
+
"epochs_completed": 10,
|
| 10 |
+
"world_size": 2,
|
| 11 |
+
"micro_batch_per_gpu": 4,
|
| 12 |
+
"gradient_accumulation": 8,
|
| 13 |
+
"effective_batch_size": 64,
|
| 14 |
+
"lr_encoder": 2.5e-05,
|
| 15 |
+
"lr_head": 0.0001,
|
| 16 |
+
"seed": 42,
|
| 17 |
+
"base_model": "convaiinnovations/laya",
|
| 18 |
+
"base_model_revision": "1c5edc17a7acd8701df6fc341c0d179f1c62c982",
|
| 19 |
+
"act_head_frozen": true,
|
| 20 |
+
"seconds": 13999.479
|
| 21 |
+
}
|