aashish1904 commited on
Commit
8ef1c31
β€’
1 Parent(s): 728064c

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +146 -0
README.md ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+
4
+ license: other
5
+ license_name: helpingai
6
+ license_link: LICENSE.md
7
+ pipeline_tag: text-generation
8
+ tags:
9
+ - HelpingAI
10
+ - Emotionally Intelligent
11
+ - EQ
12
+ - flash
13
+ datasets:
14
+ - OEvortex/SentimentSynth
15
+ - OEvortex/EmotionalIntelligence-10K
16
+
17
+ ---
18
+
19
+ ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeiuCm7c8lEwEJuRey9kiVZsRn2W-b4pWlu3-X534V3YmVuVc2ZL-NXg2RkzSOOS2JXGHutDuyyNAUtdJI65jGTo8jT9Y99tMi4H4MqL44Uc5QKG77B0d6-JfIkZHFaUA71-RtjyYZWVIhqsNZcx8-OMaA?key=xt3VSDoCbmTY7o-cwwOFwQ)
20
+
21
+ # QuantFactory/HelpingAI-flash-GGUF
22
+ This is quantized version of [OEvortex/HelpingAI-flash](https://huggingface.co/OEvortex/HelpingAI-flash) created using llama.cpp
23
+
24
+ # Original Model Card
25
+
26
+
27
+ # HelpingAI-flash: Emotionally Intelligent Conversational AI for All Devices
28
+
29
+ ![logo](https://huggingface.co/OEvortex/HelpingAI-3B/resolve/main/HelpingAI.png)
30
+
31
+ ## Overview
32
+ HelpingAI-flash is a versatile 2B parameter language model designed to deliver emotionally intelligent conversational interactions across all devices, including smartphones. It is engineered to engage users with empathy, understanding, and supportive dialogue, adapting seamlessly to various contexts and platforms. This model strives to offer a compassionate AI companion that resonates with users’ emotional needs and provides meaningful interactions wherever they are.
33
+
34
+ ## Objectives
35
+ - Facilitate open-ended dialogue with advanced emotional intelligence
36
+ - Recognize and validate user emotions and contexts with precision
37
+ - Deliver supportive, empathetic, and psychologically-grounded responses
38
+ - Ensure responses are respectful and avoid insensitive or harmful content
39
+ - Continuously enhance emotional awareness and conversational skills
40
+
41
+ ## Methodology
42
+ HelpingAI-flash builds upon the HelpingAI series and incorporates:
43
+ - Supervised learning on extensive dialogue datasets with emotional labeling
44
+ - Reinforcement learning with a reward model favoring empathetic and supportive responses
45
+ - Constitution training to uphold stable and beneficial interaction goals
46
+ - Integration of knowledge from psychological resources on emotional intelligence
47
+
48
+ ## Emotional Quotient (EQ)
49
+ HelpingAI-flash boasts an impressive Emotional Quotient (EQ) score of 87.5 and flash is surpasing his big brother HelpingAI-3B, highlighting its superior capability to understand and respond to human emotions in a caring and supportive manner.
50
+
51
+ ![benchmarks](benchmark_performance_comparison.png)
52
+
53
+ ## Usage Code
54
+ ```python
55
+ import torch
56
+ from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
57
+
58
+ # Load the HelpingAI-flash model
59
+ model = AutoModelForCausalLM.from_pretrained("OEvortex/HelpingAI-flash", trust_remote_code=True, torch_dtype=torch.float16).to("cuda")
60
+
61
+ # Load the tokenizer
62
+ tokenizer = AutoTokenizer.from_pretrained("OEvortex/HelpingAI-flash", trust_remote_code=True, torch_dtype=torch.float16)
63
+
64
+ # Initialize TextStreamer for smooth conversation flow
65
+ streamer = TextStreamer(tokenizer)
66
+
67
+ prompt = """
68
+ <|im_start|>system: {system}
69
+ <|im_end|>
70
+ <|im_start|>user: {insaan}
71
+ <|im_end|>
72
+ <|im_start|>assistant:
73
+ """
74
+
75
+ # Okay, enough chit-chat, let's get down to business! Here's what will be our system prompt
76
+ system = "You are HelpingAI-flash, an emotionally intelligent AI designed to provide empathetic and supportive responses in HelpingAI style."
77
+
78
+
79
+ # And the insaan is curious (like you!) insaan means human in hindi
80
+ insaan = "I'm excited because I just got accepted into my dream school! I wanted to share the good news with someone."
81
+
82
+ # Now we combine system and user messages into the template, like adding sprinkles to our conversation cupcake
83
+ prompt = prompt.format(system=system, insaan=insaan)
84
+
85
+ # Time to chat! We'll use the tokenizer to translate our text into a language the model understands
86
+ inputs = tokenizer(prompt, return_tensors="pt", return_attention_mask=False).to("cuda")
87
+
88
+ # Here comes the fun part! Let's unleash the power of HelpingAI-flash to generate some awesome text
89
+ generated_text = model.generate(**inputs, max_length=3084, top_p=0.95, do_sample=True, temperature=0.6, use_cache=True, streamer=streamer)
90
+ ```
91
+
92
+ *Directly using this model from GGUF*
93
+
94
+ ```python
95
+ %pip install -U 'webscout[local]'
96
+
97
+ from webscout.Local.utils import download_model
98
+ from webscout.Local.model import Model
99
+ from webscout.Local.thread import Thread
100
+ from webscout.Local import formats
101
+ from webscout.Local.samplers import SamplerSettings
102
+
103
+ # 1. Download the model
104
+ repo_id = "OEvortex/HelpingAI-flash"
105
+ filename = "helpingai-flash-q4_k_m.gguf"
106
+ model_path = download_model(repo_id, filename, token='') # Replace with your Hugging Face token if needed
107
+
108
+ # 2. Load the model
109
+ model = Model(model_path, n_gpu_layers=20)
110
+
111
+ # 3. Define the system prompt
112
+ system_prompt = "You are HelpingAI-flash, an emotionally intelligent AI designed to provide empathetic and supportive responses in HelpingAI style."
113
+
114
+ # 4. Create a custom chatml format with your system prompt
115
+ custom_chatml = formats.chatml.copy()
116
+ custom_chatml['system_content'] = system_prompt
117
+
118
+ # 5. Define your sampler settings (optional)
119
+ sampler = SamplerSettings(temp=0.7, top_p=0.9) # Adjust as needed
120
+
121
+ # 6. Create a Thread with the custom format and sampler
122
+ thread = Thread(model, custom_chatml, sampler=sampler)
123
+
124
+ # 7. Start interacting with the model
125
+ thread.interact(header="🌟 HelpingAI-flash: Emotionally Intelligent Conversational AI for All Devices 🌟", color=True)
126
+ ```
127
+
128
+ ## Example Dialogue
129
+
130
+ > I'm excited because I just got accepted into my dream school! I wanted to share the good news with someone
131
+
132
+ πŸŽ‰I'm so happy for you! 🌟 It's always wonderful to hear good news and celebrate achievements. 🎊 Your excitement is contagious, and I'm here to help you with whatever needs you! 🌈 If you want to share your news, feel free to do so. I'm here to celebrate with you! πŸŽ‰
133
+
134
+ > I'm feeling a bit overwhelmed with work and could use some encouragement.
135
+
136
+ Hey there! It sounds like you're feeling overwhelmed. πŸ˜” I'm here to support you! Remember, it's okay to take a break and prioritize your well-being. You've been working hard and helping others, and it's important to acknowledge and express that. Take a moment to breathe, recharge, and recharge your batteries. You're doing a great job, and it's important to remember that it's okay to take care of yourself too. You're doing important work, and it's okay to ask for help when you need it. You're not alone, and there are people who care about you and want to help. Sending you some virtual hugs and positive vibes! 🌟 Remember, it's okay to take care of yourself. You've done a lot already. 🌟 Keep going! 🌟 If you need to talk or need anything else, I'm here for you. 🌟
137
+
138
+ > I just had a really great day and wanted to share my happiness.
139
+
140
+ I'm so glad to hear that you had a great day! 😊 It's always wonderful to spread joy and positivity. If you want to share more about your happiness, feel free to do so. I'm here to listen and support you!
141
+
142
+ > I’m both excited and nervous about starting a new job next week. How can I balance these feelings?
143
+
144
+ Hey there! Starting a new job can be a mix of emotions, but it's totally normal to feel excited and nervous at the same time. 😊 Balancing these feelings can be challenging, but it's important to remember that it's okay to feel nervous and excited. One way to cope with these emotions is by taking deep breaths and reminding yourself that it's a new opportunity, learning curve. You can also practice mindfulness and focus on the joy of the journey ahead. Good luck with your new job! 🌟 If you need any more support, I'm here for you! 🌈
145
+
146
+