Convosensegenerator
C
Convosensegenerator
sefinchによって開発
ConvoSenseGeneratorは生成モデルであり、対話コンテキストに対して10種類の一般的な社会的常識推論を生成できます。
ダウンロード数 32
リリース時間 : 1/24/2024
モデル概要
このモデルはT5-3bアーキテクチャに基づいており、対話履歴に対して感情的反応、動機、原因、後続イベントなど多様な種類の高品質な常識推論を生成できます。
モデル特徴
多種類常識推論
感情的反応、動機、原因分析など10種類の異なる常識推論をサポート
高品質生成
生成された推論は人間評価において高い合理性、新規情報率、詳細度を有すると評価されています
多様化生成
ビームサーチと多様性ペナルティパラメータにより多様な出力をサポート
モデル能力
対話コンテキスト理解
常識推論生成
多種類推論出力
多様化結果生成
使用事例
対話システム強化
チャットボット常識強化
チャットボットに常識推論能力を追加し、より合理的な回答を可能にする
対話の自然さと合理性の向上
社会的分析
対話感情分析
対話に含まれる感情と動機を分析
対話参加者の心理状態をより深く理解
🚀 ConvoSenseGeneratorモデルカード
ConvoSenseGeneratorは、対話コンテキストに対する常識的推論を生成する生成モデルです。感情反応、動機、原因、後続の出来事など、10種類の一般的な社会的常識タイプをカバーしています!
このモデルは、ChatGPT3.5を使用して合成的に収集された大規模データセットConvoSenseで学習されています。
ConvoSenseGeneratorが生成する推論は、人間が判断すると、対応する対話コンテキストに対して高い合理性、高い新規情報率、高い詳細度を達成しており、以前の人間が書いたデータセットで学習されたモデルを上回っています。
📚 詳細ドキュメント
- リポジトリ: コード
- 論文: ConvoSense: Overcoming Monotonous Commonsense Inferences for Conversational AI
- 担当者: Sarah E. Finch
🔧 技術詳細
ConvoSenseGeneratorは、最近のデータセットConvoSenseで学習されています。 ConvoSenseGeneratorのバックボーンモデルはT5-3bです。
💻 使用例
基本的な使用法
ConvoSenseGeneratorは、以下の常識タイプを、提供された質問を使用してカバーしています。
commonsense_questions = {
"cause": 'What could have caused the last thing said to happen?',
"prerequisities": 'What prerequisites are required for the last thing said to occur?',
"motivation": 'What is an emotion or human drive that motivates Speaker based on what they just said?',
"subsequent": 'What might happen after what Speaker just said?',
"desire": 'What does Speaker want to do next?',
"desire_o": 'What will Listener want to do next based on what Speaker just said?',
"react": 'How is Speaker feeling after what they just said?',
"react_o": 'How does Listener feel because of what Speaker just said?',
"attribute": 'What is a likely characteristic of Speaker based on what they just said?',
"constituents": 'What is a breakdown of the last thing said into a series of required subevents?'
}
論文中の実験によると、ConvoSenseGeneratorの最良のパフォーマンスを発揮する設定は、以下の生成ハイパーパラメータを使用します。
generation_config = {
"repetition_penalty": 1.0,
"num_beams": 10,
"num_beam_groups": 10,
"diversity_penalty": 0.5
}
以下は、ConvoSenseGeneratorを実行するための簡単なコードスニペットです。
import torch
from transformers import AutoTokenizer, T5ForConditionalGeneration
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
tokenizer = AutoTokenizer.from_pretrained("sefinch/ConvoSenseGenerator")
model = T5ForConditionalGeneration.from_pretrained("sefinch/ConvoSenseGenerator").to(device)
# ConvoSenseGenerator covers these commonsense types, using the provided questions
commonsense_questions = {
"cause": 'What could have caused the last thing said to happen?',
"prerequisities": 'What prerequisites are required for the last thing said to occur?',
"motivation": 'What is an emotion or human drive that motivates Speaker based on what they just said?',
"subsequent": 'What might happen after what Speaker just said?',
"desire": 'What does Speaker want to do next?',
"desire_o": 'What will Listener want to do next based on what Speaker just said?',
"react": 'How is Speaker feeling after what they just said?',
"react_o": 'How does Listener feel because of what Speaker just said?',
"attribute": 'What is a likely characteristic of Speaker based on what they just said?',
"constituents": 'What is a breakdown of the last thing said into a series of required subevents?'
}
def format_input(conversation_history, commonsense_type):
# prefix last turn with Speaker, and alternately prefix each previous turn with either Listener or Speaker
prefixed_turns = list(
reversed(
[
f"{'Speaker' if i % 2 == 0 else 'Listener'}: {u}"
for i, u in enumerate(reversed(conversation_history))
]
)
)
# model expects a maximum of 7 total conversation turns to be given
truncated_turns = prefixed_turns[-7:]
# conversation representation separates the turns with newlines
conversation_string = '\n'.join(truncated_turns)
# format the full input including the commonsense question
input_text = f"provide a reasonable answer to the question based on the dialogue:\n{conversation_string}\n\n[Question] {commonsense_questions[commonsense_type]}\n[Answer]"
return input_text
def generate(conversation_history, commonsense_type):
# convert the input into the expected format to run the model
input_text = format_input(conversation_history, commonsense_type)
# tokenize the input_text
inputs = tokenizer([input_text], return_tensors="pt").to(device)
# get multiple model generations using the best-performing generation configuration (based on experiments detailed in paper)
outputs = model.generate(
inputs["input_ids"],
repetition_penalty=1.0,
num_beams=10,
num_beam_groups=10,
diversity_penalty=0.5,
num_return_sequences=5,
max_new_tokens=400
)
# decode the generated inferences
inferences = tokenizer.batch_decode(outputs, skip_special_tokens=True, clean_up_tokenization_spaces=False)
return inferences
conversation = [
"Hey, I'm trying to convince my parents to get a dog, but they say it's too much work.",
"Well, you could offer to do everything for taking care of it. Have you tried that?",
"But I don't want to have to take the dog out for walks when it is the winter!"
]
inferences = generate(conversation, "cause")
print('\n'.join(inferences))
# Outputs:
# the speaker's fear of the cold and the inconvenience of having to take the dog out in the winter.
# the speaker's preference for indoor activities during winter, such as watching movies or playing video games.
# the speaker's fear of getting sick from taking the dog out in the cold.
# a previous negative experience with taking dogs for walks in the winter.
# the listener's suggestion to offer to help with taking care of the dog, which the speaker may have considered but was not willing to do.
📄 ライセンス
このモデルはApache-2.0ライセンスの下で提供されています。
引用
このリポジトリのリソースが役に立った場合は、以下のように引用してください。
@article{convosense_finch:24,
author = {Finch, Sarah E. and Choi, Jinho D.},
title = "{ConvoSense: Overcoming Monotonous Commonsense Inferences for Conversational AI}",
journal = {Transactions of the Association for Computational Linguistics},
volume = {12},
pages = {467-483},
year = {2024},
month = {05},
issn = {2307-387X},
doi = {10.1162/tacl_a_00659},
url = {https://doi.org/10.1162/tacl\_a\_00659},
eprint = {https://direct.mit.edu/tacl/article-pdf/doi/10.1162/tacl\_a\_00659/2369521/tacl\_a\_00659.pdf},
}
Dialogpt Medium
MIT
DialoGPTは、多輪対話用の大規模事前学習対話応答生成モデルであり、単輪対話のチューリングテストでは人間と同等の性能を発揮します。
対話システム
D
microsoft
267.59k
368
Dialogpt Small
MIT
DialoGPTは最先端の大規模事前学習マルチターン対話応答生成モデルで、単一ターン対話のチューリングテストにおいて、生成される応答の品質が人間の応答品質に匹敵します。
対話システム
D
microsoft
218.89k
123
Blenderbot 400M Distill
Apache-2.0
このモデルは大規模ニューラルモデルと入念に設計されたトレーニング戦略により、マルチスキル融合のオープンドメイン対話能力を実現しています。
対話システム 英語
B
facebook
203.20k
431
Dialogpt Large
MIT
DialoGPTは、多輪対話に特化した最先端の大規模事前学習対話応答生成モデルで、単輪対話のチューリングテストにおいて生成される応答の質は人間の回答と同等です。
対話システム
D
microsoft
49.90k
276
Blenderbot 3B
Apache-2.0
これは大規模ニューラルネットワークに基づくオープンドメイン対話モデルで、複数の対話スキルを統合して自然な会話が可能です。
対話システム
Transformers 英語

B
facebook
11.92k
150
Blenderbot 90M
Apache-2.0
BlenderBotはオープンドメインチャットボットモデルで、多輪対話と様々な対話スキルの融合に特化しています。
対話システム
Transformers 英語

B
facebook
4,669
3
Cadet Tiny
Openrail
Cadet-TinyはSODAデータセットでトレーニングされた超小型対話モデルで、エッジデバイス推論向けに設計されており、体積はCosmo-3Bモデルの約2%です。
対話システム
Transformers 英語

C
ToddGoldfarb
2,691
6
Blenderbot 1B Distill
Apache-2.0
このモデルは高性能なオープンドメインチャットボットで、質問、回答、知識提示、共感など複数の対話スキルを統合できます。
対話システム
Transformers 英語

B
facebook
2,413
37
Blenderbot Small 90M
Apache-2.0
これは大規模ニューラルネットワークに基づくオープンドメイン対話システムで、マルチターンの自然な対話が可能で、さまざまな対話スキルを統合できます。
対話システム 英語
B
facebook
2,407
49
Unieval Dialog
UniEvalは自然言語生成タスクのための多次元評価フレームワークであり、unieval-dialogは対話応答生成タスク向けの事前学習評価器です。
対話システム
Transformers

U
MingZhong
2,021
4
おすすめAIモデル
Llama 3 Typhoon V1.5x 8b Instruct
タイ語専用に設計された80億パラメータの命令モデルで、GPT-3.5-turboに匹敵する性能を持ち、アプリケーションシナリオ、検索拡張生成、制限付き生成、推論タスクを最適化
大規模言語モデル
Transformers 複数言語対応

L
scb10x
3,269
16
Cadet Tiny
Openrail
Cadet-TinyはSODAデータセットでトレーニングされた超小型対話モデルで、エッジデバイス推論向けに設計されており、体積はCosmo-3Bモデルの約2%です。
対話システム
Transformers 英語

C
ToddGoldfarb
2,691
6
Roberta Base Chinese Extractive Qa
RoBERTaアーキテクチャに基づく中国語抽出型QAモデルで、与えられたテキストから回答を抽出するタスクに適しています。
質問応答システム 中国語
R
uer
2,694
98