ethanolivertroy commited on
Commit
bc51da8
·
verified ·
1 Parent(s): 5c17db5

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +146 -0
README.md ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # HackIDLE-NIST-Coder (GGUF)
2
+
3
+ A specialized cybersecurity LLM fine-tuned on 568 NIST publications, optimized for Ollama and llama.cpp.
4
+
5
+ ## Model Details
6
+
7
+ **Base Model:** Qwen2.5-Coder-7B-Instruct
8
+ **Fine-tuning:** LoRA (11.5M parameters, 0.151% of base)
9
+ **Training Data:** 568 NIST cybersecurity documents (523,706 examples)
10
+ **Context Length:** 32,768 tokens
11
+ **License:** Apache 2.0
12
+
13
+ ## Quantization Variants
14
+
15
+ | File | Size | Use Case | Perplexity |
16
+ |------|------|----------|------------|
17
+ | `hackidle-nist-coder-f16.gguf` | 14GB | Reference/source | Baseline |
18
+ | `hackidle-nist-coder-q8_0.gguf` | 7.5GB | Highest quality | ~0.1% loss |
19
+ | `hackidle-nist-coder-q5_k_m.gguf` | 5.1GB | High quality | ~0.5% loss |
20
+ | **`hackidle-nist-coder-q4_k_m.gguf`** | **4.4GB** | **Recommended** | ~1% loss |
21
+
22
+ ## Usage
23
+
24
+ ### With Ollama
25
+
26
+ Download and run:
27
+ ```bash
28
+ ollama run ethanolivertroy/hackidle-nist-coder
29
+ ```
30
+
31
+ Or create from this repo:
32
+ ```bash
33
+ # Download GGUF
34
+ wget https://huggingface.co/ethanolivertroy/HackIDLE-NIST-Coder-GGUF/resolve/main/hackidle-nist-coder-q4_k_m.gguf
35
+
36
+ # Create Modelfile
37
+ cat > Modelfile << 'EOF'
38
+ FROM ./hackidle-nist-coder-q4_k_m.gguf
39
+
40
+ SYSTEM """You are HackIDLE-NIST-Coder, a cybersecurity expert with deep knowledge of NIST standards, frameworks, and best practices."""
41
+
42
+ PARAMETER temperature 0.7
43
+ PARAMETER num_ctx 32768
44
+ EOF
45
+
46
+ # Create model
47
+ ollama create hackidle-nist-coder -f Modelfile
48
+ ```
49
+
50
+ ### With llama.cpp
51
+
52
+ ```bash
53
+ # Download GGUF
54
+ wget https://huggingface.co/ethanolivertroy/HackIDLE-NIST-Coder-GGUF/resolve/main/hackidle-nist-coder-q4_k_m.gguf
55
+
56
+ # Run inference
57
+ ./llama-cli -m hackidle-nist-coder-q4_k_m.gguf \
58
+ -p "What is Zero Trust Architecture according to NIST?" \
59
+ -n 200 \
60
+ --temp 0.7
61
+ ```
62
+
63
+ ### With LM Studio
64
+
65
+ 1. Search for "hackidle-nist-coder" in LM Studio
66
+ 2. Download Q4_K_M variant
67
+ 3. Start chatting!
68
+
69
+ Or use the [MLX version](https://huggingface.co/ethanolivertroy/HackIDLE-NIST-Coder-MLX-4bit) for native Apple Silicon support.
70
+
71
+ ## Expertise Areas
72
+
73
+ - NIST Cybersecurity Framework (CSF)
74
+ - Risk Management Framework (RMF)
75
+ - SP 800 series security controls (AC, AU, CA, CM, CP, IA, IR, MA, MP, PE, PL, PS, RA, SA, SC, SI, SR)
76
+ - FIPS cryptographic standards
77
+ - Zero Trust Architecture (SP 800-207)
78
+ - Cloud security (SP 800-210, SP 800-144)
79
+ - Supply chain risk management (SP 800-161)
80
+ - Privacy Framework
81
+
82
+ ## Example Queries
83
+
84
+ ```
85
+ "What is Zero Trust Architecture according to NIST SP 800-207?"
86
+ "Explain control AC-1 from NIST SP 800-53."
87
+ "What are the core components of the NIST Cybersecurity Framework?"
88
+ "How does NIST recommend implementing secure cloud architecture?"
89
+ "What is the Risk Management Framework process?"
90
+ ```
91
+
92
+ ## Training Details
93
+
94
+ **Dataset:** [`ethanolivertroy/nist-cybersecurity-training`](https://huggingface.co/datasets/ethanolivertroy/nist-cybersecurity-training)
95
+ - 523,706 training examples
96
+ - 568 source documents
97
+ - Smart chunking with sentence boundaries
98
+ - 5 extraction strategies: sections, controls, definitions, tables, semantic chunks
99
+
100
+ **Fine-tuning:**
101
+ - Method: LoRA with MLX (Apple Silicon)
102
+ - Training time: 3.5 hours on M4 Max
103
+ - Iterations: 1000
104
+ - Validation loss improvement: 45%
105
+ - Base model: Qwen2.5-Coder-7B-Instruct-4bit
106
+
107
+ ## Performance
108
+
109
+ **Ollama (M4 Max, Q4_K_M):**
110
+ - Inference: 80-100 tokens/sec
111
+ - Memory: ~6GB
112
+ - Prompt processing: 50-100 tokens/sec
113
+
114
+ **llama.cpp (M4 Max, Q4_K_M):**
115
+ - Inference: 70-90 tokens/sec
116
+ - Memory: ~5GB
117
+
118
+ ## Related Models
119
+
120
+ - **MLX Format:** [`ethanolivertroy/HackIDLE-NIST-Coder-MLX-4bit`](https://huggingface.co/ethanolivertroy/HackIDLE-NIST-Coder-MLX-4bit)
121
+ - **LM Studio:** [`ethanolivertroy/hackidle-nist-coder`](https://lmstudio.ai/ethanolivertroy/hackidle-nist-coder)
122
+ - **Ollama Library:** `ethanolivertroy/hackidle-nist-coder` (coming soon)
123
+
124
+ ## Citation
125
+
126
+ If you use this model in your research or applications, please cite:
127
+
128
+ ```bibtex
129
+ @software{hackidle_nist_coder,
130
+ author = {Ethan Oliver Troy},
131
+ title = {HackIDLE-NIST-Coder: A Fine-Tuned LLM for NIST Cybersecurity Standards},
132
+ year = {2025},
133
+ url = {https://huggingface.co/ethanolivertroy/HackIDLE-NIST-Coder-GGUF}
134
+ }
135
+ ```
136
+
137
+ ## License
138
+
139
+ This model is released under the Apache 2.0 license. NIST publications are in the public domain.
140
+
141
+ ## Acknowledgments
142
+
143
+ - **NIST** for publishing comprehensive cybersecurity guidance
144
+ - **Qwen Team** for the exceptional Qwen2.5-Coder base model
145
+ - **llama.cpp** team for GGUF format and quantization
146
+ - **Ollama** for making local LLM deployment accessible