Option 1: Use Public Model (Recommended for quick start)
The default configuration uses microsoft/DialoGPT-medium which is publicly available and doesn't require authentication.
Option 2: Use Llama 3.2 3B (Requires authentication)
To use the actual Llama 3.2 3B model:
1from brello_ei_0 import BrelloEI0
23# Load the model4model = BrelloEI0(5 model_path="microsoft/DialoGPT-medium",# Public model, no auth required6 load_in_4bit=False# Set to True if you have CUDA7)89# Generate an emotionally intelligent response10response = model.generate_response("I'm feeling really stressed about my job interview.")11print(response)
Alternative Loading
python
1from brello_ei_0 import load_brello_ei_0
23# Load model using convenience function4model = load_brello_ei_0("microsoft/DialoGPT-medium")56# Direct call7response = model("I'm really happy about my recent success!")8print(response)
Chat Interface
python
1# Simple chat2response = model.chat("How are you feeling today?")3print(response)
Example Conversations
python
1# Example 1: Anxiety Support2response = model.generate_response("I'm feeling really anxious about my presentation tomorrow.")3# Output: "I can understand how nerve-wracking presentations can be. It's completely natural to feel anxious..."45# Example 2: Celebrating Success6response = model.generate_response("I just got promoted at work!")7# Output: "That's wonderful! I can feel your excitement and it's absolutely contagious..."89# Example 3: Emotional Support10response = model.generate_response("I'm feeling lonely and isolated.")11# Output: "I'm so sorry you're feeling this way. Loneliness can be really painful..."1213# Example 4: Career Guidance14response = model.generate_response("I'm confused about what I want to do with my life.")15# Output: "That's a really common and natural feeling, especially when we're at crossroads..."
Configuration
Model Parameters
model_path: Path to Llama 3.2 3B model (default: "meta-llama/Meta-Llama-3.2-3B-Instruct")
device: Device to load model on ('cuda', 'cpu', etc.)
load_in_4bit: Enable 4-bit quantization for memory efficiency (recommended)
load_in_8bit: Enable 8-bit quantization for memory efficiency
torch_dtype: Torch data type for model weights
Generation Parameters
temperature: Sampling temperature (default: 0.7)
top_p: Top-p sampling parameter (default: 0.9)
max_length: Maximum response length (default: 4096)
min_length: Minimum response length (default: 30)
max_new_tokens: Maximum new tokens to generate (default: 256)
repetition_penalty: Penalty for repetition (default: 1.1)
Performance
Model Specifications
Foundation: Microsoft DialoGPT-medium
Parameters: 345 Million
Context Length: 1024 tokens
Training: Conversational dialogue data
Optimization: Emotional intelligence focus
Memory Requirements
Full Precision: ~1GB VRAM
8-bit Quantization: ~500MB VRAM
4-bit Quantization: ~250MB VRAM (recommended)
Advanced Usage
Custom Generation Parameters
python
1response = model.generate_response(2"I'm feeling overwhelmed with my responsibilities.",3 temperature=0.8,4 top_p=0.95,5 max_new_tokens=300,6 repetition_penalty=1.057)
Batch Processing
python
1messages =[2"I'm really proud of my accomplishments.",3"I'm feeling uncertain about my future.",4"I'm grateful for my support system."5]67responses =[]8for message in messages:9 response = model.generate_response(message)10 responses.append(response)
🎯 Training
Fine-tune for Emotional Intelligence
python train_brello_ei_0.py
The training script will:
Load Llama 3.2 3B with 4-bit quantization
Apply LoRA for efficient fine-tuning
Train on emotional intelligence data
Save the fine-tuned model
Training Data
The model is fine-tuned on emotional intelligence scenarios:
Anxiety and stress support
Celebrating success and achievements
Dealing with loneliness and isolation
Career guidance and life decisions
Gratitude and appreciation
Overwhelm and responsibility management
Architecture
Brello EI 0 is built on advanced language model architecture with the following key components: