athena129 commited on
Commit
2cf4da0
·
verified ·
1 Parent(s): 04b86fd

Add Hardware Requirements + Methodology sections

Browse files
Files changed (1) hide show
  1. README.md +29 -0
README.md CHANGED
@@ -95,6 +95,23 @@ The following uses are out-of-scope and are neither recommended nor intended use
95
  4. **Non-security use cases** — general chat, code generation, summarization, translation, or other domains outside its specialization will produce lower-quality output than purpose-built models.
96
  5. **Violation of laws or regulations** — including but not limited to unauthorized vulnerability scanning, illegal data access, or misuse contrary to applicable cybersecurity statutes (CFAA, GDPR, etc.).
97
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  ## How to Get Started with the Model
99
 
100
  ```python
@@ -138,6 +155,18 @@ The model was trained on a combined cybersecurity corpus of approximately **12,5
138
 
139
  Decontamination matters here: an earlier internal version (v3) of this work showed roughly 72% test-set overlap when trained on undeduplicated CTI corpora, producing inflated CTI-RCM scores that did not generalize. The released v3.4 model trains exclusively on the 2021 cohort with overlap items removed.
140
 
 
 
 
 
 
 
 
 
 
 
 
 
141
  ### Training Setup
142
 
143
  | Hyperparameter | Value |
 
95
  4. **Non-security use cases** — general chat, code generation, summarization, translation, or other domains outside its specialization will produce lower-quality output than purpose-built models.
96
  5. **Violation of laws or regulations** — including but not limited to unauthorized vulnerability scanning, illegal data access, or misuse contrary to applicable cybersecurity statutes (CFAA, GDPR, etc.).
97
 
98
+ ## Hardware Requirements
99
+
100
+ The numbers below are first-principles estimates from the bf16 weight footprint plus typical KV-cache overhead at the trained 4096-token context. They are not measured throughput numbers; for production deployment, profile against your specific traffic pattern.
101
+
102
+ | Specification | Gemma4Defense-2B | Foundation-Sec-Instruct-8B (reference) |
103
+ |---|---|---|
104
+ | Parameters (per-token effective / total weights) | 2.3 B / ~5 B (Gemma-4 Per-Layer Embeddings) | 8 B |
105
+ | bf16 weight file on disk | ~9.3 GB | ~16 GB |
106
+ | Inference VRAM, weights only (bf16) | ~9 GB | ~16 GB |
107
+ | Inference VRAM, weights + 4 K KV cache (bf16) | ~10–11 GB | ~17–18 GB |
108
+ | Single-GPU class (bf16, headroom for batch ≥ 1) | Fits on 12 GB+ consumer GPU (e.g., RTX 3060 12 GB, RTX 4070 12 GB, T4 16 GB) | Typically requires 24 GB+ (e.g., RTX 4090, A10, A100 40 GB) |
109
+
110
+ Notes:
111
+ - "Per-token effective" parameters reflect Gemma-4's Per-Layer Embedding architecture: ~2.3 B parameters activate per token, but the full ~5 B weight matrix must be resident in VRAM during inference. The compute cost at inference scales with the per-token effective count.
112
+ - Compute (FLOPs / token) is approximately proportional to the per-token effective parameter count at fixed context length, so per-token inference cost is roughly **0.29×** that of an 8 B model.
113
+ - Quantized variants (int8, int4) further reduce VRAM by ~½ and ~¼ respectively. The released checkpoint is bf16 only; community quantization is not validated by the authors of this release.
114
+
115
  ## How to Get Started with the Model
116
 
117
  ```python
 
155
 
156
  Decontamination matters here: an earlier internal version (v3) of this work showed roughly 72% test-set overlap when trained on undeduplicated CTI corpora, producing inflated CTI-RCM scores that did not generalize. The released v3.4 model trains exclusively on the 2021 cohort with overlap items removed.
157
 
158
+ ### Methodology
159
+
160
+ This model uses **direct supervised fine-tuning (SFT)** of an instruction-tuned base via LoRA. The training recipe was selected through a controlled-experiment series across multiple trained variants spanning two model families and several corpus compositions, with multi-trial benchmark validation locking the released hyperparameters.
161
+
162
+ Key methodological choices that informed the released recipe:
163
+
164
+ - **Direct SFT, not knowledge distillation.** Knowledge-distillation variants from a larger 20B teacher model (CyberPal-2.0-20B) were evaluated during recipe development. At the corpus sizes tested (≤ 15K supervised records), direct SFT on the curated corpus outperformed distillation on the headline benchmarks. The released model is direct SFT only.
165
+ - **Decontaminated training data.** An earlier internal iteration showed ~72% test-set overlap when trained on undeduplicated CTI corpora, producing inflated CTI-RCM scores that did not generalize. The released model trains exclusively on the 2021 cohort with CTI-Bench overlap items removed.
166
+ - **Instruction-tuned base, not pre-trained base.** Direct SFT on the IT checkpoint preserves the existing format priors (terse-answer multiple-choice convention) better than SFT on the pre-trained base; comparable runs on base checkpoints showed substantial CTI-MCQ format-binding decay (~−14 to −38 pp in the worst case) at the same corpus scale.
167
+ - **Multi-trial benchmarking.** All headline numbers are means of 5 independent trials with random sampling seeds at temperature 0.3; standard deviations are reported alongside.
168
+ - **Cross-substrate validation.** The identical training corpus and hyperparameters were independently applied to Qwen3-4B-Instruct-2507 ([CyberSecQwen-4B](https://huggingface.co/athena129/CyberSecQwen-4B)). The two models converge to within 0.9 points on CTI-RCM, providing a built-in robustness check that the result is recipe-driven rather than substrate-specific.
169
+
170
  ### Training Setup
171
 
172
  | Hyperparameter | Value |