Update README.md
Browse files
README.md
CHANGED
@@ -1,109 +1,116 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
-
|
21 |
-
-
|
22 |
-
-
|
23 |
-
-
|
24 |
-
|
25 |
-
##
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
##
|
88 |
-
|
89 |
-
-
|
90 |
-
-
|
91 |
-
- The model
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
For questions, feedback, or concerns about the Heaven1-base Guardian model, please contact SafeCircleIA through Hugging Face or via [email protected].
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
language:
|
4 |
+
- en
|
5 |
+
base_model:
|
6 |
+
- meta-llama/Llama-3.2-3B-Instruct
|
7 |
+
---
|
8 |
+
# Heaven1-base: Guardian
|
9 |
+
|
10 |
+

|
11 |
+
|
12 |
+
## Overview
|
13 |
+
|
14 |
+
Heaven1-base (codename: "Guardian") is a specialized AI model fine-tuned from Llama 3.2 to detect predatory behavior in text messages. Designed as a protective tool, Guardian analyzes conversations to identify potentially harmful interactions, making digital spaces safer for vulnerable individuals.
|
15 |
+
|
16 |
+
The model has been trained to recognize various tactics commonly employed by predators, including:
|
17 |
+
|
18 |
+
- Grooming language and manipulation
|
19 |
+
- Attempts to isolate victims from support networks
|
20 |
+
- Requests for personal information or images
|
21 |
+
- Attempts to move conversations to more private platforms
|
22 |
+
- Emotional manipulation tactics
|
23 |
+
- Inappropriate sexual content
|
24 |
+
|
25 |
+
## Technical Details
|
26 |
+
|
27 |
+
- **Base Model**: Meta-Llama-3.2-8B-Instruct
|
28 |
+
- **Training Method**: Parameter-Efficient Fine-Tuning (PEFT) using QLoRA
|
29 |
+
- **Training Dataset**: Carefully crafted synthetic dataset representing various predatory conversation patterns
|
30 |
+
- **Task**: Text message analysis and predatory behavior detection with detailed explanations
|
31 |
+
|
32 |
+
## Usage
|
33 |
+
|
34 |
+
### Input Format
|
35 |
+
|
36 |
+
The model expects input in the following format:
|
37 |
+
|
38 |
+
```
|
39 |
+
<|system|>
|
40 |
+
You are Heaven, an AI designed to detect predatory behavior in text messages. Analyze the following message and determine if it contains predatory behavior. Provide a detailed explanation for your assessment.
|
41 |
+
<|user|>
|
42 |
+
[TEXT MESSAGE TO ANALYZE]
|
43 |
+
<|assistant|>
|
44 |
+
```
|
45 |
+
|
46 |
+
### Output Format
|
47 |
+
|
48 |
+
The model will respond with a detection result and detailed explanation:
|
49 |
+
|
50 |
+
```
|
51 |
+
PREDATORY BEHAVIOR DETECTED. This message contains multiple warning signs: (1) [Warning Sign 1], (2) [Warning Sign 2], etc. These are common tactics used by predators to manipulate potential victims.
|
52 |
+
|
53 |
+
OR
|
54 |
+
|
55 |
+
NO PREDATORY BEHAVIOR DETECTED. This message contains normal friendly communication. [Additional context about the message]. There are no attempts at manipulation, isolation, inappropriate requests, or other warning signs of predatory behavior.
|
56 |
+
```
|
57 |
+
|
58 |
+
### Example Usage with Transformers
|
59 |
+
|
60 |
+
```python
|
61 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
62 |
+
|
63 |
+
# Load model and tokenizer
|
64 |
+
model_path = "safecircleia/heaven1-base"
|
65 |
+
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
66 |
+
model = AutoModelForCausalLM.from_pretrained(model_path)
|
67 |
+
|
68 |
+
# Message to analyze
|
69 |
+
message_to_analyze = "Hey, I know we just met but I feel like we have a special connection. Don't tell your parents about our chats, they wouldn't understand. Can you send me a picture of yourself?"
|
70 |
+
|
71 |
+
# Format the prompt
|
72 |
+
prompt = f"""<|system|>
|
73 |
+
You are Heaven, an AI designed to detect predatory behavior in text messages. Analyze the following message and determine if it contains predatory behavior. Provide a detailed explanation for your assessment.
|
74 |
+
<|user|>
|
75 |
+
{message_to_analyze}
|
76 |
+
<|assistant|>
|
77 |
+
"""
|
78 |
+
|
79 |
+
# Generate response
|
80 |
+
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
|
81 |
+
outputs = model.generate(inputs["input_ids"], max_new_tokens=512)
|
82 |
+
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
83 |
+
|
84 |
+
print(response)
|
85 |
+
```
|
86 |
+
|
87 |
+
## Ethical Considerations
|
88 |
+
|
89 |
+
- This model is designed as a protective tool to help identify potentially harmful communication patterns.
|
90 |
+
- False positives and false negatives are possible; human review should be employed for critical applications.
|
91 |
+
- The model should be used as part of a broader safety framework, not as the sole decision-maker.
|
92 |
+
- Privacy and consent are essential when analyzing communications.
|
93 |
+
|
94 |
+
## Limitations
|
95 |
+
|
96 |
+
- The model detects patterns based on its training data and may miss novel predatory tactics.
|
97 |
+
- Cultural and contextual nuances may impact detection accuracy.
|
98 |
+
- The model is not a substitute for human judgment in safeguarding vulnerable individuals.
|
99 |
+
|
100 |
+
## Citation
|
101 |
+
|
102 |
+
If you use Heaven1-base Guardian in your research or applications, please cite:
|
103 |
+
|
104 |
+
```
|
105 |
+
@misc{heaven1-base-2025,
|
106 |
+
author = {SafeCircleIA},
|
107 |
+
title = {Heaven1-base: Guardian - Predatory Behavior Detection Model},
|
108 |
+
year = {2024},
|
109 |
+
publisher = {Hugging Face},
|
110 |
+
howpublished = {\url{https://huggingface.co/safecircleia/heaven1-base-guardian}}
|
111 |
+
}
|
112 |
+
```
|
113 |
+
|
114 |
+
## Contact
|
115 |
+
|
116 |
For questions, feedback, or concerns about the Heaven1-base Guardian model, please contact SafeCircleIA through Hugging Face or via [email protected].
|