asdf98 commited on
Commit
f3dd97e
Β·
verified Β·
1 Parent(s): 1d986fb

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +61 -16
README.md CHANGED
@@ -1,26 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
- tags:
3
- - ml-intern
 
 
 
 
 
 
4
  ---
5
 
6
- # asdf98/ethical-hacking-llm-colab
7
 
8
- <!-- ml-intern-provenance -->
9
- ## Generated by ML Intern
 
 
 
10
 
11
- This model repository was generated by [ML Intern](https://github.com/huggingface/ml-intern), an agent for machine learning research and development on the Hugging Face Hub.
12
 
13
- - Try ML Intern: https://smolagents-ml-intern.hf.space
14
- - Source code: https://github.com/huggingface/ml-intern
15
 
16
- ## Usage
17
 
18
- ```python
19
- from transformers import AutoModelForCausalLM, AutoTokenizer
20
 
21
- model_id = "asdf98/ethical-hacking-llm-colab"
22
- tokenizer = AutoTokenizer.from_pretrained(model_id)
23
- model = AutoModelForCausalLM.from_pretrained(model_id)
24
- ```
25
 
26
- For non-causal architectures, replace `AutoModelForCausalLM` with the appropriate `AutoModel` class.
 
 
 
 
 
 
1
+ # πŸ” Ethical Hacking LLM Fine-Tuning Collection
2
+
3
+ > **Public collection of Colab-ready notebooks for fine-tuning cybersecurity/ethical hacking LLMs on Google Colab Free Tier (T4 GPU).**
4
+
5
+ ---
6
+
7
+ ## πŸ“¦ What's Included
8
+
9
+ | File | Model | Description |
10
+ |------|-------|-------------|
11
+ | `EthicalHacking_Qwen3-4B_Ultimate_Colab.ipynb` | **Qwen3-4B-Instruct-2507** (πŸ₯‡ recommended) | Best coding/reasoning scores among sub-10B models with confirmed Unsloth support |
12
+ | `EthicalHacking_Qwen3-8B_Colab.ipynb` | Qwen3-8B-bnb-4bit | Larger capacity, less VRAM headroom on T4 |
13
+
14
+ ---
15
+
16
+ ## πŸ† Why Qwen3-4B-Instruct-2507?
17
+
18
+ After researching the **latest small models** as of May/June 2026, here's the verdict for T4 16GB:
19
+
20
+ | Model | 4-bit Size | T4 Fit | Coding Benchmarks | Unsloth Support | Verdict |
21
+ |-------|-----------|--------|------------------|-----------------|---------|
22
+ | **Qwen3-4B-Instruct-2507** πŸ₯‡ | **3.3 GB** | βœ…βœ…βœ… Excellent | LiveCodeBench 35.1, MultiPL-E 76.8 | βœ… Confirmed | **Use this** |
23
+ | Qwen3-8B | 7.0 GB | βœ…βœ… Good | Stronger base model | βœ… Confirmed | Viable but tighter |
24
+ | Gemma-4-E2B-it | 7.6 GB | βœ…βœ… Good | Unverified coding scores | βœ… 4-bit exists | Multimodal option |
25
+ | Gemma-4-E4B-it | 10.2 GB | ⚠️ Tight | β€” | βœ… 4-bit exists | **Avoid (OOM risk)** |
26
+ | Bonsai (prism-ml) | ~1 GB | βœ…βœ…βœ… Excellent | Weak (MMLU 30%) | ❌ Custom arch | **Avoid** |
27
+ | LFM2 (Liquid AI) | ~2.5 GB | βœ…βœ… Good | **Not for programming** (official disclaimer) | ❌ Unknown | **Avoid** |
28
+ | Qwen3.5 series | β€” | β€” | β€” | ⚠️ Uncertain | Wait for Unsloth |
29
+
30
+ ### Key Datasets Used
31
+
32
+ | Dataset | Rows | Focus |
33
+ |---------|------|-------|
34
+ | [AlicanKiraz0/Cybersecurity-Dataset-Fenrir-v2.1](https://huggingface.co/datasets/AlicanKiraz0/Cybersecurity-Dataset-Fenrir-v2.1) | 99,870 | Threat analysis, IR, offensive education |
35
+ | [Trendyol/Trendyol-Cybersecurity-Instruction-Tuning-Dataset](https://huggingface.co/datasets/Trendyol/Trendyol-Cybersecurity-Instruction-Tuning-Dataset) | 53,202 | C2 analysis, forensics, 200+ topics |
36
+
37
  ---
38
+
39
+ ## πŸš€ Quick Start
40
+
41
+ 1. Open [Google Colab](https://colab.research.google.com)
42
+ 2. **Runtime β†’ Change runtime type β†’ GPU (T4)**
43
+ 3. Upload the `.ipynb` file from this repo
44
+ 4. **Run all cells** β€” training takes ~1.5–2.5 hours for 1 epoch
45
+
46
  ---
47
 
48
+ ## βš™οΈ T4 VRAM Optimizations Used
49
 
50
+ - `load_in_4bit=True` + LoRA (r=64)
51
+ - `adamw_8bit` optimizer
52
+ - `use_gradient_checkpointing="unsloth"`
53
+ - `fp16=True` (T4 has no bf16)
54
+ - Batch=2, Accum=4 β†’ effective batch=8
55
 
56
+ ---
57
 
58
+ ## πŸ›‘οΈ Disclaimer
 
59
 
60
+ All datasets are **defensive/educational** (pentesting methodology, threat analysis, incident response). Intended for **ethical hacking education and security research** only.
61
 
62
+ ---
 
63
 
64
+ ## πŸ“š References
 
 
 
65
 
66
+ - [Qwen3-4B-Instruct-2507](https://huggingface.co/Qwen/Qwen3-4B-Instruct-2507)
67
+ - [Unsloth 4-bit](https://huggingface.co/unsloth/Qwen3-4B-Instruct-2507-unsloth-bnb-4bit)
68
+ - [Unsloth Docs](https://unsloth.ai/docs)
69
+ - [TRL SFTTrainer](https://huggingface.co/docs/trl/sft_trainer)
70
+ - [Fenrir Dataset](https://huggingface.co/datasets/AlicanKiraz0/Cybersecurity-Dataset-Fenrir-v2.1)
71
+ - [Trendyol Dataset](https://huggingface.co/datasets/Trendyol/Trendyol-Cybersecurity-Instruction-Tuning-Dataset)