Albert-yz9yt commited on
Commit
2d5e342
·
verified ·
1 Parent(s): 81fd21e

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ adapters/tokenizer.json filter=lfs diff=lfs merge=lfs -text
adapters/README.md ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ - es
5
+ license: apache-2.0
6
+ base_model: unsloth/Qwen2.5-Coder-7B-Instruct-bnb-4bit
7
+ tags:
8
+ - bug-bounty
9
+ - security
10
+ - pentesting
11
+ - exploit-generation
12
+ - waf-bypass
13
+ - cybersecurity
14
+ - hacking
15
+ model-index:
16
+ - name: BugTraceAI-CORE-v1
17
+ results: []
18
+ ---
19
+
20
+ # 🛡️ BugTraceAI-CORE v1.0
21
+
22
+ BugTraceAI-CORE is a specialized Large Language Model (LLM) fine-tuned for high-performance, private, and local cybersecurity operations. Developed specifically for bug hunters, pentesters, and security researchers, it bridges the gap between general-purpose coding assistants and offensive security experts.
23
+
24
+ ## 🚀 Key Features
25
+
26
+ - **Offensive Security Expertise:** Fine-tuned on real-world exploit chains, WAF bypasses, and security methodologies.
27
+ - **Local-First Architecture:** Designed to run on consumer-grade GPUs (RTX 3060+) with a high-availability fallback for dual-Xeon CPU environments.
28
+ - **2025/2026 Ready:** Trained on recent vulnerability write-ups and disclosed reports to ensure relevance against modern 2025/2026 defense systems.
29
+ - **Zero-Downtime MLOps:** Integrated with a secondary CPU fallback using `llama.cpp` for 24/7 availability during re-training cycles.
30
+
31
+ ## 🧠 Training & Methodology
32
+
33
+ The model was built using the **Unsloth** library for optimized QLoRA training on a single RTX 3060 (12GB VRAM).
34
+
35
+ ### Datasets (The Hacker's Brain)
36
+
37
+ - **WAF Evasion & Injection:** Trained on `darkknight25/WAF_DETECTION_DATASET` for generating payloads that bypass modern Web Application Firewalls.
38
+ - **Security Methodology:** Trained on `AYI-NEDJIMI/bug-bounty-pentest-en` to master the logical structure of pentesting logs and methodology.
39
+ - **Real-World Experience:** Augmented with **HackerOne Disclosed Reports** (scraped from Hacktivity) and curated **GitHub Writeups (2025-2026)** to learn successful exploit chains.
40
+ - **Architectural Foundation:** Follows the implementation principles of _Sebastian Raschka's "LLMs from scratch"_.
41
+
42
+ ### Technical Specs
43
+
44
+ - **Base Model:** Qwen2.5-Coder-7B-Instruct
45
+ - **Fine-Tuning:** QLoRA (Rank 64, Alpha 64)
46
+ - **Context Window:** 4096 Tokens
47
+ - **Precision:** bfloat16 (Optimized for NVIDIA Ampere architecture)
48
+
49
+ ## 🛠️ Usage (BugTraceAI-CLI Integration)
50
+
51
+ BugTraceAI-CORE is designed to work as a plug-and-play replacement for external APIs.
52
+
53
+ ```bash
54
+ # Example environment configuration
55
+ export OPENROUTER_BASE_URL="http://your-local-core:8000/v1"
56
+ export OPENROUTER_API_KEY="sk-bugtrace-local-core"
57
+ ```
58
+
59
+ ### System Architecture
60
+
61
+ - **Port 8000: Gateway (FastAPI)** - Intelligent router that directs traffic.
62
+ - **Port 8001: GPU Node (vLLM)** - High-speed primary inference.
63
+ - **Port 8002: CPU Node (Llama.cpp)** - Reliable fallback for the Dual Xeon.
64
+
65
+ ## ⚠️ Disclaimer
66
+
67
+ BugTraceAI-CORE is intended for **legal ethical hacking and educational purposes only**. The creators are not responsible for any misuse of this tool. Always ensure you have explicit permission before testing any system.
68
+
69
+ ---
70
+
71
+ _Created as part of the BugTraceAI Ecosystem. Building a more secure web, one report at a time._
adapters/adapter_config.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alora_invocation_tokens": null,
3
+ "alpha_pattern": {},
4
+ "arrow_config": null,
5
+ "auto_mapping": {
6
+ "base_model_class": "MistralForCausalLM",
7
+ "parent_library": "transformers.models.mistral.modeling_mistral",
8
+ "unsloth_fixed": true
9
+ },
10
+ "base_model_name_or_path": "unsloth/Mistral-Nemo-Instruct-2407-bnb-4bit",
11
+ "bias": "none",
12
+ "corda_config": null,
13
+ "ensure_weight_tying": false,
14
+ "eva_config": null,
15
+ "exclude_modules": null,
16
+ "fan_in_fan_out": false,
17
+ "inference_mode": true,
18
+ "init_lora_weights": true,
19
+ "layer_replication": null,
20
+ "layers_pattern": null,
21
+ "layers_to_transform": null,
22
+ "loftq_config": {},
23
+ "lora_alpha": 32,
24
+ "lora_bias": false,
25
+ "lora_dropout": 0,
26
+ "megatron_config": null,
27
+ "megatron_core": "megatron.core",
28
+ "modules_to_save": null,
29
+ "peft_type": "LORA",
30
+ "peft_version": "0.18.1",
31
+ "qalora_group_size": 16,
32
+ "r": 16,
33
+ "rank_pattern": {},
34
+ "revision": null,
35
+ "target_modules": [
36
+ "q_proj",
37
+ "o_proj",
38
+ "down_proj",
39
+ "up_proj",
40
+ "v_proj",
41
+ "gate_proj",
42
+ "k_proj"
43
+ ],
44
+ "target_parameters": null,
45
+ "task_type": "CAUSAL_LM",
46
+ "trainable_token_indices": null,
47
+ "use_dora": false,
48
+ "use_qalora": false,
49
+ "use_rslora": false
50
+ }
adapters/adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:15c6eb93bd4415d5f977b54390ef2116bc1aab47da118e11f7f10c421efc2e18
3
+ size 228140600
adapters/chat_template.jinja ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- if messages[0]["role"] == "system" %}
2
+ {%- set system_message = messages[0]["content"] %}
3
+ {%- set loop_messages = messages[1:] %}
4
+ {%- else %}
5
+ {%- set loop_messages = messages %}
6
+ {%- endif %}
7
+ {%- if not tools is defined %}
8
+ {%- set tools = none %}
9
+ {%- endif %}
10
+ {%- set user_messages = loop_messages | selectattr("role", "equalto", "user") | list %}
11
+
12
+ {#- This block checks for alternating user/assistant messages, skipping tool calling messages #}
13
+ {%- set ns = namespace() %}
14
+ {%- set ns.index = 0 %}
15
+ {%- for message in loop_messages %}
16
+ {%- if not (message.role == "tool" or message.role == "tool_results" or (message.tool_calls is defined and message.tool_calls is not none)) %}
17
+ {%- if (message["role"] == "user") != (ns.index % 2 == 0) %}
18
+ {{- raise_exception("After the optional system message, conversation roles must alternate user/assistant/user/assistant/...") }}
19
+ {%- endif %}
20
+ {%- set ns.index = ns.index + 1 %}
21
+ {%- endif %}
22
+ {%- endfor %}
23
+
24
+ {{- bos_token }}
25
+ {%- for message in loop_messages %}
26
+ {%- if message["role"] == "user" %}
27
+ {%- if tools is not none and (message == user_messages[-1]) %}
28
+ {{- "[AVAILABLE_TOOLS][" }}
29
+ {%- for tool in tools %}
30
+ {%- set tool = tool.function %}
31
+ {{- '{"type": "function", "function": {' }}
32
+ {%- for key, val in tool.items() if key != "return" %}
33
+ {%- if val is string %}
34
+ {{- '"' + key + '": "' + val + '"' }}
35
+ {%- else %}
36
+ {{- '"' + key + '": ' + val|tojson }}
37
+ {%- endif %}
38
+ {%- if not loop.last %}
39
+ {{- ", " }}
40
+ {%- endif %}
41
+ {%- endfor %}
42
+ {{- "}}" }}
43
+ {%- if not loop.last %}
44
+ {{- ", " }}
45
+ {%- else %}
46
+ {{- "]" }}
47
+ {%- endif %}
48
+ {%- endfor %}
49
+ {{- "[/AVAILABLE_TOOLS]" }}
50
+ {%- endif %}
51
+ {%- if loop.last and system_message is defined %}
52
+ {{- "[INST]" + system_message + "\n\n" + message["content"] + "[/INST]" }}
53
+ {%- else %}
54
+ {{- "[INST]" + message["content"] + "[/INST]" }}
55
+ {%- endif %}
56
+ {%- elif (message.tool_calls is defined and message.tool_calls is not none) %}
57
+ {{- "[TOOL_CALLS][" }}
58
+ {%- for tool_call in message.tool_calls %}
59
+ {%- set out = tool_call.function|tojson %}
60
+ {{- out[:-1] }}
61
+ {%- if not tool_call.id is defined or tool_call.id|length != 9 %}
62
+ {{- raise_exception("Tool call IDs should be alphanumeric strings with length 9!") }}
63
+ {%- endif %}
64
+ {{- ', "id": "' + tool_call.id + '"}' }}
65
+ {%- if not loop.last %}
66
+ {{- ", " }}
67
+ {%- else %}
68
+ {{- "]" + eos_token }}
69
+ {%- endif %}
70
+ {%- endfor %}
71
+ {%- elif message["role"] == "assistant" %}
72
+ {{- message["content"] + eos_token}}
73
+ {%- elif message["role"] == "tool_results" or message["role"] == "tool" %}
74
+ {%- if message.content is defined and message.content.content is defined %}
75
+ {%- set content = message.content.content %}
76
+ {%- else %}
77
+ {%- set content = message.content %}
78
+ {%- endif %}
79
+ {{- '[TOOL_RESULTS]{"content": ' + content|string + ", " }}
80
+ {%- if not message.tool_call_id is defined or message.tool_call_id|length != 9 %}
81
+ {{- raise_exception("Tool call IDs should be alphanumeric strings with length 9!") }}
82
+ {%- endif %}
83
+ {{- '"call_id": "' + message.tool_call_id + '"}[/TOOL_RESULTS]' }}
84
+ {%- else %}
85
+ {{- raise_exception("Only user and assistant roles are supported, with the exception of an initial optional system message!") }}
86
+ {%- endif %}
87
+ {%- endfor %}
adapters/special_tokens_map.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "</s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "<pad>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "unk_token": {
24
+ "content": "<unk>",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ }
30
+ }
adapters/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b0240ce510f08e6c2041724e9043e33be9d251d1e4a4d94eb68cd47b954b61d2
3
+ size 17078292
adapters/tokenizer_config.json ADDED
The diff for this file is too large to render. See raw diff