lzw1008 commited on
Commit
ab81035
1 Parent(s): 3830317

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +109 -0
README.md CHANGED
@@ -1,3 +1,112 @@
1
  ---
2
  license: mit
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
+ language:
4
+ - en
5
  ---
6
+
7
+ # Introduction
8
+
9
+ Emollama-chat-7b is part of the [EmoLLMs](https://github.com/lzw108/EmoLLMs) project, the first open-source large language model (LLM) series for
10
+ comprehensive affective analysis with instruction-following capability. This model is finetuned based on the Meta LLaMA2-chat-7B foundation model and the full AAID instruction tuning data.
11
+ The model can be used for affective classification tasks (e.g. sentimental polarity
12
+ or categorical emotions), and regression tasks (e.g. sentiment strength or emotion intensity).
13
+
14
+ # Ethical Consideration
15
+
16
+ Recent studies have indicated LLMs may introduce some potential
17
+ bias, such as gender gaps. Meanwhile, some incorrect prediction results, and over-generalization
18
+ also illustrate the potential risks of current LLMs. Therefore, there
19
+ are still many challenges in applying the model to real-scenario
20
+ affective analysis systems.
21
+
22
+ ## Models in EmoLLMs
23
+
24
+ There are a series of EmoLLMs, including Emollama-7b, Emollama-chat-7b, Emollama-chat-13b, Emoopt-13b, Emobloom-7b, Emot5-large, Emobart-large.
25
+
26
+ - **Emollama-7b**: This model is finetuned based on the LLaMA2-7B.
27
+ - **Emollama-chat-7b**: This model is finetuned based on the LLaMA2-chat-7B.
28
+ - **Emollama-chat-13b**: This model is finetuned based on the LLaMA2-chat-13B.
29
+ - **Emoopt-13b**: This model is finetuned based on the OPT-13B.
30
+ - **Emobloom-7b**: This model is finetuned based on the Bloomz-7b1-mt.
31
+ - **Emot5-large**: This model is finetuned based on the T5-large.
32
+ - **Emobart-large**: This model is finetuned based on the bart-large.
33
+
34
+ All models are trained on the full AAID instruction tuning data.
35
+
36
+
37
+
38
+ ## Usage
39
+
40
+ You can use the Emollama-chat-7b model in your Python project with the Hugging Face Transformers library. Here is a simple example of how to load the model:
41
+
42
+ ```python
43
+ from transformers import LlamaTokenizer, LlamaForCausalLM
44
+ tokenizer = LlamaTokenizer.from_pretrained('lzw1008/Emollama-chat-7b')
45
+ model = LlamaForCausalLM.from_pretrained('lzw1008/Emollama-chat-7b', device_map='auto')
46
+ ```
47
+
48
+ In this example, LlamaTokenizer is used to load the tokenizer, and LlamaForCausalLM is used to load the model. The `device_map='auto'` argument is used to automatically
49
+ use the GPU if it's available.
50
+
51
+ ## Prompt examples
52
+
53
+
54
+ ### Emotion intensity
55
+
56
+ Human:
57
+ Task: Assign a numerical value between 0 (least E) and 1 (most E) to represent the intensity of emotion E expressed in the text.
58
+ Text: @CScheiwiller can't stop smiling 😆😆😆
59
+ Emotion: joy
60
+ Intensity Score:
61
+
62
+ Assistant:
63
+ >>0.896
64
+
65
+ ### Sentiment strength
66
+
67
+ Human:
68
+ Task: Evaluate the valence intensity of the writer's mental state based on the text, assigning it a real-valued score from 0 (most negative) to 1 (most positive).
69
+ Text: Happy Birthday shorty. Stay fine stay breezy stay wavy @daviistuart 😘
70
+ Intensity Score:
71
+
72
+ Assistant:
73
+ >>0.879
74
+
75
+ ### Sentiment classification
76
+
77
+ Human:
78
+ Task: Categorize the text into an ordinal class that best characterizes the writer's mental state, considering various degrees of positive and negative sentiment intensity. 3: very positive mental state can be inferred. 2: moderately positive mental state can be inferred. 1: slightly positive mental state can be inferred. 0: neutral or mixed mental state can be inferred. -1: slightly negative mental state can be inferred. -2: moderately negative mental state can be inferred. -3: very negative mental state can be inferred
79
+ Tweet: Beyoncé resentment gets me in my feelings every time. 😩
80
+ Intensity Class:
81
+
82
+ Assistant:
83
+ >>-3: very negative emotional state can be inferred
84
+
85
+ ### Emotion classification
86
+
87
+ Human:
88
+ Task: Categorize the text's emotional tone as either 'neutral or no emotion' or identify the presence of one or more of the given emotions (anger, anticipation, disgust, fear, joy, love, optimism, pessimism, sadness, surprise, trust).
89
+ Text: Whatever you decide to do make sure it makes you #happy.
90
+ This tweet contains emotions:
91
+
92
+ Assistant:
93
+ >>joy, love, optimism
94
+
95
+ The task description can be adjusted according to the specific task.
96
+
97
+ ## License
98
+
99
+ EmoLLMs series are licensed under MIT. For more details, please see the MIT file.
100
+
101
+ ## Citation
102
+
103
+ If you use the series of EmoLLMs in your work, please cite the our paper:
104
+
105
+ ```bibtex
106
+ @article{liu2024emollms,
107
+ title={EmoLLMs: A Series of Emotional Large Language Models and Annotation Tools for Comprehensive Affective Analysis},
108
+ author={Liu, Zhiwei and Yang, Kailai and Zhang, Tianlin and Xie, Qianqian and Yu, Zeping and Ananiadou, Sophia},
109
+ journal={arXiv preprint arXiv:2401.08508},
110
+ year={2024}
111
+ }
112
+ ```