--- license: other license_name: helpingai license_link: LICENSE.md pipeline_tag: text-generation tags: - HelpingAI - Emotionally Intelligent - EQ - flash datasets: - OEvortex/SentimentSynth - OEvortex/EmotionalIntelligence-10K --- # HelpingAI-flash: Emotionally Intelligent Conversational AI for All Devices ![logo](https://huggingface.co./OEvortex/HelpingAI-3B/resolve/main/HelpingAI.png) ## Overview 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. ## Objectives - Facilitate open-ended dialogue with advanced emotional intelligence - Recognize and validate user emotions and contexts with precision - Deliver supportive, empathetic, and psychologically-grounded responses - Ensure responses are respectful and avoid insensitive or harmful content - Continuously enhance emotional awareness and conversational skills ## Methodology HelpingAI-flash builds upon the HelpingAI series and incorporates: - Supervised learning on extensive dialogue datasets with emotional labeling - Reinforcement learning with a reward model favoring empathetic and supportive responses - Constitution training to uphold stable and beneficial interaction goals - Integration of knowledge from psychological resources on emotional intelligence ## Emotional Quotient (EQ) HelpingAI-flash boasts an impressive Emotional Quotient (EQ) score of xx.xx, highlighting its superior capability to understand and respond to human emotions in a caring and supportive manner. ![benchmarks](benchmark_performance_comparison.png) ## Usage Code ```python import torch from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer # Load the HelpingAI-flash model model = AutoModelForCausalLM.from_pretrained("OEvortex/HelpingAI-flash", trust_remote_code=True, torch_dtype=torch.float16).to("cuda") # Load the tokenizer tokenizer = AutoTokenizer.from_pretrained("OEvortex/HelpingAI-flash", trust_remote_code=True, torch_dtype=torch.float16) # Initialize TextStreamer for smooth conversation flow streamer = TextStreamer(tokenizer) prompt = """ <|im_start|>system: {system} <|im_end|> <|im_start|>user: {insaan} <|im_end|> <|im_start|>assistant: """ # Okay, enough chit-chat, let's get down to business! Here's what will be our system prompt system = "You are HelpingAI-flash, an emotionally intelligent AI designed to provide empathetic and supportive responses in HelpingAI style." # And the insaan is curious (like you!) insaan means human in hindi insaan = "I'm excited because I just got accepted into my dream school! I wanted to share the good news with someone." # Now we combine system and user messages into the template, like adding sprinkles to our conversation cupcake prompt = prompt.format(system=system, insaan=insaan) # Time to chat! We'll use the tokenizer to translate our text into a language the model understands inputs = tokenizer(prompt, return_tensors="pt", return_attention_mask=False).to("cuda") # Here comes the fun part! Let's unleash the power of HelpingAI-flash to generate some awesome text generated_text = model.generate(**inputs, max_length=3084, top_p=0.95, do_sample=True, temperature=0.6, use_cache=True, streamer=streamer) ``` *Directly using this model from GGUF* ```python %pip install -U 'webscout[local]' from webscout.Local.utils import download_model from webscout.Local.model import Model from webscout.Local.thread import Thread from webscout.Local import formats from webscout.Local.samplers import SamplerSettings # 1. Download the model repo_id = "OEvortex/HelpingAI-flash" filename = "helpingai-flash-2b.gguf" model_path = download_model(repo_id, filename, token='') # Replace with your Hugging Face token if needed # 2. Load the model model = Model(model_path, n_gpu_layers=20) # 3. Define the system prompt system_prompt = "You are HelpingAI-flash, an emotionally intelligent AI designed to provide empathetic and supportive responses in HelpingAI style." # 4. Create a custom chatml format with your system prompt custom_chatml = formats.chatml.copy() custom_chatml['system_content'] = system_prompt # 5. Define your sampler settings (optional) sampler = SamplerSettings(temp=0.7, top_p=0.9) # Adjust as needed # 6. Create a Thread with the custom format and sampler thread = Thread(model, custom_chatml, sampler=sampler) # 7. Start interacting with the model thread.interact(header="๐ŸŒŸ HelpingAI-flash: Emotionally Intelligent Conversational AI for All Devices ๐ŸŒŸ", color=True) ``` ## Example Dialogue > I'm feeling a bit overwhelmed with work and could use some encouragement. I'm sorry to hear that you're feeling overwhelmed. ๐Ÿ˜” Remember that it's okay to take a break and recharge. Youโ€™ve already accomplished so much, and it's important to recognize your hard work and resilience. Maybe try breaking your tasks into smaller steps and celebrate each small victory. Youโ€™ve got this, and I'm here to support you every step of the way! ๐ŸŒŸ Take it one step at a time, and remember to be kind to yourself. ๐ŸŒˆ > I just had a really great day and wanted to share my happiness. Thatโ€™s fantastic to hear! ๐ŸŽ‰ Iโ€™m so glad you had a great day! Itโ€™s wonderful to celebrate those joyful moments and share your happiness. Keep spreading those positive vibes and cherish the good times. Iโ€™m here to celebrate with you and share in your excitement! ๐ŸŒŸ Keep shining and enjoying every moment of your amazing day! ๐ŸŒˆ > Iโ€™m feeling anxious about an upcoming event. What should I do? Feeling anxious before an event is completely normal. ๐Ÿ˜Š Here are a few tips to help you manage your anxiety: 1. **Prepare in Advance:** Plan and prepare for the event as much as possible. This can help you feel more confident and in control. 2. **Practice Deep Breathing:** Deep breathing exercises can help calm your mind and body. Try taking slow, deep breaths to center yourself. 3. **Focus on the Positive:** Remind yourself of the positive aspects of the event and what youโ€™re looking forward to. 4. **Stay Present:** Try to stay in the present moment and avoid overthinking or dwelling on potential outcomes. 5. **Talk to Someone:** Sharing your feelings with a friend or family member can provide support and reassurance. Remember, itโ€™s okay to feel anxious, but with a few coping strategies, you can navigate through it. Iโ€™m here for you! ๐ŸŒŸ