RehanKingggg commited on
Commit
9f89337
ยท
verified ยท
1 Parent(s): 6a68b5c

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +238 -3
README.md CHANGED
@@ -1,3 +1,238 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Brello EI 0 - Emotional Intelligence AI Model
2
+
3
+ **Created by Epic Systems | Engineered by Rehan Temkar**
4
+
5
+ A locally-run emotional intelligence AI model designed to provide empathetic, emotionally-aware responses with natural conversation flow.
6
+
7
+ ## ๐Ÿš€ Features
8
+
9
+ - **Emotional Intelligence**: Designed to provide empathetic, understanding responses
10
+ - **Local Operation**: Runs completely locally without external dependencies
11
+ - **Memory Efficient**: 4-bit quantization for optimal performance on limited hardware
12
+ - **Advanced Architecture**: Based on Llama 3.2 3B foundation model
13
+ - **Easy Integration**: Simple API for quick integration
14
+ - **Flexible Configuration**: Customizable generation parameters
15
+
16
+ ## ๐Ÿ“ฆ Installation
17
+
18
+ ### Prerequisites
19
+
20
+ - Python 3.8+
21
+ - CUDA-compatible GPU (recommended) or CPU
22
+ - At least 8GB RAM (16GB recommended)
23
+
24
+ ### Install Dependencies
25
+
26
+ ```bash
27
+ pip install -r requirements.txt
28
+ ```
29
+
30
+ ### Model Options
31
+
32
+ **Option 1: Use Public Model (Recommended for quick start)**
33
+ The default configuration uses `microsoft/DialoGPT-medium` which is publicly available and doesn't require authentication.
34
+
35
+ **Option 2: Use Llama 3.2 3B (Requires authentication)**
36
+ To use the actual Llama 3.2 3B model:
37
+ 1. Create a Hugging Face account
38
+ 2. Accept the model license at: https://huggingface.co/meta-llama/Llama-3.2-3B-Instruct
39
+ 3. Login with: `huggingface-cli login` or `hf auth login`
40
+ 4. Update the model_path in your code to: `"meta-llama/Llama-3.2-3B-Instruct"`
41
+
42
+ **Option 3: Use Other Public Models**
43
+ - `microsoft/DialoGPT-large` (larger, better responses)
44
+ - `microsoft/DialoGPT-small` (faster, smaller)
45
+ - `HuggingFaceTB/SmolLM3-3B` (3B parameter model)
46
+
47
+ ## ๐ŸŽฏ Quick Start
48
+
49
+ ### Basic Usage
50
+
51
+ ```python
52
+ from brello_ei_0 import BrelloEI0
53
+
54
+ # Load the model
55
+ model = BrelloEI0(
56
+ model_path="microsoft/DialoGPT-medium", # Public model, no auth required
57
+ load_in_4bit=False # Set to True if you have CUDA
58
+ )
59
+
60
+ # Generate an emotionally intelligent response
61
+ response = model.generate_response("I'm feeling really stressed about my job interview.")
62
+ print(response)
63
+ ```
64
+
65
+ ### Alternative Loading
66
+
67
+ ```python
68
+ from brello_ei_0 import load_brello_ei_0
69
+
70
+ # Load model using convenience function
71
+ model = load_brello_ei_0("microsoft/DialoGPT-medium")
72
+
73
+ # Direct call
74
+ response = model("I'm really happy about my recent success!")
75
+ print(response)
76
+ ```
77
+
78
+ ### Chat Interface
79
+
80
+ ```python
81
+ # Simple chat
82
+ response = model.chat("How are you feeling today?")
83
+ print(response)
84
+ ```
85
+
86
+ ## ๐ŸŽฎ Example Conversations
87
+
88
+ ```python
89
+ # Example 1: Anxiety Support
90
+ response = model.generate_response("I'm feeling really anxious about my presentation tomorrow.")
91
+ # Output: "I can understand how nerve-wracking presentations can be. It's completely natural to feel anxious..."
92
+
93
+ # Example 2: Celebrating Success
94
+ response = model.generate_response("I just got promoted at work!")
95
+ # Output: "That's wonderful! I can feel your excitement and it's absolutely contagious..."
96
+
97
+ # Example 3: Emotional Support
98
+ response = model.generate_response("I'm feeling lonely and isolated.")
99
+ # Output: "I'm so sorry you're feeling this way. Loneliness can be really painful..."
100
+
101
+ # Example 4: Career Guidance
102
+ response = model.generate_response("I'm confused about what I want to do with my life.")
103
+ # Output: "That's a really common and natural feeling, especially when we're at crossroads..."
104
+ ```
105
+
106
+ ## โš™๏ธ Configuration
107
+
108
+ ### Model Parameters
109
+
110
+ - `model_path`: Path to Llama 3.2 3B model (default: "meta-llama/Meta-Llama-3.2-3B-Instruct")
111
+ - `device`: Device to load model on ('cuda', 'cpu', etc.)
112
+ - `load_in_4bit`: Enable 4-bit quantization for memory efficiency (recommended)
113
+ - `load_in_8bit`: Enable 8-bit quantization for memory efficiency
114
+ - `torch_dtype`: Torch data type for model weights
115
+
116
+ ### Generation Parameters
117
+
118
+ - `temperature`: Sampling temperature (default: 0.7)
119
+ - `top_p`: Top-p sampling parameter (default: 0.9)
120
+ - `max_length`: Maximum response length (default: 4096)
121
+ - `min_length`: Minimum response length (default: 30)
122
+ - `max_new_tokens`: Maximum new tokens to generate (default: 256)
123
+ - `repetition_penalty`: Penalty for repetition (default: 1.1)
124
+
125
+ ## ๐Ÿ“Š Performance
126
+
127
+ ### Model Specifications
128
+
129
+ - **Foundation**: Microsoft DialoGPT-medium
130
+ - **Parameters**: 345 Million
131
+ - **Context Length**: 1024 tokens
132
+ - **Training**: Conversational dialogue data
133
+ - **Optimization**: Emotional intelligence focus
134
+
135
+ ### Memory Requirements
136
+
137
+ - **Full Precision**: ~1GB VRAM
138
+ - **8-bit Quantization**: ~500MB VRAM
139
+ - **4-bit Quantization**: ~250MB VRAM (recommended)
140
+
141
+ ## ๐Ÿ”ง Advanced Usage
142
+
143
+ ### Custom Generation Parameters
144
+
145
+ ```python
146
+ response = model.generate_response(
147
+ "I'm feeling overwhelmed with my responsibilities.",
148
+ temperature=0.8,
149
+ top_p=0.95,
150
+ max_new_tokens=300,
151
+ repetition_penalty=1.05
152
+ )
153
+ ```
154
+
155
+ ### Batch Processing
156
+
157
+ ```python
158
+ messages = [
159
+ "I'm really proud of my accomplishments.",
160
+ "I'm feeling uncertain about my future.",
161
+ "I'm grateful for my support system."
162
+ ]
163
+
164
+ responses = []
165
+ for message in messages:
166
+ response = model.generate_response(message)
167
+ responses.append(response)
168
+ ```
169
+
170
+ ## ๐ŸŽฏ Training
171
+
172
+ ### Fine-tune for Emotional Intelligence
173
+
174
+ ```bash
175
+ python train_brello_ei_0.py
176
+ ```
177
+
178
+ The training script will:
179
+ - Load Llama 3.2 3B with 4-bit quantization
180
+ - Apply LoRA for efficient fine-tuning
181
+ - Train on emotional intelligence data
182
+ - Save the fine-tuned model
183
+
184
+ ### Training Data
185
+
186
+ The model is fine-tuned on emotional intelligence scenarios:
187
+ - Anxiety and stress support
188
+ - Celebrating success and achievements
189
+ - Dealing with loneliness and isolation
190
+ - Career guidance and life decisions
191
+ - Gratitude and appreciation
192
+ - Overwhelm and responsibility management
193
+
194
+ ## ๐Ÿ—๏ธ Architecture
195
+
196
+ Brello EI 0 is built on advanced language model architecture with the following key components:
197
+
198
+ - **Base Model**: Microsoft DialoGPT-medium
199
+ - **Tokenizer**: Optimized for conversational data
200
+ - **Generation**: Emotionally intelligent response patterns
201
+ - **Post-processing**: Response cleaning and enhancement
202
+ - **Quantization**: 4-bit for memory efficiency (optional)
203
+
204
+ ## ๐ŸŽฏ Use Cases
205
+
206
+ ### Emotional Support
207
+ - Providing empathetic responses to stress and anxiety
208
+ - Supporting users through difficult life transitions
209
+ - Celebrating achievements and successes
210
+
211
+ ### Personal Development
212
+ - Career guidance and decision-making support
213
+ - Life goal exploration and planning
214
+ - Self-reflection and emotional awareness
215
+
216
+ ### Mental Health Support
217
+ - Stress management and coping strategies
218
+ - Emotional validation and understanding
219
+ - Positive reinforcement and encouragement
220
+
221
+ ## ๐Ÿค Contributing
222
+
223
+ This model is part of the Epic Systems AI initiative. For questions or contributions, please contact the development team.
224
+
225
+ ## ๐Ÿ“„ License
226
+
227
+ This project is licensed under the MIT License - see the LICENSE file for details.
228
+
229
+ ## ๐Ÿ™ Acknowledgments
230
+
231
+ - **Epic Systems** for the vision and support
232
+ - **Rehan Temkar** for engineering and development
233
+ - **Microsoft** for the DialoGPT foundation model
234
+ - **Hugging Face** for the transformers library
235
+
236
+ ---
237
+
238
+ **Brello EI 0** - Bringing emotional intelligence to AI conversations ๐Ÿ’™โœจ