RichardErkhov commited on
Commit
d1a119a
·
verified ·
1 Parent(s): eacbd43

uploaded readme

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