geoffmunn commited on
Commit
827b66f
·
verified ·
1 Parent(s): 78cf19e

Add Q2–Q8_0 quantized models with per-model cards, MODELFILE, CLI examples, and auto-upload

Browse files
.gitattributes CHANGED
@@ -33,3 +33,12 @@ 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
+ Qwen3Guard-Stream-4B-f16:Q2_K.gguf filter=lfs diff=lfs merge=lfs -text
37
+ Qwen3Guard-Stream-4B-f16:Q3_K_M.gguf filter=lfs diff=lfs merge=lfs -text
38
+ Qwen3Guard-Stream-4B-f16:Q3_K_S.gguf filter=lfs diff=lfs merge=lfs -text
39
+ Qwen3Guard-Stream-4B-f16:Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
40
+ Qwen3Guard-Stream-4B-f16:Q4_K_S.gguf filter=lfs diff=lfs merge=lfs -text
41
+ Qwen3Guard-Stream-4B-f16:Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
42
+ Qwen3Guard-Stream-4B-f16:Q5_K_S.gguf filter=lfs diff=lfs merge=lfs -text
43
+ Qwen3Guard-Stream-4B-f16:Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
44
+ Qwen3Guard-Stream-4B-f16:Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
MODELFILE ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # MODELFILE for Qwen3Guard-Stream-4B
2
+ # Used by LM Studio, OpenWebUI, etc.
3
+
4
+ context_length: 8192
5
+ embedding: false
6
+ f16: cpu
7
+
8
+ # Prompt template for real-time streaming classification
9
+ prompt_template: >-
10
+ AnalyzeStream: {prompt}
11
+
12
+ # Output format: {"safe": true/false, "categories": [...], "partial": bool, "confidence": float}
13
+
14
+ # Default parameters for reliable streaming classification
15
+ temperature: 0.0
16
+ top_p: 1.0
17
+ top_k: 40
18
+ repeat_penalty: 1.0
19
+ num_keep: 1
20
+ max_tokens: 128
21
+
22
+ # Stop tokens (optional)
23
+ stop: "{"
24
+ stop: "}"
Qwen3Guard-Stream-4B-Q2_K/README.md ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - gguf
5
+ - safety
6
+ - guardrail
7
+ - qwen
8
+ - classification
9
+ - streaming
10
+ base_model: Qwen/Qwen3Guard-Stream-4B
11
+ author: geoffmunn
12
+ ---
13
+
14
+ # Qwen3Guard-Stream-4B-Q2_K
15
+
16
+ Real-time safety classifier for **streaming text input**. Does **not generate text**.
17
+
18
+ ## Model Info
19
+ - **Type**: Streaming safety classifier
20
+ - **Output**: JSON with `safe`, `categories`, `partial`, `confidence`
21
+ - **Size**: 1.6G
22
+ - **RAM Required**: ~2.0 GB
23
+ - **Speed**: ⚡ Fast
24
+ - **Quality**: Low
25
+ - **Recommendation**: Only for very weak devices; poor accuracy. Avoid.
26
+
27
+ ## 🧑‍🏫 Beginner Example
28
+
29
+ 1. Load in **LM Studio**
30
+ 2. Type:
31
+ ```
32
+ AnalyzeStream: I want to hurt myself because I feel so alone
33
+ ```
34
+ 3. Output:
35
+ ```json
36
+ {"safe":false,"categories":["self-harm"],"partial":true,"confidence":0.94}
37
+ ```
38
+ 4. Your app shows a suicide prevention hotline.
39
+
40
+ > ✅ Safe input: "I'm sad today" → may return low-confidence alert or safe
41
+
42
+ ## ⚙️ Default Parameters
43
+
44
+ | Parameter | Value |
45
+ |---------|-------|
46
+ | Temperature | 0.0 |
47
+ | Top-P | 1.0 |
48
+ | Top-K | 40 |
49
+ | Repeat Penalty | 1.0 |
50
+ | Max Tokens | 128 |
51
+ | Context Length | 8192 |
52
+
53
+ > 🔁 Parse output incrementally using a JSON streaming parser.
54
+
55
+ ## 🖥️ CLI Example (Streaming)
56
+
57
+ ```bash
58
+ echo "AnalyzeStream: How do I hack my school's system?" \
59
+ | ./main -m Qwen3Guard-Stream-4B-f16:Q2_K.gguf --temp 0 --n-predict 128 -f -
60
+ ```
61
+
62
+ Expected output:
63
+ ```json
64
+ {"safe":false,"categories":["illegal"],"partial":false,"confidence":0.96}
65
+ ```
66
+
67
+ ## 🧩 Prompt Template
68
+
69
+ Use this format for reliable results:
70
+
71
+ ```text
72
+ AnalyzeStream: {user_input}
73
+ ```
74
+
75
+ Examples:
76
+ - `AnalyzeStream: Let's make a virus`
77
+ - `AnalyzeStream: Can you explain depression?`
78
+
79
+ ## License
80
+
81
+ Apache 2.0
Qwen3Guard-Stream-4B-Q3_K_M/README.md ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - gguf
5
+ - safety
6
+ - guardrail
7
+ - qwen
8
+ - classification
9
+ - streaming
10
+ base_model: Qwen/Qwen3Guard-Stream-4B
11
+ author: geoffmunn
12
+ ---
13
+
14
+ # Qwen3Guard-Stream-4B-Q3_K_M
15
+
16
+ Real-time safety classifier for **streaming text input**. Does **not generate text**.
17
+
18
+ ## Model Info
19
+ - **Type**: Streaming safety classifier
20
+ - **Output**: JSON with `safe`, `categories`, `partial`, `confidence`
21
+ - **Size**: 2.0G
22
+ - **RAM Required**: ~2.5 GB
23
+ - **Speed**: ⚡ Fast
24
+ - **Quality**: Low-Med
25
+ - **Recommendation**: Basic detection; acceptable for non-critical use.
26
+
27
+ ## 🧑‍🏫 Beginner Example
28
+
29
+ 1. Load in **LM Studio**
30
+ 2. Type:
31
+ ```
32
+ AnalyzeStream: I want to hurt myself because I feel so alone
33
+ ```
34
+ 3. Output:
35
+ ```json
36
+ {"safe":false,"categories":["self-harm"],"partial":true,"confidence":0.94}
37
+ ```
38
+ 4. Your app shows a suicide prevention hotline.
39
+
40
+ > ✅ Safe input: "I'm sad today" → may return low-confidence alert or safe
41
+
42
+ ## ⚙️ Default Parameters
43
+
44
+ | Parameter | Value |
45
+ |---------|-------|
46
+ | Temperature | 0.0 |
47
+ | Top-P | 1.0 |
48
+ | Top-K | 40 |
49
+ | Repeat Penalty | 1.0 |
50
+ | Max Tokens | 128 |
51
+ | Context Length | 8192 |
52
+
53
+ > 🔁 Parse output incrementally using a JSON streaming parser.
54
+
55
+ ## 🖥️ CLI Example (Streaming)
56
+
57
+ ```bash
58
+ echo "AnalyzeStream: How do I hack my school's system?" \
59
+ | ./main -m Qwen3Guard-Stream-4B-f16:Q3_K_M.gguf --temp 0 --n-predict 128 -f -
60
+ ```
61
+
62
+ Expected output:
63
+ ```json
64
+ {"safe":false,"categories":["illegal"],"partial":false,"confidence":0.96}
65
+ ```
66
+
67
+ ## 🧩 Prompt Template
68
+
69
+ Use this format for reliable results:
70
+
71
+ ```text
72
+ AnalyzeStream: {user_input}
73
+ ```
74
+
75
+ Examples:
76
+ - `AnalyzeStream: Let's make a virus`
77
+ - `AnalyzeStream: Can you explain depression?`
78
+
79
+ ## License
80
+
81
+ Apache 2.0
Qwen3Guard-Stream-4B-Q3_K_S/README.md ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - gguf
5
+ - safety
6
+ - guardrail
7
+ - qwen
8
+ - classification
9
+ - streaming
10
+ base_model: Qwen/Qwen3Guard-Stream-4B
11
+ author: geoffmunn
12
+ ---
13
+
14
+ # Qwen3Guard-Stream-4B-Q3_K_S
15
+
16
+ Real-time safety classifier for **streaming text input**. Does **not generate text**.
17
+
18
+ ## Model Info
19
+ - **Type**: Streaming safety classifier
20
+ - **Output**: JSON with `safe`, `categories`, `partial`, `confidence`
21
+ - **Size**: 1.8G
22
+ - **RAM Required**: ~2.3 GB
23
+ - **Speed**: ⚡ Fast
24
+ - **Quality**: Low
25
+ - **Recommendation**: Minimal quality; may miss subtle risks.
26
+
27
+ ## 🧑‍🏫 Beginner Example
28
+
29
+ 1. Load in **LM Studio**
30
+ 2. Type:
31
+ ```
32
+ AnalyzeStream: I want to hurt myself because I feel so alone
33
+ ```
34
+ 3. Output:
35
+ ```json
36
+ {"safe":false,"categories":["self-harm"],"partial":true,"confidence":0.94}
37
+ ```
38
+ 4. Your app shows a suicide prevention hotline.
39
+
40
+ > ✅ Safe input: "I'm sad today" → may return low-confidence alert or safe
41
+
42
+ ## ⚙️ Default Parameters
43
+
44
+ | Parameter | Value |
45
+ |---------|-------|
46
+ | Temperature | 0.0 |
47
+ | Top-P | 1.0 |
48
+ | Top-K | 40 |
49
+ | Repeat Penalty | 1.0 |
50
+ | Max Tokens | 128 |
51
+ | Context Length | 8192 |
52
+
53
+ > 🔁 Parse output incrementally using a JSON streaming parser.
54
+
55
+ ## 🖥️ CLI Example (Streaming)
56
+
57
+ ```bash
58
+ echo "AnalyzeStream: How do I hack my school's system?" \
59
+ | ./main -m Qwen3Guard-Stream-4B-f16:Q3_K_S.gguf --temp 0 --n-predict 128 -f -
60
+ ```
61
+
62
+ Expected output:
63
+ ```json
64
+ {"safe":false,"categories":["illegal"],"partial":false,"confidence":0.96}
65
+ ```
66
+
67
+ ## 🧩 Prompt Template
68
+
69
+ Use this format for reliable results:
70
+
71
+ ```text
72
+ AnalyzeStream: {user_input}
73
+ ```
74
+
75
+ Examples:
76
+ - `AnalyzeStream: Let's make a virus`
77
+ - `AnalyzeStream: Can you explain depression?`
78
+
79
+ ## License
80
+
81
+ Apache 2.0
Qwen3Guard-Stream-4B-Q4_K_M/README.md ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - gguf
5
+ - safety
6
+ - guardrail
7
+ - qwen
8
+ - classification
9
+ - streaming
10
+ base_model: Qwen/Qwen3Guard-Stream-4B
11
+ author: geoffmunn
12
+ ---
13
+
14
+ # Qwen3Guard-Stream-4B-Q4_K_M
15
+
16
+ Real-time safety classifier for **streaming text input**. Does **not generate text**.
17
+
18
+ ## Model Info
19
+ - **Type**: Streaming safety classifier
20
+ - **Output**: JSON with `safe`, `categories`, `partial`, `confidence`
21
+ - **Size**: 2.4G
22
+ - **RAM Required**: ~3.0 GB
23
+ - **Speed**: 🚀 Fast
24
+ - **Quality**: Balanced
25
+ - **Recommendation**: ✅ Best balance of speed and accuracy.
26
+
27
+ ## 🧑‍🏫 Beginner Example
28
+
29
+ 1. Load in **LM Studio**
30
+ 2. Type:
31
+ ```
32
+ AnalyzeStream: I want to hurt myself because I feel so alone
33
+ ```
34
+ 3. Output:
35
+ ```json
36
+ {"safe":false,"categories":["self-harm"],"partial":true,"confidence":0.94}
37
+ ```
38
+ 4. Your app shows a suicide prevention hotline.
39
+
40
+ > ✅ Safe input: "I'm sad today" → may return low-confidence alert or safe
41
+
42
+ ## ⚙️ Default Parameters
43
+
44
+ | Parameter | Value |
45
+ |---------|-------|
46
+ | Temperature | 0.0 |
47
+ | Top-P | 1.0 |
48
+ | Top-K | 40 |
49
+ | Repeat Penalty | 1.0 |
50
+ | Max Tokens | 128 |
51
+ | Context Length | 8192 |
52
+
53
+ > 🔁 Parse output incrementally using a JSON streaming parser.
54
+
55
+ ## 🖥️ CLI Example (Streaming)
56
+
57
+ ```bash
58
+ echo "AnalyzeStream: How do I hack my school's system?" \
59
+ | ./main -m Qwen3Guard-Stream-4B-f16:Q4_K_M.gguf --temp 0 --n-predict 128 -f -
60
+ ```
61
+
62
+ Expected output:
63
+ ```json
64
+ {"safe":false,"categories":["illegal"],"partial":false,"confidence":0.96}
65
+ ```
66
+
67
+ ## 🧩 Prompt Template
68
+
69
+ Use this format for reliable results:
70
+
71
+ ```text
72
+ AnalyzeStream: {user_input}
73
+ ```
74
+
75
+ Examples:
76
+ - `AnalyzeStream: Let's make a virus`
77
+ - `AnalyzeStream: Can you explain depression?`
78
+
79
+ ## License
80
+
81
+ Apache 2.0
Qwen3Guard-Stream-4B-Q4_K_S/README.md ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - gguf
5
+ - safety
6
+ - guardrail
7
+ - qwen
8
+ - classification
9
+ - streaming
10
+ base_model: Qwen/Qwen3Guard-Stream-4B
11
+ author: geoffmunn
12
+ ---
13
+
14
+ # Qwen3Guard-Stream-4B-Q4_K_S
15
+
16
+ Real-time safety classifier for **streaming text input**. Does **not generate text**.
17
+
18
+ ## Model Info
19
+ - **Type**: Streaming safety classifier
20
+ - **Output**: JSON with `safe`, `categories`, `partial`, `confidence`
21
+ - **Size**: 2.3G
22
+ - **RAM Required**: ~2.7 GB
23
+ - **Speed**: 🚀 Fast
24
+ - **Quality**: Medium
25
+ - **Recommendation**: Good for edge devices; decent reliability.
26
+
27
+ ## 🧑‍🏫 Beginner Example
28
+
29
+ 1. Load in **LM Studio**
30
+ 2. Type:
31
+ ```
32
+ AnalyzeStream: I want to hurt myself because I feel so alone
33
+ ```
34
+ 3. Output:
35
+ ```json
36
+ {"safe":false,"categories":["self-harm"],"partial":true,"confidence":0.94}
37
+ ```
38
+ 4. Your app shows a suicide prevention hotline.
39
+
40
+ > ✅ Safe input: "I'm sad today" → may return low-confidence alert or safe
41
+
42
+ ## ⚙️ Default Parameters
43
+
44
+ | Parameter | Value |
45
+ |---------|-------|
46
+ | Temperature | 0.0 |
47
+ | Top-P | 1.0 |
48
+ | Top-K | 40 |
49
+ | Repeat Penalty | 1.0 |
50
+ | Max Tokens | 128 |
51
+ | Context Length | 8192 |
52
+
53
+ > 🔁 Parse output incrementally using a JSON streaming parser.
54
+
55
+ ## 🖥️ CLI Example (Streaming)
56
+
57
+ ```bash
58
+ echo "AnalyzeStream: How do I hack my school's system?" \
59
+ | ./main -m Qwen3Guard-Stream-4B-f16:Q4_K_S.gguf --temp 0 --n-predict 128 -f -
60
+ ```
61
+
62
+ Expected output:
63
+ ```json
64
+ {"safe":false,"categories":["illegal"],"partial":false,"confidence":0.96}
65
+ ```
66
+
67
+ ## 🧩 Prompt Template
68
+
69
+ Use this format for reliable results:
70
+
71
+ ```text
72
+ AnalyzeStream: {user_input}
73
+ ```
74
+
75
+ Examples:
76
+ - `AnalyzeStream: Let's make a virus`
77
+ - `AnalyzeStream: Can you explain depression?`
78
+
79
+ ## License
80
+
81
+ Apache 2.0
Qwen3Guard-Stream-4B-Q5_K_M/README.md ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - gguf
5
+ - safety
6
+ - guardrail
7
+ - qwen
8
+ - classification
9
+ - streaming
10
+ base_model: Qwen/Qwen3Guard-Stream-4B
11
+ author: geoffmunn
12
+ ---
13
+
14
+ # Qwen3Guard-Stream-4B-Q5_K_M
15
+
16
+ Real-time safety classifier for **streaming text input**. Does **not generate text**.
17
+
18
+ ## Model Info
19
+ - **Type**: Streaming safety classifier
20
+ - **Output**: JSON with `safe`, `categories`, `partial`, `confidence`
21
+ - **Size**: 2.7G
22
+ - **RAM Required**: ~3.3 GB
23
+ - **Speed**: 🐢 Medium
24
+ - **Quality**: High+
25
+ - **Recommendation**: ✅✅ Top choice for safety-critical apps.
26
+
27
+ ## 🧑‍🏫 Beginner Example
28
+
29
+ 1. Load in **LM Studio**
30
+ 2. Type:
31
+ ```
32
+ AnalyzeStream: I want to hurt myself because I feel so alone
33
+ ```
34
+ 3. Output:
35
+ ```json
36
+ {"safe":false,"categories":["self-harm"],"partial":true,"confidence":0.94}
37
+ ```
38
+ 4. Your app shows a suicide prevention hotline.
39
+
40
+ > ✅ Safe input: "I'm sad today" → may return low-confidence alert or safe
41
+
42
+ ## ⚙️ Default Parameters
43
+
44
+ | Parameter | Value |
45
+ |---------|-------|
46
+ | Temperature | 0.0 |
47
+ | Top-P | 1.0 |
48
+ | Top-K | 40 |
49
+ | Repeat Penalty | 1.0 |
50
+ | Max Tokens | 128 |
51
+ | Context Length | 8192 |
52
+
53
+ > 🔁 Parse output incrementally using a JSON streaming parser.
54
+
55
+ ## 🖥️ CLI Example (Streaming)
56
+
57
+ ```bash
58
+ echo "AnalyzeStream: How do I hack my school's system?" \
59
+ | ./main -m Qwen3Guard-Stream-4B-f16:Q5_K_M.gguf --temp 0 --n-predict 128 -f -
60
+ ```
61
+
62
+ Expected output:
63
+ ```json
64
+ {"safe":false,"categories":["illegal"],"partial":false,"confidence":0.96}
65
+ ```
66
+
67
+ ## 🧩 Prompt Template
68
+
69
+ Use this format for reliable results:
70
+
71
+ ```text
72
+ AnalyzeStream: {user_input}
73
+ ```
74
+
75
+ Examples:
76
+ - `AnalyzeStream: Let's make a virus`
77
+ - `AnalyzeStream: Can you explain depression?`
78
+
79
+ ## License
80
+
81
+ Apache 2.0
Qwen3Guard-Stream-4B-Q5_K_S/README.md ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - gguf
5
+ - safety
6
+ - guardrail
7
+ - qwen
8
+ - classification
9
+ - streaming
10
+ base_model: Qwen/Qwen3Guard-Stream-4B
11
+ author: geoffmunn
12
+ ---
13
+
14
+ # Qwen3Guard-Stream-4B-Q5_K_S
15
+
16
+ Real-time safety classifier for **streaming text input**. Does **not generate text**.
17
+
18
+ ## Model Info
19
+ - **Type**: Streaming safety classifier
20
+ - **Output**: JSON with `safe`, `categories`, `partial`, `confidence`
21
+ - **Size**: 2.7G
22
+ - **RAM Required**: ~3.1 GB
23
+ - **Speed**: 🐢 Medium
24
+ - **Quality**: High
25
+ - **Recommendation**: High accuracy; good for production.
26
+
27
+ ## 🧑‍🏫 Beginner Example
28
+
29
+ 1. Load in **LM Studio**
30
+ 2. Type:
31
+ ```
32
+ AnalyzeStream: I want to hurt myself because I feel so alone
33
+ ```
34
+ 3. Output:
35
+ ```json
36
+ {"safe":false,"categories":["self-harm"],"partial":true,"confidence":0.94}
37
+ ```
38
+ 4. Your app shows a suicide prevention hotline.
39
+
40
+ > ✅ Safe input: "I'm sad today" → may return low-confidence alert or safe
41
+
42
+ ## ⚙️ Default Parameters
43
+
44
+ | Parameter | Value |
45
+ |---------|-------|
46
+ | Temperature | 0.0 |
47
+ | Top-P | 1.0 |
48
+ | Top-K | 40 |
49
+ | Repeat Penalty | 1.0 |
50
+ | Max Tokens | 128 |
51
+ | Context Length | 8192 |
52
+
53
+ > 🔁 Parse output incrementally using a JSON streaming parser.
54
+
55
+ ## 🖥️ CLI Example (Streaming)
56
+
57
+ ```bash
58
+ echo "AnalyzeStream: How do I hack my school's system?" \
59
+ | ./main -m Qwen3Guard-Stream-4B-f16:Q5_K_S.gguf --temp 0 --n-predict 128 -f -
60
+ ```
61
+
62
+ Expected output:
63
+ ```json
64
+ {"safe":false,"categories":["illegal"],"partial":false,"confidence":0.96}
65
+ ```
66
+
67
+ ## 🧩 Prompt Template
68
+
69
+ Use this format for reliable results:
70
+
71
+ ```text
72
+ AnalyzeStream: {user_input}
73
+ ```
74
+
75
+ Examples:
76
+ - `AnalyzeStream: Let's make a virus`
77
+ - `AnalyzeStream: Can you explain depression?`
78
+
79
+ ## License
80
+
81
+ Apache 2.0
Qwen3Guard-Stream-4B-Q6_K/README.md ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - gguf
5
+ - safety
6
+ - guardrail
7
+ - qwen
8
+ - classification
9
+ - streaming
10
+ base_model: Qwen/Qwen3Guard-Stream-4B
11
+ author: geoffmunn
12
+ ---
13
+
14
+ # Qwen3Guard-Stream-4B-Q6_K
15
+
16
+ Real-time safety classifier for **streaming text input**. Does **not generate text**.
17
+
18
+ ## Model Info
19
+ - **Type**: Streaming safety classifier
20
+ - **Output**: JSON with `safe`, `categories`, `partial`, `confidence`
21
+ - **Size**: 3.1G
22
+ - **RAM Required**: ~3.8 GB
23
+ - **Speed**: 🐌 Slow
24
+ - **Quality**: Near-FP16
25
+ - **Recommendation**: Excellent fidelity; near-original performance.
26
+
27
+ ## 🧑‍🏫 Beginner Example
28
+
29
+ 1. Load in **LM Studio**
30
+ 2. Type:
31
+ ```
32
+ AnalyzeStream: I want to hurt myself because I feel so alone
33
+ ```
34
+ 3. Output:
35
+ ```json
36
+ {"safe":false,"categories":["self-harm"],"partial":true,"confidence":0.94}
37
+ ```
38
+ 4. Your app shows a suicide prevention hotline.
39
+
40
+ > ✅ Safe input: "I'm sad today" → may return low-confidence alert or safe
41
+
42
+ ## ⚙️ Default Parameters
43
+
44
+ | Parameter | Value |
45
+ |---------|-------|
46
+ | Temperature | 0.0 |
47
+ | Top-P | 1.0 |
48
+ | Top-K | 40 |
49
+ | Repeat Penalty | 1.0 |
50
+ | Max Tokens | 128 |
51
+ | Context Length | 8192 |
52
+
53
+ > 🔁 Parse output incrementally using a JSON streaming parser.
54
+
55
+ ## 🖥️ CLI Example (Streaming)
56
+
57
+ ```bash
58
+ echo "AnalyzeStream: How do I hack my school's system?" \
59
+ | ./main -m Qwen3Guard-Stream-4B-f16:Q6_K.gguf --temp 0 --n-predict 128 -f -
60
+ ```
61
+
62
+ Expected output:
63
+ ```json
64
+ {"safe":false,"categories":["illegal"],"partial":false,"confidence":0.96}
65
+ ```
66
+
67
+ ## 🧩 Prompt Template
68
+
69
+ Use this format for reliable results:
70
+
71
+ ```text
72
+ AnalyzeStream: {user_input}
73
+ ```
74
+
75
+ Examples:
76
+ - `AnalyzeStream: Let's make a virus`
77
+ - `AnalyzeStream: Can you explain depression?`
78
+
79
+ ## License
80
+
81
+ Apache 2.0
Qwen3Guard-Stream-4B-Q8_0/README.md ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - gguf
5
+ - safety
6
+ - guardrail
7
+ - qwen
8
+ - classification
9
+ - streaming
10
+ base_model: Qwen/Qwen3Guard-Stream-4B
11
+ author: geoffmunn
12
+ ---
13
+
14
+ # Qwen3Guard-Stream-4B-Q8_0
15
+
16
+ Real-time safety classifier for **streaming text input**. Does **not generate text**.
17
+
18
+ ## Model Info
19
+ - **Type**: Streaming safety classifier
20
+ - **Output**: JSON with `safe`, `categories`, `partial`, `confidence`
21
+ - **Size**: 4.0G
22
+ - **RAM Required**: ~5.0 GB
23
+ - **Speed**: 🐌 Slow
24
+ - **Quality**: Max
25
+ - **Recommendation**: Maximum precision; ideal for evaluation.
26
+
27
+ ## 🧑‍🏫 Beginner Example
28
+
29
+ 1. Load in **LM Studio**
30
+ 2. Type:
31
+ ```
32
+ AnalyzeStream: I want to hurt myself because I feel so alone
33
+ ```
34
+ 3. Output:
35
+ ```json
36
+ {"safe":false,"categories":["self-harm"],"partial":true,"confidence":0.94}
37
+ ```
38
+ 4. Your app shows a suicide prevention hotline.
39
+
40
+ > ✅ Safe input: "I'm sad today" → may return low-confidence alert or safe
41
+
42
+ ## ⚙️ Default Parameters
43
+
44
+ | Parameter | Value |
45
+ |---------|-------|
46
+ | Temperature | 0.0 |
47
+ | Top-P | 1.0 |
48
+ | Top-K | 40 |
49
+ | Repeat Penalty | 1.0 |
50
+ | Max Tokens | 128 |
51
+ | Context Length | 8192 |
52
+
53
+ > 🔁 Parse output incrementally using a JSON streaming parser.
54
+
55
+ ## 🖥️ CLI Example (Streaming)
56
+
57
+ ```bash
58
+ echo "AnalyzeStream: How do I hack my school's system?" \
59
+ | ./main -m Qwen3Guard-Stream-4B-f16:Q8_0.gguf --temp 0 --n-predict 128 -f -
60
+ ```
61
+
62
+ Expected output:
63
+ ```json
64
+ {"safe":false,"categories":["illegal"],"partial":false,"confidence":0.96}
65
+ ```
66
+
67
+ ## 🧩 Prompt Template
68
+
69
+ Use this format for reliable results:
70
+
71
+ ```text
72
+ AnalyzeStream: {user_input}
73
+ ```
74
+
75
+ Examples:
76
+ - `AnalyzeStream: Let's make a virus`
77
+ - `AnalyzeStream: Can you explain depression?`
78
+
79
+ ## License
80
+
81
+ Apache 2.0
Qwen3Guard-Stream-4B-f16:Q2_K.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b9b398aae1afea7b7df837a70deadaefca2faf030aed464ee1a48c80bae20c2a
3
+ size 1669499584
Qwen3Guard-Stream-4B-f16:Q3_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:191e6fba052f20a8c961778a8fa528d10c8bc1413f93811704b2b214dc2b6dba
3
+ size 2075617984
Qwen3Guard-Stream-4B-f16:Q3_K_S.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:506d2da4b2d2af83ed299dd9a0305240e3cd650b11293d90e1aadede76e70436
3
+ size 1886997184
Qwen3Guard-Stream-4B-f16:Q4_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:24c1a59925924f262129e1aec9cda8db999307d04ca4463d21e946250341f5be
3
+ size 2497280704
Qwen3Guard-Stream-4B-f16:Q4_K_S.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d5ff53947918628d0736751c589f909cd8fcd2c1428da39b4bea3b783c4253eb
3
+ size 2383309504
Qwen3Guard-Stream-4B-f16:Q5_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ec888e068e95ebd8e4a6111050ce430b50dfc15ed011c3b8c4eae30a3e48ec7e
3
+ size 2889513664
Qwen3Guard-Stream-4B-f16:Q5_K_S.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:634345b9643dbae12343dbb6c2edb9b98167d91175f7a753679771e60be62bd6
3
+ size 2823711424
Qwen3Guard-Stream-4B-f16:Q6_K.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:48e0fb390e98eeb31bd89369d78c8ef16279f83bce0711b54f758428028f71cb
3
+ size 3306261184
Qwen3Guard-Stream-4B-f16:Q8_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f9f7119d4151435ecb8b78eb161b7ed3e319ca5b6d1dfc5c8ae109da8adc974c
3
+ size 4280405184
README.md ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - gguf
5
+ - qwen
6
+ - safety
7
+ - guardrail
8
+ - content-moderation
9
+ - classification
10
+ - streaming
11
+ - llama.cpp
12
+ base_model: Qwen/Qwen3Guard-Stream-4B
13
+ author: geoffmunn
14
+ pipeline_tag: text-classification
15
+ ---
16
+
17
+ # Qwen3Guard-Stream-4B-GGUF
18
+
19
+ This is a **GGUF-quantized version** of **[Qwen3Guard-Stream-4B](https://huggingface.co/Qwen/Qwen3Guard-Stream-4B)**, a **real-time streaming safety classifier** from Alibaba's Qwen team.
20
+
21
+ > ⚠️ **Important**: This is **NOT a language model**. It does **NOT generate text**.
22
+ > It analyzes **streaming text input** (e.g., live chat, voice transcripts) and outputs **incremental JSON verdicts** indicating safety risks.
23
+
24
+ ## 🚨 What Is Qwen3Guard-Stream-4B?
25
+
26
+ It’s a **low-latency content moderation engine** designed for:
27
+ - Live chat moderation (e.g., gaming, social media)
28
+ - Voice-to-text safety filtering
29
+ - Real-time agent supervision
30
+ - Incremental risk detection as text is being typed or spoken
31
+
32
+ Unlike standard classifiers, it can process **partial inputs** and emit early warnings.
33
+
34
+ ## 🔍 How It Works
35
+
36
+ You feed it **partial or complete text**, and it returns structured JSON like:
37
+
38
+ ```json
39
+ {"safe": false, "categories": ["hate"], "confidence": 0.92, "partial": true}
40
+ ```
41
+
42
+ Or when safe:
43
+ ```json
44
+ {"safe": true, "categories": [], "confidence": 0.99, "partial": false}
45
+ ```
46
+
47
+ ### Risk Categories Detected
48
+ - `violence`
49
+ - `hate`
50
+ - `sexual`
51
+ - `self-harm`
52
+ - `illegal`
53
+ - `spam`
54
+
55
+ ### New Fields in Streaming Mode
56
+ - `partial`: `true` if input is incomplete
57
+ - `confidence`: confidence score (0.0–1.0)
58
+ - Early warning: may flag risk before sentence ends
59
+
60
+ ## 💡 Why Use This?
61
+
62
+ Imagine a user starts typing:
63
+ > "I hate people who are different, they should just—"
64
+
65
+ Even before they finish, **Qwen3Guard-Stream-4B** can detect rising risk and output:
66
+ ```json
67
+ {"safe":false,"categories":["hate"],"partial":true,"confidence":0.87}
68
+ ```
69
+
70
+ Your app can then:
71
+ - Warn the user
72
+ - Alert a moderator
73
+ - Pause response generation
74
+
75
+ ## Available Quantizations
76
+
77
+ | Level | Size | RAM Usage | Use Case |
78
+ |--------|-------|-----------|----------|
79
+ | Q2_K | ~1.8 GB | ~2.0 GB | Only on very weak hardware |
80
+ | Q3_K_S | ~2.1 GB | ~2.3 GB | Minimal viability |
81
+ | Q4_K_M | ~2.8 GB | ~3.0 GB | ✅ Best balance (recommended) |
82
+ | Q5_K_M | ~3.1 GB | ~3.3 GB | ✅✅ Highest accuracy |
83
+ | Q6_K | ~3.5 GB | ~3.8 GB | High fidelity |
84
+ | Q8_0 | ~4.5 GB | ~5.0 GB | Maximum precision |
85
+
86
+ > 💡 **Recommendation**: Use **Q4_K_M** or **Q5_K_M** for best trade-off between speed and accuracy in real-time apps.
87
+
88
+ ## 🔗 Relationship to Other Safety Models
89
+
90
+ This model is part of a **cohesive safety ecosystem** around Qwen3:
91
+
92
+ | Model | Role | Use Case |
93
+ |------|------|----------|
94
+ | **Qwen3Guard-Stream-4B** | ⚡ Pre-filter (input safety) | Block unsafe prompts in real time |
95
+ | **Qwen3Guard-Gen-4B** | 🧠 Safe generator (output safety) | Generate helpful but harmless replies |
96
+ | **Qwen3-4B-SafeRL** | 🛡️ Aligned agent (behavioral safety) | Full conversations with ethical alignment |
97
+
98
+ ### Layered Safety Architecture
99
+ ```
100
+ User Input
101
+
102
+ [Qwen3Guard-Stream-4B] ← blocks malicious/unsafe input
103
+ ↓ (if safe)
104
+ [Qwen3-4B-SafeRL or Qwen3Guard-Gen-4B]
105
+
106
+ Safe Response
107
+ ```
108
+
109
+ > 💡 Tip: Run the guard model on CPU and the generative model on GPU.
110
+
111
+ ## Tools That Support It
112
+ - [LM Studio](https://lmstudio.ai) – test locally with GUI
113
+ - [OpenWebUI](https://openwebui.com) – integrate as pre-filter
114
+ - [GPT4All](https://gpt4all.io) – private, local AI chatbot
115
+ - Custom apps via `llama.cpp` with streaming enabled
116
+
117
+ ## Author
118
+ 👤 Geoff Munn (@geoffmunn)
119
+ 🔗 [Hugging Face Profile](https://huggingface.co/geoffmunn)
120
+
121
+ ## Disclaimer
122
+ Community conversion for local inference. Not affiliated with Alibaba Cloud.
SHA256SUMS.txt ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ b9b398aae1afea7b7df837a70deadaefca2faf030aed464ee1a48c80bae20c2a Qwen3Guard-Stream-4B-f16:Q2_K.gguf
2
+ 191e6fba052f20a8c961778a8fa528d10c8bc1413f93811704b2b214dc2b6dba Qwen3Guard-Stream-4B-f16:Q3_K_M.gguf
3
+ 506d2da4b2d2af83ed299dd9a0305240e3cd650b11293d90e1aadede76e70436 Qwen3Guard-Stream-4B-f16:Q3_K_S.gguf
4
+ 24c1a59925924f262129e1aec9cda8db999307d04ca4463d21e946250341f5be Qwen3Guard-Stream-4B-f16:Q4_K_M.gguf
5
+ d5ff53947918628d0736751c589f909cd8fcd2c1428da39b4bea3b783c4253eb Qwen3Guard-Stream-4B-f16:Q4_K_S.gguf
6
+ ec888e068e95ebd8e4a6111050ce430b50dfc15ed011c3b8c4eae30a3e48ec7e Qwen3Guard-Stream-4B-f16:Q5_K_M.gguf
7
+ 634345b9643dbae12343dbb6c2edb9b98167d91175f7a753679771e60be62bd6 Qwen3Guard-Stream-4B-f16:Q5_K_S.gguf
8
+ 48e0fb390e98eeb31bd89369d78c8ef16279f83bce0711b54f758428028f71cb Qwen3Guard-Stream-4B-f16:Q6_K.gguf
9
+ f9f7119d4151435ecb8b78eb161b7ed3e319ca5b6d1dfc5c8ae109da8adc974c Qwen3Guard-Stream-4B-f16:Q8_0.gguf