Haruhi Dialogue Speaker Extract Qwen18
qwen-1.8モデルをファインチューニングした対話抽出モデルで、小説の断片から要約と対話を一括抽出可能
ダウンロード数 17
リリース時間 : 1/26/2024
モデル概要
このモデルは小説テキストから対話内容と要約情報を抽出するために特別に設計されており、中国語と英語のテキスト処理をサポートし、構造化されたJSON形式の結果を出力します
モデル特徴
多言語サポート
中国語と英語の小説コンテンツ抽出を同時にサポート
構造化出力
要約と対話を含むJSON形式の結果を自動生成
バッチ処理能力
連続したテキストブロックや複数章のコンテンツを処理可能
モデル能力
テキスト要約生成
対話内容認識
話者判断
構造化データ出力
使用事例
文学分析
小説対話分析
小説テキストから対話内容を抽出してキャラクター分析に利用
サンプルでは対話内容と話者を正確に識別可能
コンテンツ要約生成
小説の断片から要点を自動生成
サンプルでは一貫した段落要約を生成可能
データ前処理
対話データセット構築
対話システムのトレーニングデータを準備
大量の小説テキストをバッチ処理可能
🚀 Chat涼宮春日の対話抽出モデル
我々は、小説のチャンクから要約と対話を一括で抽出できるモデルを望んでいます。このモデルはその機能を実現しています。このモデルは、約30kの中国語小説データと20kの英語小説データを使用して訓練され、qwen - 1.8上で3エポックのファインチューニングが行われました。原則として、このモデルは中国語と英語の両方の小説の抽出に対応しています。
メインプロジェクトのリンク: https://github.com/LC1332/Chat-Haruhi-Suzumiya
🚀 クイックスタート
このモデルは、小説のチャンクから要約と対話を一括で抽出することができます。以下の手順で使用することができます。
✨ 主な機能
- 中国語と英語の小説データを用いて訓練され、両言語の小説からの抽出に対応。
- 約30kの中国語小説データと20kの英語小説データを使用し、qwen - 1.8上で3エポックのファインチューニングを行った。
📦 インストール
インストールに関する具体的な手順は原ドキュメントに記載されていないため、このセクションをスキップします。
💻 使用例
基本的な使用法
from transformers import AutoTokenizer, AutoModel, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("silk-road/Haruhi-Dialogue-Speaker-Extract_qwen18", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("silk-road/Haruhi-Dialogue-Speaker-Extract_qwen18", device_map="auto", trust_remote_code=True)
sys_prompt = "给定input paragraph,抽取其中的对话,并输出为json格式 Let's think it step by step 1. summarize input paragraph into bullet format,存储在summary字段 2. 抽取每一句对话的内容 dialogue,判断每一句话的说话人 said by, 存储在conversations中"
text = "Your novel text"
response_str, history = model.chat(tokenizer, text, history=[], system=sys_prompt)
高度な使用法
高度な使用法に関する具体的な説明は原ドキュメントに記載されていないため、このセクションをスキップします。
📚 ドキュメント
公式プロンプト
中国語
给定input paragraph,抽取其中的对话,并输出为json格式 Let's think it step by step 1. summarize input paragraph into bullet format,存储在summary字段 2. 抽取每一句对话的内容 dialogue,判断每一句话的说话人 said by, 存储在conversations中
英語
Given an input paragraph, extract the dialogues within it, and output them in JSON format.
Let's think about it step by step:
- Summarize the input paragraph into bullet points and store it in the 'summary' field.
- Extract the content of each dialogue ('dialogue'), identify the speaker for each sentence ('said by'), and store these in 'conversations'.
今後の予定
- [x] 複数チャンクの推論への拡張
- [x] 英語の例の提供
- [ ] 複数章の並列推論の例の提供
- [ ] JSON解析に失敗した場合、生の文字列から直接要約を抽出する試み
- [ ] 失敗した場合、OpenAIを使用した推論の試行
出力例
中国語出力例
{'summary': '- 彭蠡不在家中,老刀感到担忧并等待着彭蠡回家的时间,同时观察周围环境和人们的消费行为,表现出内心的饥饿感和焦虑情绪。', 'conversations': [{'dialogue': '哎,你们知道那儿一盘回锅肉多少钱吗?', 'said_by': '小李'}, {'dialogue': '靠,菜里有沙子。', 'said_by': '小丁'}, {'dialogue': '人家那儿一盘回锅肉,就三百四。', 'said_by': '小李'}, {'dialogue': '什么玩意?这么贵。', 'said_by': '小丁'}, {'dialogue': '你吃不了这么多。', 'said_by': '小李'}]}
{'summary': '- 彭蠡在家等待彭蠡回家,表现出内心的饥饿感和焦虑情绪,同时对彭蠡的行为表示不满和失望。彭蠡则对老刀的行为表现出冷漠和不屑的态度。', 'conversations': [{'dialogue': '我没时间和你解释。我需要去第一空间,你告诉我怎么走。', 'said_by': '老刀'}, {'dialogue': '回我家说,要走也从那儿走。', 'said_by': '彭蠡'}, {'dialogue': '回家啦,回家啦。转换马上开始了。', 'said_by': '车上的人'}, {'dialogue': '你不告诉我为什么,我就不告诉你怎么走。', 'said_by': '彭蠡'}, {'dialogue': '你躲在垃圾道里?去第二空间?那你得等24小时啊。', 'said_by': '彭蠡'}, {'dialogue': '二十万块。等一礼拜也值啊。', 'said_by': '老刀'}, {'dialogue': '你就这么缺钱花?', 'said_by': '彭蠡'}, {'dialogue': '糖糖还有一年多该去幼儿园了。我来不及了。', 'said_by': '老刀'}, {'dialogue': '你别说了。', 'said_by': '彭蠡'}]}
{'summary': '- 彭蠡对彭蠡的行为表现出不满和失望,同时对老刀的行为表现出冷漠和不屑的态度。', 'conversations': [{'dialogue': '你真是作死,她又不是你闺女,犯得着吗。', 'said_by': '彭蠡'}, {'dialogue': '别说这些了。快告我怎么走。', 'said_by': '老刀'}, {'dialogue': '你可得知道,万一被抓着,可不只是罚款,得关上好几个月。', 'said_by': '彭蠡'}, {'dialogue': '你不是去过好多次吗?', 'said_by': '老刀'}, {'dialogue': '只有四次。第五次就被抓了。', 'said_by': '彭蠡'}, {'dialogue': '那也够了。我要是能去四次,抓一次也无所谓。', 'said_by': '老刀'}, {'dialogue': '别说了。你要是真想让我带你去,我就带你去。', 'said_by': '彭蠡'}]}
- 彭蠡不在家中,老刀感到担忧并等待着彭蠡回家的时间,同时观察周围环境和人们的消费行为,表现出内心的饥饿感和焦虑情绪。
小李 : 哎,你们知道那儿一盘回锅肉多少钱吗?
小丁 : 靠,菜里有沙子。
小李 : 人家那儿一盘回锅肉,就三百四。
小丁 : 什么玩意?这么贵。
小李 : 你吃不了这么多。
- 彭蠡在家等待彭蠡回家,表现出内心的饥饿感和焦虑情绪,同时对彭蠡的行为表示不满和失望。彭蠡则对老刀的行为表现出冷漠和不屑的态度。
老刀 : 我没时间和你解释。我需要去第一空间,你告诉我怎么走。
彭蠡 : 回我家说,要走也从那儿走。
车上的人 : 回家啦,回家啦。转换马上开始了。
彭蠡 : 你不告诉我为什么,我就不告诉你怎么走。
彭蠡 : 你躲在垃圾道里?去第二空间?那你得等24小时啊。
老刀 : 二十万块。等一礼拜也值啊。
彭蠡 : 你就这么缺钱花?
老刀 : 糖糖还有一年多该去幼儿园了。我来不及了。
彭蠡 : 你别说了。
- 彭蠡对彭蠡的行为表现出不满和失望,同时对老刀的行为表现出冷漠和不屑的态度。
彭蠡 : 你真是作死,她又不是你闺女,犯得着吗。
老刀 : 别说这些了。快告我怎么走。
彭蠡 : 你可得知道,万一被抓着,可不只是罚款,得关上好几个月。
老刀 : 你不是去过好多次吗?
彭蠡 : 只有四次。第五次就被抓了。
老刀 : 那也够了。我要是能去四次,抓一次也无所谓。
彭蠡 : 别说了。你要是真想让我带你去,我就带你去。
英語出力例
{'summary': "Snow-covered Paris, Kimura's workshop, artist and viewer engaging in conversation.", 'conversations': [{'dialogue': 'You should hear the stories they tell of you at the café. If Émile is to be believed, you arrived here as an ukiyo-e courtesan, nothing more than paper wrapped around a porcelain bowl. A painter—he will not say which of us it was, of course—bought the bowl and the print along with it.', 'said_by': 'Artist'}, {'dialogue': 'And the painter pulled me from the print with the sheer force of his imagination, I’m sure. Émile is a novelist and can hardly be trusted to give an accurate account. The reality of my conception is vastly more mundane, I assure you…though it does involve a courtesan.', 'said_by': 'Woman'}, {'dialogue': 'A grain of truth makes for the best fiction. nude, but leave the jewelry and the shoes. I’ll paint you on the chaise. We’ll have three hours in the proper light, and I will pay you four francs.', 'said_by': 'Artist'}, {'dialogue': 'Victorine gets five!', 'said_by': 'Woman'}, {'dialogue': 'Victorine is a redhead.', 'said_by': 'Artist'}, {'dialogue': 'My name is Mariko, by the way, but everyone calls me Mari.', 'said_by': 'Mariko'}]}
{'summary': "Snow-covered Paris, Kimura's workshop, artist and viewer engaged in conversation. Artist and viewer engage in intimate conversation and interaction.", 'conversations': [{'dialogue': 'I’m on the chaise', 'said_by': 'Artist'}, {'dialogue': 'Bring your left hip forward. No, not that far. Bend the leg a bit more, yes. Turn your head to face the canvas.', 'said_by': 'Artist'}, {'dialogue': 'Like a Manet', 'said_by': 'Artist'}, {'dialogue': 'Don’t like a model that talks while you work, huh?', 'said_by': 'Artist'}, {'dialogue': 'I don’t like being compared to other artists.', 'said_by': 'Artist'}, {'dialogue': 'Then you must paint me so well that I forget about the others.', 'said_by': 'Artist'}, {'dialogue': 'Tilt your head into the light. And look at me intently. Intently. As though I were the one naked on the chaise.', 'said_by': 'Artist'}, {'dialogue': 'You did better than I would have expected.', 'said_by': 'Artist'}, {'dialogue': 'There are other poses I could show you, if you like?', 'said_by': 'Artist'}, {'dialogue': 'But the sooner I get started on this portrait, the better.', 'said_by': 'Artist'}]}
{'summary': "Kimura's workshop, artist and viewer engaging in intimate conversation and interaction. Kimura responds with a strong, cold embrace, leading to a passionate physical exchange. Afterward, the artist falls asleep, leaving the narrator feeling incomplete and longing.", 'num': 14, 'conversations': [{'dialogue': 'I could show you other poses.', 'said_by': 'Kimura'}, {'dialogue': 'Yes.', 'said_by': 'Kimura'}, {'dialogue': 'See you tomorrow?', 'said_by': 'Artist'}]}
Snow-covered Paris, Kimura's workshop, artist and viewer engaging in conversation.
Artist : You should hear the stories they tell of you at the café. If Émile is to be believed, you arrived here as an ukiyo-e courtesan, nothing more than paper wrapped around a porcelain bowl. A painter—he will not say which of us it was, of course—bought the bowl and the print along with it.
Woman : And the painter pulled me from the print with the sheer force of his imagination, I’m sure. Émile is a novelist and can hardly be trusted to give an accurate account. The reality of my conception is vastly more mundane, I assure you…though it does involve a courtesan.
Artist : A grain of truth makes for the best fiction. nude, but leave the jewelry and the shoes. I’ll paint you on the chaise. We’ll have three hours in the proper light, and I will pay you four francs.
Woman : Victorine gets five!
Artist : Victorine is a redhead.
Mariko : My name is Mariko, by the way, but everyone calls me Mari.
Snow-covered Paris, Kimura's workshop, artist and viewer engaged in conversation. Artist and viewer engage in intimate conversation and interaction.
Artist : I’m on the chaise
Artist : Bring your left hip forward. No, not that far. Bend the leg a bit more, yes. Turn your head to face the canvas.
Artist : Like a Manet
Artist : Don’t like a model that talks while you work, huh?
Artist : I don’t like being compared to other artists.
Artist : Then you must paint me so well that I forget about the others.
Artist : Tilt your head into the light. And look at me intently. Intently. As though I were the one naked on the chaise.
Artist : You did better than I would have expected.
Artist : There are other poses I could show you, if you like?
Artist : But the sooner I get started on this portrait, the better.
Kimura's workshop, artist and viewer engaging in intimate conversation and interaction. Kimura responds with a strong, cold embrace, leading to a passionate physical exchange. Afterward, the artist falls asleep, leaving the narrator feeling incomplete and longing.
Kimura : I could show you other poses.
Kimura : Yes.
Artist : See you tomorrow?
🔧 技術詳細
原ドキュメントに技術的な詳細説明が50文字以上記載されていないため、このセクションをスキップします。
📄 ライセンス
このモデルはApache - 2.0ライセンスの下で提供されています。
Bart Large Cnn
MIT
英語コーパスで事前学習されたBARTモデルで、CNNデイリーメールデータセットに特化してファインチューニングされ、テキスト要約タスクに適しています。
テキスト生成 英語
B
facebook
3.8M
1,364
Parrot Paraphraser On T5
ParrotはT5ベースの言い換えフレームワークで、自然言語理解(NLU)モデルのトレーニング加速のために設計され、高品質な言い換えによるデータ拡張を実現します。
テキスト生成
Transformers

P
prithivida
910.07k
152
Distilbart Cnn 12 6
Apache-2.0
DistilBARTはBARTモデルの蒸留バージョンで、テキスト要約タスクに特化して最適化されており、高い性能を維持しながら推論速度を大幅に向上させています。
テキスト生成 英語
D
sshleifer
783.96k
278
T5 Base Summarization Claim Extractor
T5アーキテクチャに基づくモデルで、要約テキストから原子声明を抽出するために特別に設計されており、要約の事実性評価プロセスの重要なコンポーネントです。
テキスト生成
Transformers 英語

T
Babelscape
666.36k
9
Unieval Sum
UniEvalは自然言語生成タスクの自動評価のための統一された多次元評価器で、複数の解釈可能な次元での評価をサポートします。
テキスト生成
Transformers

U
MingZhong
318.08k
3
Pegasus Paraphrase
Apache-2.0
PEGASUSアーキテクチャを微調整したテキスト再述モデルで、意味は同じだが表現が異なる文章を生成できます。
テキスト生成
Transformers 英語

P
tuner007
209.03k
185
T5 Base Korean Summarization
これはT5アーキテクチャに基づく韓国語テキスト要約モデルで、韓国語テキスト要約タスク用に設計され、paust/pko-t5-baseモデルを微調整して複数の韓国語データセットで訓練されました。
テキスト生成
Transformers 韓国語

T
eenzeenee
148.32k
25
Pegasus Xsum
PEGASUSは、Transformerに基づく事前学習モデルで、抽象的なテキスト要約タスクに特化しています。
テキスト生成 英語
P
google
144.72k
198
Bart Large Cnn Samsum
MIT
BART-largeアーキテクチャに基づく対話要約モデルで、SAMSumコーパス用に微調整され、対話要約の生成に適しています。
テキスト生成
Transformers 英語

B
philschmid
141.28k
258
Kobart Summarization
MIT
KoBARTアーキテクチャに基づく韓国語テキスト要約モデルで、韓国語ニュース記事の簡潔な要約を生成できます。
テキスト生成
Transformers 韓国語

K
gogamza
119.18k
12
おすすめ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