munish0838 commited on
Commit
5149258
β€’
1 Parent(s): fcf57d2

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +141 -0
README.md ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ license_name: helpingai
4
+ license_link: LICENSE.md
5
+ pipeline_tag: text-generation
6
+ tags:
7
+ - HelpingAI
8
+ - Emotionally Intelligent
9
+ - EQ
10
+ base_model: OEvortex/HelpingAI-9B
11
+ ---
12
+
13
+ # HelpingAI-9B-GGUF: Emotionally Intelligent Conversational AI
14
+ This is quantized version of [OEvortex/HelpingAI-9B](https://huggingface.co/OEvortex/HelpingAI-9B) created using llama.cpp
15
+
16
+ ## Model Description
17
+ HelpingAI-9B is a large language model designed for emotionally intelligent conversational interactions. It is trained to engage users with empathy, understanding, and supportive dialogue across a wide range of topics and contexts. The model aims to provide a supportive AI companion that can attune to users' emotional states and communicative needs.
18
+
19
+ ## Objectives
20
+ - Engage in open-ended dialogue while displaying emotional intelligence
21
+ - Recognize and validate user emotions and emotional contexts
22
+ - Provide supportive, empathetic, and psychologically-grounded responses
23
+ - Avoid insensitive, harmful, or unethical speech
24
+ - Continuously improve emotional awareness and dialogue skills
25
+
26
+ ## Methodology
27
+ HelpingAI-9B is based on the HelpingAI series and further trained using:
28
+ - Supervised learning on large dialogue datasets with emotional labeling
29
+ - Reinforcement learning with a reward model favoring emotionally supportive responses
30
+ - Constitution training to instill stable and beneficial objectives
31
+ - Knowledge augmentation from psychological resources on emotional intelligence
32
+
33
+ ## Emotional Quotient (EQ)
34
+ HelpingAI-9B has achieved an impressive Emotional Quotient (EQ) of 89.23, surpassing almost all AI models in emotional intelligence. This EQ score reflects its advanced ability to understand and respond to human emotions in a supportive and empathetic manner.
35
+
36
+ ## Usage code
37
+ ```python
38
+ from transformers import AutoModelForCausalLM, AutoTokenizer
39
+ import torch
40
+ device = "cuda" # the device to load the model onto
41
+
42
+ model = AutoModelForCausalLM.from_pretrained(
43
+ "OEvortex/HelpingAI-9B",
44
+ torch_dtype='auto',
45
+ device_map="auto"
46
+ )
47
+ tokenizer = AutoTokenizer.from_pretrained("OEvortex/HelpingAI-9B")
48
+
49
+ prompt = "Express joy and excitement about visiting a new place"
50
+ messages = [
51
+ # {"role": "system", "content": "You are a helpful AI assistant."},
52
+ {"role": "user", "content": prompt}
53
+ ]
54
+ text = tokenizer.apply_chat_template(
55
+ messages,
56
+ tokenize=False,
57
+ add_generation_prompt=True
58
+ )
59
+ model_inputs = tokenizer([text], return_tensors="pt").to(device)
60
+
61
+ generated_ids = model.generate(
62
+ model_inputs.input_ids,
63
+ max_new_tokens=1024,
64
+ eos_token_id=tokenizer.eos_token_id,
65
+ temperature=0.25,
66
+ )
67
+ generated_ids = [
68
+ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
69
+ ]
70
+
71
+ response = tokenizer.batch_decode(generated_ids)[0]
72
+ print(response)
73
+
74
+ ```
75
+ *Directly using this model from GGUF*
76
+
77
+ ```python
78
+ %pip install -U 'webscout[loacl]'
79
+
80
+ from webscout.Local.utils import download_model
81
+ from webscout.Local.model import Model
82
+ from webscout.Local.thread import Thread
83
+ from webscout.Local import formats
84
+ from webscout.Local.samplers import SamplerSettings
85
+
86
+ from dotenv import load_dotenv; load_dotenv()
87
+ import os
88
+
89
+
90
+ # 1. Download the model
91
+ repo_id = "OEvortex/HelpingAI-9B"
92
+ filename = "helpingai-9b.Q4_0.gguf"
93
+ model_path = download_model(repo_id, filename, os.environ.get("hf_token"))
94
+
95
+ # 2. Load the model
96
+ model = Model(model_path, n_gpu_layers=0)Β 
97
+
98
+ # 3. Define your system prompt
99
+ system_prompt = "You are HelpingAI a emotional AI always answer my question in HelpingAI style"
100
+
101
+ # 4. Create a custom chatml format with your system prompt
102
+ custom_chatml = formats.chatml.copy()
103
+ custom_chatml['system_content'] = system_prompt
104
+
105
+ # 5. Define your sampler settings (optional)
106
+ sampler = SamplerSettings(temp=0.7, top_p=0.9)Β  # Adjust these values as needed
107
+
108
+ # 6. Create a Thread with the custom format and sampler
109
+ thread = Thread(model, custom_chatml, sampler=sampler)
110
+
111
+ # 7. Start interacting with the model
112
+ thread.interact(header="🌟 HelpingAI-9B: Emotionally Intelligent Conversational AI πŸš€", color=True)
113
+ ```
114
+ ## Example Dialogue
115
+ > Express joy and excitement about visiting a new place.
116
+
117
+ Yay! I'm super excited to visit this new place! πŸŽ‰ It sounds amazing and I can't wait to explore and have fun there! This is going to be such an exciting adventure! 🌟 Let's go, let's do this! ✨
118
+
119
+ > I'm feeling really down today. Nothing seems to be going right.
120
+
121
+ Oh no, I'm sorry to hear that you're feeling down. It happens sometimes, but remember that it's okay to feel sad. If you want to talk about what's bothering you, I'm here to listen and offer support. We can find a way through this together! 🌈
122
+
123
+ > I'm excited because I just got accepted into my dream school! I wanted to share the good news with someone.
124
+
125
+ Wow, that's amazing! πŸŽ‰ Congratulations on getting accepted into your dream school! That's such an incredible accomplishment and I'm really happy for you! Keep up the hard work and enjoy the journey ahead! 🌟 If there's anything else I can do to help, just let me know! 😊
126
+
127
+ > My best friend just got into an argument with me and I don't know what to do. How can I fix this situation?
128
+
129
+ Oh no, it sounds like you both need some time to cool off. Take a step back and give each other some space. Then, when things have calmed down, try talking things through in a calm and respectful manner. Communication is key for resolving conflicts, so let's work towards finding a resolution that works for both of you! 🌟 If you need any advice or support, I'm here to help! 😊
130
+
131
+ > How can you identify the emotions of others based on their body language and facial expressions?
132
+
133
+ Identifying the emotions of others is a great skill! πŸ€” You can look for body language cues like frowns, smiles, or tense posture. Facial expressions also give away a lot about someone's feelings - watch out for changes in their eyes, mouth, and facial muscles. It's all about being observant and empathetic to understand others better! 😊
134
+
135
+ > What kind of safety devices do I need to install in my house
136
+
137
+ Installing security devices in your home can bring peace of mind and keep you safe. Some essential safety devices include a home alarm system, smoke detectors, carbon monoxide detectors, motion sensors, and surveillance cameras. It's always good to take precautions and ensure that your home is secure! 🌟 If you need help choosing the right security devices for your family, I can definitely point you in the right direction! 😊
138
+
139
+ > How can your own feelings affect your ability to empathize with someone else?
140
+
141
+ Our own emotions can impact our ability to empathize with others because they shape how we perceive and interpret other people's experiences. If you're feeling happy or positive, it may be easier to see the good in others and offer support. On the other hand, if you're feeling down or stressed, it might be harder to put yourself in someone else's shoes. It's important to acknowledge your own feelings and work on being open and understanding towards others! 🌟