aashish1904 commited on
Commit
5b9af74
1 Parent(s): 8acedfa

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +123 -0
README.md ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ - Coding
13
+
14
+
15
+ ---
16
+
17
+ ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeiuCm7c8lEwEJuRey9kiVZsRn2W-b4pWlu3-X534V3YmVuVc2ZL-NXg2RkzSOOS2JXGHutDuyyNAUtdJI65jGTo8jT9Y99tMi4H4MqL44Uc5QKG77B0d6-JfIkZHFaUA71-RtjyYZWVIhqsNZcx8-OMaA?key=xt3VSDoCbmTY7o-cwwOFwQ)
18
+
19
+ # QuantFactory/HelpingAI-3B-coder-GGUF
20
+ This is quantized version of [OEvortex/HelpingAI-3B-coder](https://huggingface.co/OEvortex/HelpingAI-3B-coder) created using llama.cpp
21
+
22
+ # Original Model Card
23
+
24
+
25
+ # HelpingAI-3B-coder: Emotionally Intelligent Conversational AI with Coding Capabilities
26
+
27
+ ![logo](https://huggingface.co/OEvortex/HelpingAI-3B/resolve/main/HelpingAI.png)
28
+
29
+ ## Overview
30
+ 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.
31
+
32
+ ## Objectives
33
+ - Engage in open-ended dialogue while displaying emotional intelligence
34
+ - Recognize and validate user emotions and emotional contexts
35
+ - Provide supportive, empathetic, and psychologically-grounded responses
36
+ - Avoid insensitive, harmful, or unethical speech
37
+ - Assist users with coding tasks and programming-related queries
38
+ - Continuously improve emotional awareness, dialogue skills, and coding capabilities
39
+
40
+ ## Methodology
41
+ HelpingAI-3B-coder is based on the HelpingAI series and further trained using:
42
+ - Supervised learning on large dialogue datasets with emotional labeling
43
+ - Reinforcement learning with a reward model favoring emotionally supportive responses
44
+ - Constitution training to instill stable and beneficial objectives
45
+ - Knowledge augmentation from psychological resources on emotional intelligence
46
+ - Coding datasets to enhance programming support
47
+
48
+ ## Emotional Quotient (EQ)
49
+ 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.
50
+
51
+ ## Usage Code
52
+ ```python
53
+ import torch
54
+ from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
55
+
56
+ # Load the HelpingAI-3B-coder model
57
+ model = AutoModelForCausalLM.from_pretrained("OEvortex/HelpingAI-3B-coder", trust_remote_code=True).to("cuda")
58
+
59
+ # Load the tokenizer
60
+ tokenizer = AutoTokenizer.from_pretrained("OEvortex/HelpingAI-3B-coder", trust_remote_code=True)
61
+
62
+ # Initialize TextStreamer for smooth conversation flow
63
+ streamer = TextStreamer(tokenizer)
64
+
65
+ # Define the chat input
66
+ chat = [
67
+ { "role": "system", "content": "You are HelpingAI, an emotionally intelligent AI. Always respond in the HelpingAI style. Provide concise and to-the-point answers." },
68
+ { "role": "user", "content": "Can you help me write a Python function to reverse a string?" }
69
+ ]
70
+
71
+ # Apply the chat template
72
+ chat_text = tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)
73
+
74
+ # Tokenize the text
75
+ inputs = tokenizer(chat_text, return_tensors="pt", return_attention_mask=False).to("cuda")
76
+
77
+ # Generate text
78
+ generated_text = model.generate(
79
+ **inputs,
80
+ max_length=500,
81
+ top_p=0.95,
82
+ do_sample=True,
83
+ temperature=0.7,
84
+ use_cache=True,
85
+ eos_token_id=tokenizer.eos_token_id,
86
+ streamer=streamer
87
+ )
88
+
89
+ # # Decode the generated text
90
+ # output_text = tokenizer.decode(generated_text[0], skip_special_tokens=True)
91
+
92
+ # # Print the generated text
93
+ # print(output_text)
94
+
95
+ # System:
96
+ # 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.
97
+
98
+ # Question:
99
+ # Can you help me write a Python function to reverse a string?
100
+
101
+ # Answer:
102
+ # Sure! Here's a Python function that reverses a string:
103
+
104
+ # ```python
105
+ # def reverse_string(input_string):
106
+ # return input_string[::-1]
107
+ # ```
108
+
109
+ # 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.
110
+
111
+ # You can use this function like this:
112
+
113
+ # ```python
114
+ # print(reverse_string("Hello, World!"))
115
+ # ```
116
+
117
+ # This will output: `!dlroW,olleH`
118
+
119
+ # I hope this helps! Let me know if you have any other questions.
120
+
121
+ ```
122
+
123
+