random1st commited on
Commit
cd5c86b
·
verified ·
1 Parent(s): d9c5e1c

Update model card: Qwen3.5-2B v3

Browse files
Files changed (1) hide show
  1. README.md +18 -22
README.md CHANGED
@@ -6,14 +6,14 @@ tags:
6
  - shell-commands
7
  - safety-classifier
8
  - gguf
9
- - qwen3
10
  datasets:
11
  - ML4Net/SSH-Shell-Attacks
12
  - TellinaTool/nl2bash
13
  pipeline_tag: text-classification
14
  ---
15
 
16
- # secguard-guard — Shell Command Safety Classifier
17
 
18
  Binary classifier for shell commands: **safe** vs **destructive**.
19
 
@@ -21,10 +21,10 @@ Binary classifier for shell commands: **safe** vs **destructive**.
21
 
22
  | Property | Value |
23
  |----------|-------|
24
- | Base model | [Qwen/Qwen3-0.6B](https://huggingface.co/Qwen/Qwen3-0.6B) |
25
- | Fine-tuning | LoRA (rank 8, 1.4M trainable params / 596M total) |
26
  | Quantization | Q8_0 (GGUF) |
27
- | Size | 610 MB |
28
  | Context | 512 tokens |
29
  | Inference | llama.cpp / llama-cpp-rs |
30
 
@@ -33,40 +33,36 @@ Binary classifier for shell commands: **safe** vs **destructive**.
33
  - **Dataset**: 21,430 labeled examples (balanced 50/50)
34
  - **Destructive** (10,715): SSH-Shell-Attacks honeypot commands (ML4Net, 408K sessions) + synthetic SaaS CLI patterns
35
  - **Safe** (10,715): NL2Bash corpus (12.6K real admin commands) + synthetic dev/ops commands
36
- - **Method**: MLX LoRA, 8 layers, batch 4, lr 1e-4, 750 iterations
37
- - **Loss**: Train 0.43, Val 0.428 (best checkpoint at iter 400)
38
- - **Hardware**: Apple Silicon (M-series), ~5 minutes training
39
 
40
  ## What it detects
41
 
42
  Commands the model learns to classify as **destructive**:
43
- - File deletion (`rm -rf`, `find -delete`, `shred`)
44
- - Git history rewriting (`push --force`, `reset --hard`, `rebase`, `filter-branch`)
45
- - Database destruction (`DROP TABLE`, `FLUSHALL`, `db.dropDatabase()`)
46
- - Cloud resource deletion (`aws s3 rm`, `gcloud delete`, `terraform destroy`)
47
- - Remote code execution (`curl | bash`, `wget | sh`)
48
- - Container/k8s cleanup (`docker system prune`, `kubectl delete namespace`)
49
- - SaaS destructive ops (`stripe cancel`, `heroku apps:destroy`)
50
 
51
  ## Usage with secguard
52
 
53
  This model is Phase 3 (ML brain) in secguard's three-phase guard:
54
- 1. **Policy allowlist** — known-safe commands (zero latency)
55
- 2. **Heuristic rules** — 40+ regex patterns (zero latency)
56
- 3. **ML brain** — this model (catches what rules miss)
57
 
58
  ```bash
59
- # Download
60
  secguard model
61
-
62
- # The model is used automatically when built with --features ml
63
  ```
64
 
65
  ## Limitations
66
 
67
  - Trained on English commands only
68
  - SSH honeypot data may not represent all attack vectors
69
- - 0.6B model — may miss nuanced or novel destructive patterns
70
  - Confidence threshold: 85% (tunable in secguard config)
71
 
72
  ## License
 
6
  - shell-commands
7
  - safety-classifier
8
  - gguf
9
+ - qwen3.5
10
  datasets:
11
  - ML4Net/SSH-Shell-Attacks
12
  - TellinaTool/nl2bash
13
  pipeline_tag: text-classification
14
  ---
15
 
16
+ # secguard-guard -- Shell Command Safety Classifier
17
 
18
  Binary classifier for shell commands: **safe** vs **destructive**.
19
 
 
21
 
22
  | Property | Value |
23
  |----------|-------|
24
+ | Base model | [Qwen/Qwen3.5-2B](https://huggingface.co/Qwen/Qwen3.5-2B) |
25
+ | Fine-tuning | LoRA (rank 8, 2.8M trainable params / 1.88B total) |
26
  | Quantization | Q8_0 (GGUF) |
27
+ | Size | 1.9 GB |
28
  | Context | 512 tokens |
29
  | Inference | llama.cpp / llama-cpp-rs |
30
 
 
33
  - **Dataset**: 21,430 labeled examples (balanced 50/50)
34
  - **Destructive** (10,715): SSH-Shell-Attacks honeypot commands (ML4Net, 408K sessions) + synthetic SaaS CLI patterns
35
  - **Safe** (10,715): NL2Bash corpus (12.6K real admin commands) + synthetic dev/ops commands
36
+ - **Method**: MLX LoRA, 8 layers, batch 4, lr 5e-5, 400 iterations
37
+ - **Loss**: Train 0.388, Val 0.394
38
+ - **Hardware**: Apple Silicon (M-series), ~12 minutes training
39
 
40
  ## What it detects
41
 
42
  Commands the model learns to classify as **destructive**:
43
+ - File deletion (rm -rf, find -delete, shred)
44
+ - Git history rewriting (push --force, reset --hard, rebase, filter-branch)
45
+ - Database destruction (DROP TABLE, FLUSHALL, db.dropDatabase())
46
+ - Cloud resource deletion (aws s3 rm, gcloud delete, terraform destroy)
47
+ - Remote code execution (curl | bash, wget | sh)
48
+ - Container/k8s cleanup (docker system prune, kubectl delete namespace)
49
+ - SaaS destructive ops (stripe cancel, heroku apps:destroy)
50
 
51
  ## Usage with secguard
52
 
53
  This model is Phase 3 (ML brain) in secguard's three-phase guard:
54
+ 1. **Policy allowlist** -- known-safe commands (zero latency)
55
+ 2. **Heuristic rules** -- 40+ regex patterns (zero latency)
56
+ 3. **ML brain** -- this model (catches what rules miss)
57
 
58
  ```bash
 
59
  secguard model
 
 
60
  ```
61
 
62
  ## Limitations
63
 
64
  - Trained on English commands only
65
  - SSH honeypot data may not represent all attack vectors
 
66
  - Confidence threshold: 85% (tunable in secguard config)
67
 
68
  ## License