Bouquets commited on
Commit
69d2361
Β·
verified Β·
1 Parent(s): 88bf4ab

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +35 -108
README.md CHANGED
@@ -12,123 +12,50 @@ tags:
12
  - cybersecurity
13
  - llama-cpp
14
  - gguf-my-repo
 
 
15
  ---
16
- 14/05/2025 Updated English dataset
17
-
18
- # πŸ€– StrikeGPT-R1-Zero: Cybersecurity Penetration Testing Reasoning Model
19
-
20
-
21
- ![image/png](https://cdn-uploads.huggingface.co/production/uploads/67c1bfdf3e9af7d134c4189d/T2JpQznw0yoUDZrf2GqX0.png)
22
-
23
- ## πŸš€ Model Introduction
24
- **StrikeGPT-R1-Zero** is an expert model distilled through black-box methods based on **Qwen3**, with DeepSeek-R1 as its teacher model. Coverage includes:
25
- πŸ”’ AI Security | πŸ›‘οΈ API Security | πŸ“± APP Security | πŸ•΅οΈ APT | 🚩 CTF
26
- 🏭 ICS Security | πŸ’» Full Penetration Testing | ☁️ Cloud Security | πŸ“œ Code Auditing
27
- 🦠 Antivirus Evasion | 🌐 Internal Network Security | πŸ’Ύ Digital Forensics | β‚Ώ Blockchain Security | πŸ•³οΈ Traceback & Countermeasures | 🌍 IoT Security
28
- 🚨 Emergency Response | πŸš— Vehicle Security | πŸ‘₯ Social Engineering | πŸ’Ό Penetration Testing Interviews
29
 
30
- ### πŸ‘‰ [Click to Access Interactive Detailed Data Distribution](https://bouquets-ai.github.io/StrikeGPT-R1-Zero/WEB)
31
- ### 🌟 Key Features
32
- - 🧩 Optimized with **Chain-of-Thought (CoT) reasoning data** to enhance logical capabilities, significantly improving performance in complex tasks like vulnerability analysis
33
- - πŸ’ͺ Base model uses Qwen3, making it more suitable for Chinese users compared to Distill-Llama
34
- - ⚠️ **No ethical restrictions**β€”demonstrates unique performance in specific academic research areas (use in compliance with local laws)
35
- - ✨ Outperforms local RAG solutions in scenarios like offline cybersecurity competitions, with superior logical reasoning and complex task handling
36
 
37
- ## πŸ“Š Data Distribution
38
- ![data](https://github.com/user-attachments/assets/4d19d48d-67bb-4b05-8ce9-2000b6afa12e)
39
 
40
- ## πŸ› οΈ Model Deployment
41
- ### Deploy via Ollama
42
- `ollama run hf.co/Bouquets/StrikeGPT-R1-Zero-8B-Q4_K_M-GGUF:Q4_K_M`
43
 
44
- **Or directly call the original model**
45
- ```python
46
- from unsloth import FastLanguageModel
47
- import torch
48
- max_seq_length = 2048 # Choose any! We auto support RoPE Scaling internally!
49
- dtype = None # None for auto detection. Float16 for Tesla T4, V100, Bfloat16 for Ampere+
50
- load_in_4bit = True # Use 4bit quantization to reduce memory usage. Can be False.
51
-
52
- model, tokenizer = FastLanguageModel.from_pretrained(
53
- model_name = "Bouquets/StrikeGPT-R1-Zero-8B",
54
- max_seq_length = max_seq_length,
55
- dtype = dtype,
56
- load_in_4bit = load_in_4bit,
57
- # token = "hf_...",
58
- )
59
- alpaca_prompt = """Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
60
-
61
- ### Instruction:
62
- {}
63
-
64
- ### Input:
65
- {}
66
-
67
- ### Response:
68
- {}"""
69
- FastLanguageModel.for_inference(model) # Enable native 2x faster inference
70
- inputs = tokenizer(
71
- [
72
- alpaca_prompt.format(
73
- "", # instruction
74
- "Hello, are you developed by OpenAI?", # input
75
- "", # output - leave this blank for generation!
76
- )
77
- ], return_tensors = "pt").to("cuda")
78
-
79
- from transformers import TextStreamer
80
- text_streamer = TextStreamer(tokenizer, skip_prompt = True)
81
- _ = model.generate(input_ids = inputs.input_ids, attention_mask = inputs.attention_mask,
82
- streamer = text_streamer, max_new_tokens = 4096, pad_token_id = tokenizer.eos_token_id)
83
  ```
84
- ![image](https://github.com/user-attachments/assets/d8cef659-3c83-4bc9-af1a-78ed6345faf2)
85
-
86
- *Self-awareness issues may occur after quantizationβ€”please disregard.*
87
- ![image](https://github.com/user-attachments/assets/3989ea09-d581-49fb-9938-01b93e0beb91)
88
 
89
- ## πŸ’» Open Source πŸ’»
90
- 🌟 **Open-Source Model** 🌟
91
- πŸ€— **HuggingFace**:
92
- πŸ”— [https://huggingface.co/Bouquets/StrikeGPT-R1-Zero-8B](https://huggingface.co/Bouquets/StrikeGPT-R1-Zero-8B)
93
-
94
- πŸ“Š **Datasets** (Partial Non-Reasoning Data) πŸ“Š
95
- πŸ€— **HuggingFace**:
96
- πŸ”Ή Cybersecurity LLM-CVE Dataset:
97
- πŸ”— [https://huggingface.co/datasets/Bouquets/Cybersecurity-LLM-CVE](https://huggingface.co/datasets/Bouquets/Cybersecurity-LLM-CVE)
98
-
99
- πŸ”Ή Red Team LLM English Dataset:
100
- πŸ”— [https://huggingface.co/datasets/Bouquets/Cybersecurity-Red_team-LLM-en](https://huggingface.co/datasets/Bouquets/Cybersecurity-Red_team-LLM-en)
101
 
102
- ## 🎯 Core Capabilities Showcase & Comparison (Original model has ethical restrictions; simple comparison with SecGPT-7B model)
103
- Given the absence of standardized evaluation metrics for cybersecurity penetration testing in large language models, we propose a controlled comparative framework leveraging GPT-4 as an impartial evaluator. The methodology consists of three phases:
104
- **Controlled Questioning**
105
- Identical cybersecurity penetration testing questions (e.g., "Explain how to exploit a SQL injection vulnerability in a REST API") are posed to both the distilled strikeGPT model and SecGPT Figure 12.
106
- ![image/png](https://cdn-uploads.huggingface.co/production/uploads/67c1bfdf3e9af7d134c4189d/gYY1KKLLNGeQmUi4BgZJ4.png)
107
- Questions span:
108
- Technical Depth (e.g., payload construction)
109
- Attack Methodology (e.g., step-by-step exploitation)
110
- Mitigation Strategies (e.g., parameterized queries)
111
- **GPT-4 Evaluation Protocol**
112
- - Responses from both models are anonymized and evaluated by GPT-4 using criteria:
113
- - Technical Accuracy (0-5): Alignment with known penetration testing principles (e.g., OWASP guidelines).
114
- - Logical Coherence (0-5): Consistency in reasoning (e.g., cause-effect relationships in attack chains).
115
- - Practical Feasibility (0-5): Real-world applicability (e.g., compatibility with tools like Burp Suite).
116
- - GPT-4 provides detailed justifications for scores
117
- According to the standards, the evaluation results are finally presented in Figure 13.
118
- ![image/png](https://cdn-uploads.huggingface.co/production/uploads/67c1bfdf3e9af7d134c4189d/2ThExwlCX4iU_n-Adh6Fp.png)
119
 
120
- ## πŸ“ˆ Experimental Data Trends
121
- Minor gradient explosions observed, but overall stable.
122
- ![image](https://github.com/user-attachments/assets/a3fa3676-9f07-47ea-9029-ec0d56fdc989)
123
 
124
- ## πŸ’° Training Costs
125
- - **DeepSeek-R1 API Calls**: Β₯450 (purchased during discounts; normal price ~Β₯1800)
126
- - **Server Costs**: Β₯4?0
127
- - **Digital Resources**: Β₯??
128
- ![image](https://github.com/user-attachments/assets/8e23b5b6-24d9-47c3-b54f-ffa22ec68a83)
129
 
130
- ## βš–οΈ Usage Notice
131
- > This model is strictly for **legal security research** and **educational purposes**. Users must comply with local laws and regulations. Developers are not responsible for misuse.
132
- > **Note**: By using this model, you agree to this disclaimer.
 
133
 
134
- πŸ’‘ **Tip**: The model may exhibit hallucinations or knowledge gaps. Always cross-verify critical scenarios!
 
 
 
 
 
 
 
 
12
  - cybersecurity
13
  - llama-cpp
14
  - gguf-my-repo
15
+ - llama-cpp
16
+ - gguf-my-repo
17
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
18
 
19
+ # Bouquets/StrikeGPT-R1-Zero-8B-Q4_K_M-GGUF
20
+ This model was converted to GGUF format from [`Bouquets/StrikeGPT-R1-Zero-8B`](https://huggingface.co/Bouquets/StrikeGPT-R1-Zero-8B) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space.
21
+ Refer to the [original model card](https://huggingface.co/Bouquets/StrikeGPT-R1-Zero-8B) for more details on the model.
 
 
 
22
 
23
+ ## Use with llama.cpp
24
+ Install llama.cpp through brew (works on Mac and Linux)
25
 
26
+ ```bash
27
+ brew install llama.cpp
 
28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  ```
30
+ Invoke the llama.cpp server or the CLI.
 
 
 
31
 
32
+ ### CLI:
33
+ ```bash
34
+ llama-cli --hf-repo Bouquets/StrikeGPT-R1-Zero-8B-Q4_K_M-GGUF --hf-file strikegpt-r1-zero-8b-q4_k_m.gguf -p "The meaning to life and the universe is"
35
+ ```
 
 
 
 
 
 
 
 
36
 
37
+ ### Server:
38
+ ```bash
39
+ llama-server --hf-repo Bouquets/StrikeGPT-R1-Zero-8B-Q4_K_M-GGUF --hf-file strikegpt-r1-zero-8b-q4_k_m.gguf -c 2048
40
+ ```
 
 
 
 
 
 
 
 
 
 
 
 
 
41
 
42
+ Note: You can also use this checkpoint directly through the [usage steps](https://github.com/ggerganov/llama.cpp?tab=readme-ov-file#usage) listed in the Llama.cpp repo as well.
 
 
43
 
44
+ Step 1: Clone llama.cpp from GitHub.
45
+ ```
46
+ git clone https://github.com/ggerganov/llama.cpp
47
+ ```
 
48
 
49
+ Step 2: Move into the llama.cpp folder and build it with `LLAMA_CURL=1` flag along with other hardware-specific flags (for ex: LLAMA_CUDA=1 for Nvidia GPUs on Linux).
50
+ ```
51
+ cd llama.cpp && LLAMA_CURL=1 make
52
+ ```
53
 
54
+ Step 3: Run inference through the main binary.
55
+ ```
56
+ ./llama-cli --hf-repo Bouquets/StrikeGPT-R1-Zero-8B-Q4_K_M-GGUF --hf-file strikegpt-r1-zero-8b-q4_k_m.gguf -p "The meaning to life and the universe is"
57
+ ```
58
+ or
59
+ ```
60
+ ./llama-server --hf-repo Bouquets/StrikeGPT-R1-Zero-8B-Q4_K_M-GGUF --hf-file strikegpt-r1-zero-8b-q4_k_m.gguf -c 2048
61
+ ```