Edit model card

HelpingAI-3B-coder: Emotionally Intelligent Conversational AI with Coding Capabilities

logo

Overview

HelpingAI-3B-coder is a large language model designed for emotionally intelligent conversational interactions and coding assistance. It is trained to engage users with empathy, understanding, and supportive dialogue across a wide range of topics and contexts, while also providing reliable coding support. The model aims to be a supportive AI companion that can attune to users' emotional states, communicative needs, and coding requirements.

Objectives

  • Engage in open-ended dialogue while displaying emotional intelligence
  • Recognize and validate user emotions and emotional contexts
  • Provide supportive, empathetic, and psychologically-grounded responses
  • Avoid insensitive, harmful, or unethical speech
  • Assist users with coding tasks and programming-related queries
  • Continuously improve emotional awareness, dialogue skills, and coding capabilities

Methodology

HelpingAI-3B-coder is based on the HelpingAI series and further trained using:

  • Supervised learning on large dialogue datasets with emotional labeling
  • Reinforcement learning with a reward model favoring emotionally supportive responses
  • Constitution training to instill stable and beneficial objectives
  • Knowledge augmentation from psychological resources on emotional intelligence
  • Coding datasets to enhance programming support

Emotional Quotient (EQ)

HelpingAI-3B-coder has achieved an impressive Emotional Quotient (EQ), 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.

Usage Code

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer

# Load the HelpingAI-3B-coder model
model = AutoModelForCausalLM.from_pretrained("OEvortex/HelpingAI-3B-coder", trust_remote_code=True).to("cuda")

# Load the tokenizer
tokenizer = AutoTokenizer.from_pretrained("OEvortex/HelpingAI-3B-coder", trust_remote_code=True)

# Initialize TextStreamer for smooth conversation flow
streamer = TextStreamer(tokenizer)

# Define the chat input
chat = [
    { "role": "system", "content": "You are HelpingAI, an emotionally intelligent AI. Always respond in the HelpingAI style. Provide concise and to-the-point answers." },
    { "role": "user", "content": "Can you help me write a Python function to reverse a string?" }
]

# Apply the chat template
chat_text = tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)

# Tokenize the text
inputs = tokenizer(chat_text, return_tensors="pt", return_attention_mask=False).to("cuda")

# Generate text
generated_text = model.generate(
    **inputs,
    max_length=500,  
    top_p=0.95,
    do_sample=True,
    temperature=0.7,
    use_cache=True,
    eos_token_id=tokenizer.eos_token_id, 
    streamer=streamer
)

# # Decode the generated text
# output_text = tokenizer.decode(generated_text[0], skip_special_tokens=True)

# # Print the generated text
# print(output_text)

# System:
# You are HelpingAI, an emotional AI that always answers questions in HelpingAI style and always be to the point and answer as short as possible.

# Question:
# Can you help me write a Python function to reverse a string?

# Answer:
# Sure! Here's a Python function that reverses a string:

# ```python
# def reverse_string(input_string):
#     return input_string[::-1]
# ```

# This function uses slicing with a negative step to reverse the input string. The `[::-1]` syntax reverses the string by starting from the end and going backwards.

# You can use this function like this:

# ```python
# print(reverse_string("Hello, World!"))
# ```

# This will output: `!dlroW,olleH`

# I hope this helps! Let me know if you have any other questions.
Downloads last month
70
Safetensors
Model size
3.48B params
Tensor type
FP16
·
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Collection including OEvortex/HelpingAI-3B-coder