aashish1904 commited on
Commit
ed71d0e
·
verified ·
1 Parent(s): 2c32ea9

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +240 -0
README.md ADDED
@@ -0,0 +1,240 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+
4
+ base_model:
5
+ - meta-llama/Llama-3.1-8B
6
+ language:
7
+ - en
8
+ library_name: transformers
9
+ license: apache-2.0
10
+ pipeline_tag: text-generation
11
+ tags:
12
+ - security
13
+
14
+ ---
15
+
16
+ [![QuantFactory Banner](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeiuCm7c8lEwEJuRey9kiVZsRn2W-b4pWlu3-X534V3YmVuVc2ZL-NXg2RkzSOOS2JXGHutDuyyNAUtdJI65jGTo8jT9Y99tMi4H4MqL44Uc5QKG77B0d6-JfIkZHFaUA71-RtjyYZWVIhqsNZcx8-OMaA?key=xt3VSDoCbmTY7o-cwwOFwQ)](https://hf.co/QuantFactory)
17
+
18
+
19
+ # QuantFactory/Foundation-Sec-8B-GGUF
20
+ This is quantized version of [fdtn-ai/Foundation-Sec-8B](https://huggingface.co/fdtn-ai/Foundation-Sec-8B) created using llama.cpp
21
+
22
+ # Original Model Card
23
+
24
+
25
+ # Foundation-Sec-8B - Model Card
26
+
27
+ ## Model Information
28
+
29
+ Foundation-Sec-8B (Llama-3.1-FoundationAI-SecurityLLM-base-8B) is an open-weight, 8-billion parameter base language model specialized for cybersecurity applications. It extends Llama-3.1-8B model through continued pretraining on a curated corpus of cybersecurity-specific text, including threat intelligence reports, vulnerability databases, incident response documentation, and security standards. It has been trained to understand security concepts, terminology, and practices across multiple security domains. The model is designed to serve as a domain-adapted base model for use in applications such as threat detection, vulnerability assessment, security automation, and attack simulation. Foundation-Sec-8B enables organizations to build AI-driven security tools that can be deployed locally, reducing dependency on cloud-based AI services while maintaining high performance on security-related tasks.
30
+
31
+ - **Model Name:** Foundation-Sec-8B (Llama-3.1-FoundationAI-SecurityLLM-base-8B)
32
+ - **Model Developer:** Amin Karbasi and team at Foundation AI — Cisco
33
+ - **Technical Report:** [`https://arxiv.org/abs/2504.21039`](https://arxiv.org/abs/2504.21039)
34
+ - **Model Card Contact:** For questions about the team, model usage, and future directions, contact [`karbasi@cisco.com`](mailto:karbasi@cisco.com). For technical questions about the model, please contact [`paulkass@cisco.com`](mailto:paulkass@cisco.com).
35
+ - **Model Release Date:** April 28, 2025
36
+ - **Supported Language(s):** English
37
+ - **Model Architecture:** Auto-regressive language model that uses an optimized transformer architecture (Meta Llama-3.1-8B backbone)
38
+ - **Training Objective:** Continued pre-training on cybersecurity-specific corpus
39
+ - **Training Data Status:** This is a static model trained on an offline dataset. Future versions of the tuned models will be released on updated data.
40
+ - **License:** Apache 2.0
41
+
42
+
43
+
44
+ ## Intended Use
45
+
46
+ ### Intended Use Cases
47
+
48
+ Foundation-Sec-8B is designed for security practitioners, researchers, and developers building AI-powered security workflows and applications. Foundation-Sec-8B is optimized for three core use case categories:
49
+
50
+ - **SOC Acceleration**: Automating triage, summarization, case note generation, and evidence collection.
51
+ - **Proactive Threat Defense**: Simulating attacks, prioritizing vulnerabilities, mapping TTPs, and modeling attacker behavior.
52
+ - **Engineering Enablement**: Providing security assistance, validating configurations, assessing compliance evidence, and improving security posture.
53
+
54
+ The model is intended for local deployment in environments prioritizing data security, regulatory compliance, and operational control.
55
+
56
+ ### Downstream Use
57
+
58
+ Foundation-Sec-8B can be used directly for security-related language tasks and serves as a strong starting point for fine-tuning across a variety of cybersecurity workflows. Example downstream applications include:
59
+
60
+ - Summarization
61
+ - Summarizing detection playbooks and incident reports
62
+ - Consolidating fragmented analyst notes into structured case summaries
63
+ - Classification
64
+ - Mapping threats to MITRE ATT&CK techniques
65
+ - Prioritizing vulnerabilities based on contextual risk
66
+ - Classifying security-relevant emails and leaked file contents
67
+ - Named Entity Recognition
68
+ - Extracting compliance evidence from documents
69
+ - Building network behavior profiles from technical manuals
70
+ - Question & Answer
71
+ - Assisting SOC analysts with alert triage and investigation
72
+ - Responding to cloud security and software compliance queries
73
+ - Reasoning and Text Generation
74
+ - Generating red-team attack plans and threat models
75
+ - Predicting attacker next steps in active investigations
76
+ - Enriching vulnerability scan results with contextual insights
77
+
78
+ For questions or assistance with fine-tuning Foundation-Sec-8B, please contact **Paul Kassianik** (paulkass@cisco.com) or **Dhruv Kedia** (dkedia@cisco.com).
79
+
80
+ ### Out-of-Scope Use
81
+
82
+ The following uses are out-of-scope and are neither recommended nor intended use cases:
83
+
84
+ 1. **Generating harmful content** - The model should not be used to:
85
+ - Generate malware or other malicious code
86
+ - Create phishing content or social engineering scripts
87
+ - Develop attack plans targeting specific organizations
88
+ - Design exploitation techniques for vulnerabilities without legitimate security research purposes
89
+ 2. **Critical security decisions without human oversight** - The model should not be used for:
90
+ - Autonomous security decision-making without human review
91
+ - Critical infrastructure protection without expert supervision
92
+ - Final determination of security compliance without human verification
93
+ - Autonomous vulnerability remediation without testing
94
+ 3. **Legal or medical advice** - The model is not qualified to provide:
95
+ - Legal advice regarding security regulations, compliance requirements, or intellectual property disputes
96
+ - Legal advice regarding security issues that would reference legal statutes, precedents, or case law necessary to provide legal advice
97
+ - Medical advice regarding health impacts of security incidents
98
+ 4. **Non-security use cases** - The model is specifically optimized for cybersecurity and may not perform as well on general tasks as models trained for broader applications.
99
+ 5. **Violation of Laws or Regulations** - Any use that violates applicable laws or regulations.
100
+
101
+ ## How to Get Started with the Model
102
+
103
+ Use the code below to get started with the model.
104
+
105
+ ```python
106
+ # Import the required libraries
107
+ import torch
108
+ from transformers import AutoTokenizer, AutoModelForCausalLM
109
+
110
+ # Load the model and tokenizer
111
+ tokenizer = AutoTokenizer.from_pretrained("fdtn-ai/Foundation-Sec-8B")
112
+ model = AutoModelForCausalLM.from_pretrained("fdtn-ai/Foundation-Sec-8B")
113
+
114
+ # Example: Matching CWE to CVE IDs
115
+ prompt="""CVE-2021-44228 is a remote code execution flaw in Apache Log4j2 via unsafe JNDI lookups (“Log4Shell”). The CWE is CWE-502.
116
+
117
+ CVE-2017-0144 is a remote code execution vulnerability in Microsoft’s SMBv1 server (“EternalBlue”) due to a buffer overflow. The CWE is CWE-119.
118
+
119
+ CVE-2014-0160 is an information-disclosure bug in OpenSSL’s heartbeat extension (“Heartbleed”) causing out-of-bounds reads. The CWE is CWE-125.
120
+
121
+ CVE-2017-5638 is a remote code execution issue in Apache Struts 2’s Jakarta Multipart parser stemming from improper input validation of the Content-Type header. The CWE is CWE-20.
122
+
123
+ CVE-2019-0708 is a remote code execution vulnerability in Microsoft’s Remote Desktop Services (“BlueKeep”) triggered by a use-after-free. The CWE is CWE-416.
124
+
125
+ CVE-2015-10011 is a vulnerability about OpenDNS OpenResolve improper log output neutralization. The CWE is"""
126
+
127
+ # Tokenize the input
128
+ inputs = tokenizer(prompt, return_tensors="pt")
129
+
130
+ # Generate the response
131
+ outputs = model.generate(
132
+ inputs["input_ids"],
133
+ max_new_tokens=3,
134
+ do_sample=True,
135
+ temperature=0.1,
136
+ top_p=0.9,
137
+ )
138
+
139
+ # Decode and print the response
140
+ response = tokenizer.decode(outputs[0], skip_special_tokens=True)
141
+ response = response.replace(prompt, "").strip()
142
+ print(response)
143
+ ```
144
+
145
+ ## Training and Evaluation
146
+
147
+ ### Training Data
148
+
149
+ Foundation-sec-8B was pretrained on approximately **5.1 billion tokens** of cybersecurity-specific data curated in-house by Cisco’s Foundation AI team. The dataset was meticulously collected from public sources on the web.
150
+
151
+ The pre-training corpus was built through a multi-stage pipeline that included large-scale web crawling, relevancy filtering, deduplication, and quality filtering.
152
+
153
+ **Data cutoff:** April 10th, 2025.
154
+
155
+ More detailed methodology is available in the technical report.
156
+
157
+ ### Training Setup
158
+
159
+ Foundation-sec-8B is based on the **Llama 3.1 8B** architecture. Pre-training was performed on Cisco Foundation AI’s internal compute cluster.
160
+
161
+ Key training details:
162
+
163
+ - **Continued pretraining** for cybersecurity specialization
164
+ - **4096-token** sequence length
165
+ - **Optimizer:** AdamW
166
+
167
+ More detailed methodology is available in the technical report.
168
+
169
+ ### Evaluation
170
+
171
+ Foundation-sec-8B was benchmarked on cybersecurity and general reasoning tasks, using a standardized 5-shot prompting setup (temperature = 0.3).
172
+
173
+ | **Benchmark** | **Foundation-sec-8B** | **Llama 3.1 8B** | **Llama 3.1 70B** |
174
+ | --- | --- | --- | --- |
175
+ | CTI-MCQA | 67.39 | 64.14 | 68.23 |
176
+ | CTI-RCM | 75.26 | 66.43 | 72.66 |
177
+
178
+ **Benchmark Overview:**
179
+
180
+ - **CTI-MCQA:** 2,500 multiple-choice questions testing cybersecurity knowledge across frameworks like MITRE ATT&CK, NIST, GDPR, and threat intelligence best practices.
181
+ - **CTI-RCM:** 900+ vulnerability root cause mapping examples linking CVEs to CWE categories, assessing deep understanding of security weaknesses.
182
+
183
+ **Key highlights:**
184
+
185
+ - **+3 to +9 point gains** over Llama-3.1-8B across security-specific benchmarks.
186
+ - **Comparable or better** performance than Llama-3.1-70B on cyber threat intelligence tasks.
187
+ - **Minimal drop (~2%)** in general language reasoning (MMLU) despite cybersecurity specialization.
188
+
189
+ For full benchmark details and evaluation methodology, please refer to the technical report.
190
+
191
+ ## Limitations
192
+
193
+ Foundation-Sec-8B has several limitations that users should be aware of:
194
+
195
+ 1. **Domain-specific knowledge limitations**:
196
+ - Foundation-Sec-8B may not be familiar with recent vulnerabilities, exploits, or novel attack vectors or security technologies released after its training cutoff date
197
+ - Knowledge of specialized or proprietary security systems or tools may be limited
198
+ 2. **Potential biases**:
199
+ - The model may reflect biases present in security literature and documentation
200
+ - The model may be trained on known attack patterns and have difficulty recognizing novel attack vectors
201
+ - Security practices and recommendations may be biased toward certain technological ecosystems
202
+ - Geographic and cultural biases in security approaches may be present
203
+ 3. **Security risks**:
204
+ - The model cannot verify the identity or intentions of users
205
+ - Adversarial prompting techniques might potentially bypass safety mechanisms
206
+ - The model may unintentionally provide information that could be misused if proper prompting guardrails are not implemented
207
+ 4. **Contextual blindness:**
208
+ - The model may struggle to understand the complex interrelationships between systems, users, and data in order to provide accurate context.
209
+ 5. **Technical limitations**:
210
+ - Performance varies based on how security concepts are described in prompts
211
+ - May not fully understand complex, multi-step security scenarios without clear explanation
212
+ - Cannot access external systems or actively scan environments
213
+ - Cannot independently verify factual accuracy of its outputs
214
+ 6. **Ethical considerations**:
215
+ - Dual-use nature of security knowledge requires careful consideration of appropriate use cases
216
+
217
+
218
+ ### Recommendations
219
+
220
+ To address the limitations of Foundation-Sec-8B, we recommend:
221
+
222
+ 1. **Human oversight**:
223
+ - Always have qualified security professionals review model outputs before implementation
224
+ - Use the model as an assistive tool rather than a replacement for expert human judgment
225
+ - Implement a human-in-the-loop approach for security-critical applications
226
+ 2. **System design safeguards**:
227
+ - Implement additional validation layers for applications built with this model
228
+ - Consider architectural constraints that limit the model's ability to perform potentially harmful actions (excessive agency)
229
+ - Deploy the model in environments with appropriate access controls
230
+ 3. **Prompt engineering**:
231
+ - Use carefully designed prompts that encourage ethical security practices
232
+ - Include explicit instructions regarding responsible disclosure and ethical hacking principles
233
+ - Structure interactions to minimize the risk of inadvertently harmful outputs
234
+ 4. **Knowledge supplementation**:
235
+ - Supplement the model with up-to-date security feeds and databases
236
+ - Implement retrieval-augmented generation for current threat intelligence sources
237
+ 5. **Usage policies**:
238
+ - Develop and enforce clear acceptable use policies for applications using this model
239
+ - Implement monitoring and auditing for high-risk applications
240
+ - Create documentation for end users about the model's limitations