CVRP commited on
Commit
73ce1b8
·
verified ·
1 Parent(s): d2d5ed8

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +325 -0
README.md ADDED
@@ -0,0 +1,325 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: meta-llama/Llama-3.1-8B-Instruct
3
+ library_name: peft
4
+ model_name: corvus-v2-8b
5
+ license: llama3.1
6
+ gated: true
7
+ extra_gated_heading: "Acknowledge license to access Corvus v2"
8
+ extra_gated_description: "Access is automatically approved after you confirm the license and intended defensive use."
9
+ extra_gated_button_content: "Agree and get access"
10
+ extra_gated_prompt: "By requesting access, you agree to the Llama 3.1 Community License, confirm you will use Corvus v2 for defensive vulnerability triage, and consent to share your contact details with CVERiskPilot."
11
+ extra_gated_fields:
12
+ Organization: text
13
+ Role:
14
+ type: select
15
+ options:
16
+ - Security Engineer
17
+ - Security Leader
18
+ - Developer
19
+ - Researcher
20
+ - Consultant / MSSP
21
+ - Student
22
+ - Other
23
+ Intended use:
24
+ type: select
25
+ options:
26
+ - Internal vulnerability triage
27
+ - Client service delivery
28
+ - Research
29
+ - Evaluation / benchmarking
30
+ - Education
31
+ - Other
32
+ Deployment preference:
33
+ type: select
34
+ options:
35
+ - Local workstation
36
+ - Self-hosted GPU server
37
+ - Cloud VM / container
38
+ - Comparing before platform purchase
39
+ - Other
40
+ I have read and agree to the Llama Community License terms: checkbox
41
+ I understand Corvus v2 is for defensive vulnerability triage and not offensive security operations: checkbox
42
+ language:
43
+ - en
44
+ tags:
45
+ - security
46
+ - vulnerability-triage
47
+ - cybersecurity
48
+ - compliance
49
+ - lora
50
+ - qlora
51
+ - sft
52
+ - transformers
53
+ - trl
54
+ - gguf
55
+ pipeline_tag: text-generation
56
+ datasets:
57
+ - custom
58
+ model_type: llama
59
+ quantized_by: llama-cpp-python
60
+ ---
61
+
62
+ # Corvus v2 — Vulnerability Triage Model
63
+
64
+ **Corvus v2** is a fine-tuned Llama 3.1 8B model that produces structured triage decisions for software vulnerabilities. Given CVE data, CVSS scores, EPSS probability, KEV listing status, and asset context, it outputs a JSON decision with priority, recommended action, reasoning, and confidence score.
65
+
66
+ Built by [CVERiskPilot](https://cveriskpilot.com) — 100% Veteran Owned, Texas, USA.
67
+
68
+ ## Why This Exists
69
+
70
+ Offensive AI is accelerating. AI fuzzers are finding thousands of zero-days across every major codebase. The scanning problem is being solved. The triage problem is getting 10x harder.
71
+
72
+ Security teams are drowning in findings they can't prioritize fast enough. Attackers exploit in 5 days. Defenders patch in 209. That gap gets worse every quarter.
73
+
74
+ Corvus doesn't find vulnerabilities. It decides what to do about them — at machine speed, on local hardware, with no data leaving your environment.
75
+
76
+ ## Model Details
77
+
78
+ | Property | Value |
79
+ |----------|-------|
80
+ | Base model | `meta-llama/Llama-3.1-8B-Instruct` |
81
+ | Fine-tuning method | QLoRA (r=16, alpha=32, dropout=0.05) |
82
+ | Training examples | 50,000+ labeled vulnerability triage decisions |
83
+ | Training compute | 8x NVIDIA A100 (Vertex AI), ~1.2 hours |
84
+ | Priority accuracy | 94.8% |
85
+ | Full match (priority + action) | 82.7% |
86
+ | Training loss (final) | 0.461 |
87
+ | Throughput | 11.9 samples/sec |
88
+
89
+ ### Available Formats
90
+
91
+ | Format | Size | Use Case |
92
+ |--------|------|----------|
93
+ | `corvus-v2-f16.gguf` | 16 GB | Maximum quality, needs 16GB+ VRAM |
94
+ | `corvus-v2-q4km.gguf` | 4.6 GB | Recommended — fits 8GB GPU, minimal quality loss |
95
+
96
+ ## Intended Use
97
+
98
+ **Use this model for:** Prioritizing and triaging software vulnerabilities in security operations workflows. Deciding which CVEs need immediate attention vs. scheduled patching vs. risk acceptance.
99
+
100
+ **Do not use this model for:** Generating exploits, finding vulnerabilities, offensive security operations, or any purpose that could harm system security. This is a defensive triage tool.
101
+
102
+ **Human oversight required:** Model outputs are recommendations, not autonomous decisions. All triage decisions should be reviewed by a qualified security professional before action.
103
+
104
+ ## Output Format
105
+
106
+ Corvus outputs structured JSON with five fields:
107
+
108
+ ```json
109
+ {
110
+ "severityOverride": "EPSS in top 1% with active exploitation — upgrading from MEDIUM to CRITICAL",
111
+ "priority": "CRITICAL",
112
+ "recommendedAction": "PATCH_IMMEDIATELY",
113
+ "reasoning": "CVE-2024-XXXXX affects the authentication module in a production-facing service. EPSS score of 0.94 indicates high exploitation probability. Listed in CISA KEV with a remediation deadline. The affected package is a direct dependency with no available workaround. Asset is internet-facing with access to PII.",
114
+ "confidenceScore": 0.92
115
+ }
116
+ ```
117
+
118
+ ### Fields
119
+
120
+ | Field | Type | Description |
121
+ |-------|------|-------------|
122
+ | `severityOverride` | `string \| null` | Explanation if the model's priority differs from raw CVSS severity |
123
+ | `priority` | `string` | `CRITICAL`, `HIGH`, `MEDIUM`, or `LOW` |
124
+ | `recommendedAction` | `string` | One of 6 actions (see below) |
125
+ | `reasoning` | `string` | Detailed explanation referencing specific technical factors |
126
+ | `confidenceScore` | `number` | 0.0 to 1.0 — model's confidence in the decision |
127
+
128
+ ### Action Taxonomy
129
+
130
+ | Action | When to use |
131
+ |--------|-------------|
132
+ | `PATCH_IMMEDIATELY` | Active exploitation, critical asset, no workaround |
133
+ | `SCHEDULE_PATCH` | Important but not actively exploited, patch available |
134
+ | `MITIGATE` | Patch unavailable or risky — apply compensating controls |
135
+ | `ACCEPT_RISK` | Low impact, unreachable code path, network-isolated asset |
136
+ | `INVESTIGATE` | Insufficient data to make a confident decision |
137
+ | `DEFER` | Non-critical, low EPSS, no KEV listing, internal-only asset |
138
+
139
+ ## Quick Start
140
+
141
+ ### Ollama (Recommended)
142
+
143
+ ```bash
144
+ # Create a Modelfile
145
+ cat > Modelfile <<'EOF'
146
+ FROM ./corvus-v2-q4km.gguf
147
+
148
+ SYSTEM """You are a senior vulnerability triage analyst. Given vulnerability data including CVE details, CVSS scores, EPSS probability, KEV listing status, and asset context, produce a structured triage decision as JSON with the following fields:
149
+
150
+ - severityOverride: string or null (override reason if priority differs from CVSS)
151
+ - priority: "CRITICAL" | "HIGH" | "MEDIUM" | "LOW"
152
+ - recommendedAction: "PATCH_IMMEDIATELY" | "SCHEDULE_PATCH" | "MITIGATE" | "ACCEPT_RISK" | "INVESTIGATE" | "DEFER"
153
+ - reasoning: string (detailed explanation referencing specific technical factors)
154
+ - confidenceScore: number between 0.0 and 1.0
155
+
156
+ Output ONLY valid JSON. No markdown, no explanation outside the JSON object."""
157
+
158
+ PARAMETER temperature 0.1
159
+ PARAMETER num_predict 512
160
+ PARAMETER stop <|eot_id|>
161
+ PARAMETER stop <|end_of_text|>
162
+ EOF
163
+
164
+ # Import and run
165
+ ollama create corvus-triage -f Modelfile
166
+ ollama run corvus-triage
167
+ ```
168
+
169
+ ### llama.cpp
170
+
171
+ ```bash
172
+ ./llama-cli -m corvus-v2-q4km.gguf \
173
+ --temp 0.1 \
174
+ -p "CVE: CVE-2024-3094\nTitle: XZ Utils Backdoor\nSeverity: CRITICAL\nCVSS: 10.0\nEPSS: 0.97\nKEV: Yes\nPackage: xz-utils@5.6.0\nDescription: Malicious backdoor in XZ Utils allowing unauthorized SSH access"
175
+ ```
176
+
177
+ ### Python (transformers)
178
+
179
+ ```python
180
+ from transformers import AutoModelForCausalLM, AutoTokenizer
181
+
182
+ model = AutoModelForCausalLM.from_pretrained(
183
+ "CVRP/corvus-v2-8b",
184
+ device_map="auto",
185
+ torch_dtype="auto",
186
+ )
187
+ tokenizer = AutoTokenizer.from_pretrained("CVRP/corvus-v2-8b")
188
+
189
+ messages = [
190
+ {"role": "system", "content": "You are a senior vulnerability triage analyst..."},
191
+ {"role": "user", "content": "CVE: CVE-2024-3094\nTitle: XZ Utils Backdoor\nSeverity: CRITICAL\nCVSS: 10.0\nEPSS: 0.97\nKEV: Yes"},
192
+ ]
193
+
194
+ inputs = tokenizer.apply_chat_template(messages, return_tensors="pt").to(model.device)
195
+ outputs = model.generate(inputs, max_new_tokens=512, temperature=0.1)
196
+ print(tokenizer.decode(outputs[0][inputs.shape[-1]:], skip_special_tokens=True))
197
+ ```
198
+
199
+ ## Input Format
200
+
201
+ The model expects vulnerability data as a newline-separated key-value string:
202
+
203
+ ```
204
+ CVE: CVE-2024-3094
205
+ Title: XZ Utils Backdoor
206
+ Severity: CRITICAL
207
+ CVSS: 10.0
208
+ EPSS: 0.97
209
+ KEV: Yes
210
+ Package: xz-utils@5.6.0
211
+ Description: Malicious backdoor in XZ Utils compression library allowing unauthorized access via modified liblzma in SSH authentication path
212
+ ```
213
+
214
+ ### Supported Fields
215
+
216
+ | Field | Required | Description |
217
+ |-------|----------|-------------|
218
+ | `Title` | Yes | Vulnerability title or summary |
219
+ | `CVE` | No | CVE identifier(s), comma-separated |
220
+ | `Severity` | No | CVSS severity label (CRITICAL/HIGH/MEDIUM/LOW) |
221
+ | `CVSS` | No | CVSS base score (0.0-10.0) |
222
+ | `EPSS` | No | EPSS exploitation probability (0.0-1.0) |
223
+ | `KEV` | No | CISA Known Exploited Vulnerabilities listing (Yes/No) |
224
+ | `Package` | No | Affected package name and version |
225
+ | `Description` | No | Vulnerability description (truncated to 500 chars) |
226
+
227
+ The model performs best with more context. Providing EPSS, KEV, and CVSS together produces the most accurate triage decisions.
228
+
229
+ ## Training Data
230
+
231
+ The model was trained on 50,000+ labeled vulnerability triage examples generated through a synthetic data pipeline with 6-layer quality validation:
232
+
233
+ 1. **Real CVE data** from NVD, GHSA, OSV, and ExploitDB
234
+ 2. **Enrichment** with EPSS scores, KEV status, and CVSS vectors
235
+ 3. **Synthetic triage decisions** generated by Claude with domain-specific prompting
236
+ 4. **6-layer quality gate** — schema validation, field completeness, reasoning coherence, action-priority alignment, confidence calibration, cross-reference consistency
237
+ 5. **Class balancing** across all 6 action types and 4 priority levels
238
+ 6. **Human review** of edge cases and override patterns
239
+
240
+ The training data is not included in this release.
241
+
242
+ ## Evaluation
243
+
244
+ Evaluated on a held-out test set of 5,000 examples:
245
+
246
+ | Metric | Score |
247
+ |--------|-------|
248
+ | Priority accuracy (4-class) | 94.8% |
249
+ | Action accuracy (6-class) | 84.4% |
250
+ | Full match (priority + action) | 82.7% |
251
+ | Confidence calibration (ECE) | 0.08 |
252
+
253
+ ### Known Limitations
254
+
255
+ - **Trained on public CVE data only.** The model has no knowledge of proprietary or internal vulnerability disclosures.
256
+ - **No asset topology reasoning.** The model uses asset context fields provided in the input but cannot reason about network topology or dependency chains on its own.
257
+ - **English only.** Training data is exclusively English-language CVE descriptions.
258
+ - **Temporal cutoff.** Training data includes CVEs through early 2026. The model may be less accurate on novel vulnerability classes that emerge after this date.
259
+ - **Not a scanner.** Corvus triages known vulnerabilities. It does not discover, detect, or exploit vulnerabilities.
260
+
261
+ ## Ethical Considerations
262
+
263
+ This model is designed exclusively for defensive security operations. It helps security teams prioritize remediation work, not bypass security controls.
264
+
265
+ We release it openly because we believe defensive AI capabilities should not be gated behind enterprise contracts while offensive AI capabilities continue to advance. Security teams at organizations of every size deserve access to intelligent triage.
266
+
267
+ The model outputs recommendations, not autonomous actions. Every decision should be reviewed by a qualified professional before implementation.
268
+
269
+ ## Training Procedure
270
+
271
+ - **Method:** QLoRA (4-bit quantization + Low-Rank Adaptation)
272
+ - **Rank:** 16
273
+ - **Alpha:** 32
274
+ - **Dropout:** 0.05
275
+ - **Learning rate:** 2e-4 with cosine schedule
276
+ - **Epochs:** 3
277
+ - **Batch size:** 4 per device, gradient accumulation 4 (effective batch 128 on 8 GPUs)
278
+ - **Optimizer:** AdamW (8-bit)
279
+ - **Max sequence length:** 2048
280
+ - **Compute:** 8x NVIDIA A100 80GB (Vertex AI Custom Job)
281
+ - **Training time:** 1.2 hours (4,432 seconds)
282
+ - **Cost:** ~$30 (Vertex AI spot pricing)
283
+
284
+ ### Quantization
285
+
286
+ GGUF quantization performed with `llama-cpp-python`:
287
+
288
+ | Quantization | Size | Quality | Use case |
289
+ |-------------|------|---------|----------|
290
+ | f16 | 16 GB | Full precision | Research, benchmarking |
291
+ | Q4_K_M | 4.6 GB | Minimal loss | Production, single GPU |
292
+
293
+ ### Framework Versions
294
+
295
+ - PEFT 0.18.1
296
+ - TRL 1.0.0
297
+ - Transformers 5.5.0
298
+ - PyTorch 2.7.1+cu128
299
+ - Datasets 4.8.4
300
+ - Tokenizers 0.22.2
301
+
302
+ ## Citation
303
+
304
+ ```bibtex
305
+ @misc{corvus-v2-2026,
306
+ title={Corvus v2: A Fine-Tuned Language Model for Vulnerability Triage},
307
+ author={CVERiskPilot},
308
+ year={2026},
309
+ url={https://huggingface.co/CVRP/corvus-v2-8b},
310
+ note={QLoRA fine-tuned Llama 3.1 8B on 50K+ vulnerability triage examples}
311
+ }
312
+ ```
313
+
314
+ ## License
315
+
316
+ - **Model weights:** [Llama 3.1 Community License](https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/LICENSE)
317
+ - **Modelfile, documentation, and evaluation code:** Apache 2.0
318
+
319
+ ## Contact
320
+
321
+ - **Website:** [cveriskpilot.com](https://cveriskpilot.com)
322
+ - **GitHub:** [github.com/cveriskpilot](https://github.com/cveriskpilot)
323
+ - **LinkedIn:** [CVERiskPilot](https://linkedin.com/company/cveriskpilot)
324
+
325
+ CVERiskPilot LLC | 100% Veteran Owned | Texas, USA