🚀 Emobloom-7b
Emobloom-7bは、EmoLLMsプロジェクトの一部です。これは、命令追従能力を備えた包括的な感情分析用の最初のオープンソース大規模言語モデル(LLM)シリーズです。このモデルは、bloomz-7b1-mt基礎モデルと完全なAAID命令微調整データに基づいて微調整されています。このモデルは、感情分類タスク(例:感情極性やカテゴリ別感情)や回帰タスク(例:感情強度や感情の激しさ)に使用できます。
🚀 クイックスタート
Emobloom-7bは、包括的な感情分析用の最初のオープンソース大規模言語モデル(LLM)シリーズです。このモデルは、bloomz-7b1-mt基礎モデルと完全なAAID命令微調整データに基づいて微調整されています。
✨ 主な機能
Emobloom-7bモデルは、感情分類タスク(例:感情極性やカテゴリ別感情)や回帰タスク(例:感情強度や感情の激しさ)に使用できます。
🔧 技術詳細
最近の研究では、LLMが性別格差などの潜在的なバイアスを引き起こす可能性があることが示されています。同時に、いくつかの誤った予測結果や過剰一般化も、現在のLLMの潜在的なリスクを示しています。したがって、このモデルを実際のシナリオの感情分析システムに適用するには、まだ多くの課題があります。
EmoLLMsのモデル
EmoLLMsには、Emollama-7b、Emollama-chat-7b、Emollama-chat-13b、Emoopt-13b、Emobloom-7b、Emot5-large、Emobart-largeなどの一連のモデルがあります。
- Emollama-7b:このモデルは、LLaMA2-7Bに基づいて微調整されています。
- Emollama-chat-7b:このモデルは、LLaMA2-chat-7Bに基づいて微調整されています。
- Emollama-chat-13b:このモデルは、LLaMA2-chat-13Bに基づいて微調整されています。
- Emoopt-13b:このモデルは、OPT-13Bに基づいて微調整されています。
- Emobloom-7b:このモデルは、Bloomz-7b1-mtに基づいて微調整されています。
- Emot5-large:このモデルは、T5-largeに基づいて微調整されています。
- Emobart-large:このモデルは、bart-largeに基づいて微調整されています。
すべてのモデルは、完全なAAID命令微調整データで学習されています。
💻 使用例
基本的な使用法
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained('lzw1008/Emobloom-7b')
model = AutoModelForCausalLM.from_pretrained('lzw1008/Emobloom-7b', device_map='auto')
この例では、AutoTokenizerを使用してトークナイザーをロードし、AutoModelForCausalLMを使用してモデルをロードしています。device_map='auto'
引数は、GPUが利用可能な場合に自動的にGPUを使用するために使用されます。
高度な使用法
以下は、Emobloom-7bを使用した具体的なタスクの例です。
感情強度
Human:
Task: Assign a numerical value between 0 (least E) and 1 (most E) to represent the intensity of emotion E expressed in the text.
Text: @CScheiwiller can't stop smiling 😆😆😆
Emotion: joy
Intensity Score:
Assistant:
>>0.896
感情強度(極性)
Human:
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).
Text: Happy Birthday shorty. Stay fine stay breezy stay wavy @daviistuart 😘
Intensity Score:
Assistant:
>>0.879
感情分類(極性)
Human:
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
Text: Beyoncé resentment gets me in my feelings every time. 😩
Intensity Class:
Assistant:
>>-3: very negative emotional state can be inferred
感情分類(カテゴリ)
Human:
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).
Text: Whatever you decide to do make sure it makes you #happy.
This text contains emotions:
Assistant:
>>joy, love, optimism
タスクの説明は、具体的なタスクに応じて調整できます。
📄 ライセンス
EmoLLMsシリーズは、MITライセンスの下で提供されています。詳細については、MITファイルを参照してください。
引用
もしあなたの研究でEmoLLMsシリーズを使用する場合は、以下の論文を引用してください。
@article{liu2024emollms,
title={EmoLLMs: A Series of Emotional Large Language Models and Annotation Tools for Comprehensive Affective Analysis},
author={Liu, Zhiwei and Yang, Kailai and Zhang, Tianlin and Xie, Qianqian and Yu, Zeping and Ananiadou, Sophia},
journal={arXiv preprint arXiv:2401.08508},
year={2024}
}