🚀 BART LargeとLongformerエンコーダ - デコーダを使用した更新要約生成
本プロジェクトはTransformerアーキテクチャに基づくモデルで、長文書の生成型シーケンス-to-シーケンスタスクをサポートしています。BART LargeとLongformerエンコーダ - デコーダを組み合わせることで、より長い入力を処理でき、更新要約生成タスクで優れた性能を発揮します。
🚀 クイックスタート
モデルの説明
このモデルはTransformerに基づくモデルで、長文書の生成型シーケンス-to-シーケンスタスクをサポートしています。BART Large をベースに、Longformerエンコーダ - デコーダ を組み合わせることで、より長い入力を可能にしています。
想定される用途と制限
使い方
データをフォーマットし、各新しい記事または追加する証拠の前に <EV>
タグを付け、各タイトルの前に <t>
接頭辞を付け、各要約の前に <abs>
接頭辞を付けます。元の要約も同じフォーマットを使用するようにしてください。記事リストと元の要約が正しい区切りタグを使用していれば、任意の順序で連結することができます。
import torch
from transformers import LEDTokenizer, LEDForConditionalGeneration
tokenizer = LEDTokenizer.from_pretrained("hyesunyun/update-summarization-bart-large-longformer")
model = LEDForConditionalGeneration.from_pretrained("hyesunyun/update-summarization-bart-large-longformer")
input = "<EV> <t> Hypoglycemic effect of bitter melon compared with metformin in newly diagnosed type 2 diabetes patients. <abs> ETHNOPHARMACOLOGICAL RELEVANCE: Bitter melon (Momordica charantia L.) has been widely used as an traditional medicine treatment for diabetic patients in Asia. In vitro and animal studies suggested its hypoglycemic activity, but limited human studies are available to support its use. AIM OF STUDY: This study was conducted to assess the efficacy and safety of three doses of bitter melon compared with metformin. MATERIALS AND METHODS: This is a 4-week, multicenter, randomized, double-blind, active-control trial. Patients were randomized into 4 groups to receive bitter melon 500 mg/day, 1,000 mg/day, and 2,000 mg/day or metformin 1,000 mg/day. All patients were followed for 4 weeks. RESULTS: There was a significant decline in fructosamine at week 4 of the metformin group (-16.8; 95% CI, -31.2, -2.4 mumol/L) and the bitter melon 2,000 mg/day group (-10.2; 95% CI, -19.1, -1.3 mumol/L). Bitter melon 500 and 1,000 mg/day did not significantly decrease fructosamine levels (-3.5; 95% CI -11.7, 4.6 and -10.3; 95% CI -22.7, 2.2 mumol/L, respectively). CONCLUSIONS: Bitter melon had a modest hypoglycemic effect and significantly reduced fructosamine levels from baseline among patients with type 2 diabetes who received 2,000 mg/day. However, the hypoglycemic effect of bitter melon was less than metformin 1,000 mg/day. <EV> <t> Momordica charantia for type 2 diabetes mellitus. <abs> There is insufficient evidence to recommend momordica charantia for type 2 diabetes mellitus. Further studies are therefore required to address the issues of standardization and the quality control of preparations. For medical nutritional therapy, further observational trials evaluating the effects of momordica charantia are needed before RCTs are established to guide any recommendations in clinical practice."
inputs_dict = tokenizer(input, padding="max_length", max_length=10240, return_tensors="pt", truncation=True)
input_ids = inputs_dict.input_ids
attention_mask = inputs_dict.attention_mask
global_attention_mask = torch.zeros_like(attention_mask)
global_attention_mask[:, 0] = 1
predicted_summary_ids = model.generate(input_ids, attention_mask=attention_mask, global_attention_mask=global_attention_mask)
print(tokenizer.batch_decode(predicted_summary_ids, skip_special_tokens=True))
制限とバイアス
潜在的な問題の例と可能な対策を提供してください。
訓練データ
事前学習された LEDモデル を使用し、このGitHubリポジトリ のデータセットを使用して微調整しました。
訓練過程
前処理、使用したハードウェア、ハイパーパラメータなどを含みます。
評価結果
BibTeX引用と引用情報
@inproceedings{...,
year={2021}
}
情報テーブル
属性 |
詳細 |
モデルタイプ |
Transformerベースの長文書生成型シーケンス-to-シーケンスモデル |
訓練データ |
事前学習されたLEDモデルを使用し、このGitHubリポジトリ のデータセットを使用して微調整 |
評価指標 |
編集距離、ROUGE、BertScore |
ライセンス |
Apache-2.0 |