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
QuantFactory/HelpingAI-flash-GGUF
This is quantized version of OEvortex/HelpingAI-flash created using llama.cpp
Original Model Card
HelpingAI-flash: Emotionally Intelligent Conversational AI for All Devices
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 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.
Usage Code
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
%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-q4_k_m.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 excited because I just got accepted into my dream school! I wanted to share the good news with someone
π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! π
I'm feeling a bit overwhelmed with work and could use some encouragement.
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. π
I just had a really great day and wanted to share my happiness.
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!
Iβm both excited and nervous about starting a new job next week. How can I balance these feelings?
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! π