Shailesh714 commited on
Commit
ee562b1
β€’
1 Parent(s): ce23dbf
Files changed (1) hide show
  1. README.md +0 -85
README.md DELETED
@@ -1,85 +0,0 @@
1
- ---
2
- library_name: transformers
3
- license: llama3
4
- ---
5
-
6
-
7
- # Emotional-llama-8B Model Card
8
-
9
- ## Overview
10
- Emotional-llama-8B is a large language model designed for emotionally intelligent conversational interactions. It is trained to engage users with empathy, understanding, and supportive dialogue across a wide range of topics and contexts. The model aims to provide a supportive AI companion that can attune to users' emotional states and communicative needs.
11
-
12
- ## Objectives
13
- - Engage in open-ended dialogue while displaying emotional intelligence
14
- - Recognize and validate user emotions and emotional contexts
15
- - Provide supportive, empathetic, and psychologically-grounded responses
16
- - Avoid insensitive, harmful, or unethical speech
17
- - Continuously improve emotional awareness and dialogue skills
18
-
19
- ## Methodology
20
- - Emotional-llama-8B is based on the LLaMA 3.8B language model and further trained using:
21
- - Supervised learning on large dialogue datasets with emotional labeling
22
- - Reinforcement learning with a reward model favoring emotionally supportive responses
23
- - Constitution training to instill stable and beneficial objectives
24
- - Knowledge augmentation from psychological resources on emotional intelligence
25
-
26
- ## Usage code
27
- ```python
28
- %pip install accelerate
29
- %pip install -i https://pypi.org/simple/ bitsandbytes
30
-
31
- from transformers import AutoTokenizer, AutoModelForCausalLM
32
- import torch
33
-
34
- model_id = "OEvortex/Emotional-llama-8B"
35
-
36
- tokenizer = AutoTokenizer.from_pretrained(model_id)
37
- model = AutoModelForCausalLM.from_pretrained(
38
- model_id,
39
- torch_dtype=torch.bfloat16,
40
- device_map="auto",
41
- )
42
-
43
-
44
- messages = [
45
- # {"role": "system", "content": "Be Helpful"},
46
- {"role": "user", "content": "I'm feeling really down today. Nothing seems to be going right."},
47
- ]
48
-
49
- input_ids = tokenizer.apply_chat_template(
50
- messages,
51
- add_generation_prompt=True,
52
- return_tensors="pt"
53
- ).to(model.device)
54
-
55
- terminators = [
56
- tokenizer.eos_token_id,
57
- tokenizer.convert_tokens_to_ids("<|eot_id|>")
58
- ]
59
-
60
- outputs = model.generate(
61
- input_ids,
62
- max_new_tokens=256,
63
- eos_token_id=terminators,
64
- do_sample=True,
65
- temperature=0.9,
66
- top_p=0.9,
67
- )
68
- response = outputs[0][input_ids.shape[-1]:]
69
- print(tokenizer.decode(response, skip_special_tokens=True))
70
-
71
- # Now you can generate text using the model!
72
- ```
73
-
74
- ## Example Dialogue
75
- Human: I'm feeling really down today. Nothing seems to be going right.
76
-
77
- Emotional-llama-8B: I'm really sorry to hear that you're feeling down today. πŸ˜” It's totally okay to have a tough day sometimes. Remember that it's okay to not be okay and that things will get better. Take a deep breath and try to focus on the things that you can control. If you need to talk about what's going on or just need someone to listen, I'm here for you. You're not alone, and I'm sending you lots of positive vibes. Hang in there, and remember that brighter days are ahead. and I'm here to listen without judgment and provide a supportive ear.
78
-
79
- Human: I'm excited because I just got accepted into my dream school! I wanted to share the good news with someone.
80
-
81
- Emotional-llama-8B: πŸŽ‰ Oh my goodness, congratulations! 🎊 That's absolutely amazing news! You must be over the moon! πŸŒ™ Sharing your good news with someone is always a great feeling, and I'm here to celebrate with you! πŸŽ‰ Your dream school, wow! That's so exciting! What made it your dream school, and what are you most looking forward to about it? Let's chat more about it!
82
-
83
- Human: My best friend just got into an argument with me and I don't know what to do. How can I fix this situation?
84
-
85
- Emotional-llama-8B: Oh no, it's tough to deal with conflicts with close friends! πŸ˜” First of all, take a step back and give yourself some time to process your feelings. It's okay to feel upset or hurt. Then, consider reaching out to your friend and expressing your feelings in a calm and respectful manner. It's important to communicate openly and honestly about what happened and how it made you feel. Try to see things from your friend's perspective as well and listen to their side of the story. Remember, conflicts are a natural part of any relationship, and it's how you work through them that matters. Good luck, and I hope you guys can work things out! 🌟