🚀 BART(大型モデル)、CNN Daily Mailで微調整
BARTモデルは英語コーパスで事前学習され、CNN Daily Mailで微調整されました。このモデルはLewisらによって論文BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensionで提案され、最初はこのリポジトリで公開されました。
免責事項:BARTを公開したチームはこのモデルのモデルカードを作成していません。このモデルカードはHugging Faceチームによって作成されています。
🚀 クイックスタート
このモデルはテキスト要約タスクに使用できます。以下はpipeline APIを使用してこのモデルを呼び出すコード例です。
from transformers import pipeline
summarizer = pipeline("summarization", model="facebook/bart-large-cnn")
ARTICLE = """ New York (CNN)When Liana Barrientos was 23 years old, she got married in Westchester County, New York.
A year later, she got married again in Westchester County, but to a different man and without divorcing her first husband.
Only 18 days after that marriage, she got hitched yet again. Then, Barrientos declared "I do" five more times, sometimes only within two weeks of each other.
In 2010, she married once more, this time in the Bronx. In an application for a marriage license, she stated it was her "first and only" marriage.
Barrientos, now 39, is facing two criminal counts of "offering a false instrument for filing in the first degree," referring to her false statements on the
2010 marriage license application, according to court documents.
Prosecutors said the marriages were part of an immigration scam.
On Friday, she pleaded not guilty at State Supreme Court in the Bronx, according to her attorney, Christopher Wright, who declined to comment further.
After leaving court, Barrientos was arrested and charged with theft of service and criminal trespass for allegedly sneaking into the New York subway through an emergency exit, said Detective
Annette Markowski, a police spokeswoman. In total, Barrientos has been married 10 times, with nine of her marriages occurring between 1999 and 2002.
All occurred either in Westchester County, Long Island, New Jersey or the Bronx. She is believed to still be married to four men, and at one time, she was married to eight men at once, prosecutors say.
Prosecutors said the immigration scam involved some of her husbands, who filed for permanent residence status shortly after the marriages.
Any divorces happened only after such filings were approved. It was unclear whether any of the men will be prosecuted.
The case was referred to the Bronx District Attorney\'s Office by Immigration and Customs Enforcement and the Department of Homeland Security\'s
Investigation Division. Seven of the men are from so-called "red-flagged" countries, including Egypt, Turkey, Georgia, Pakistan and Mali.
Her eighth husband, Rashid Rajput, was deported in 2006 to his native Pakistan after an investigation by the Joint Terrorism Task Force.
If convicted, Barrientos faces up to four years in prison. Her next court appearance is scheduled for May 18.
"""
print(summarizer(ARTICLE, max_length=130, min_length=30, do_sample=False))
>>> [{'summary_text': 'Liana Barrientos, 39, is charged with two counts of "offering a false instrument for filing in the first degree" In total, she has been married 10 times, with nine of her marriages occurring between 1999 and 2002. She is believed to still be married to four men.'}]
✨ 主な機能
- モデルアーキテクチャ:BARTはTransformerエンコーダ - デコーダ(seq2seq)モデルで、双方向(BERTのような)エンコーダと自己回帰(GPTのような)デコーダを備えています。
- 事前学習方法:(1)任意のノイズ関数を使用してテキストを破壊し、(2)元のテキストを再構築するモデルを学習することで事前学習されます。
- 応用シーン:微調整後、BARTはテキスト生成タスク(要約、翻訳など)で優れた性能を発揮し、同時に理解タスク(テキスト分類、質問応答など)でも良好な結果を得ます。この特定のチェックポイントはCNN Daily Mail(大規模なテキスト - 要約ペアの集合)で微調整されています。
📚 ドキュメント
モデルの説明
BARTはTransformerエンコーダ - デコーダ(seq2seq)モデルで、双方向(BERTのような)エンコーダと自己回帰(GPTのような)デコーダを組み合わせています。BARTの事前学習プロセスは2つのステップから成ります。まず、任意のノイズ関数を使用してテキストを破壊し、次に元のテキストを再構築するモデルを学習します。
BARTは微調整後、テキスト生成タスク(要約、翻訳など)で特に有効で、同時に理解タスク(テキスト分類、質問応答など)でも良好な性能を示します。この特定のチェックポイントはCNN Daily Mail(大規模なテキスト - 要約ペアの集合)で微調整されています。
想定される用途と制限
このモデルはテキスト要約タスクに使用できます。
BibTeX引用情報
@article{DBLP:journals/corr/abs-1910-13461,
author = {Mike Lewis and
Yinhan Liu and
Naman Goyal and
Marjan Ghazvininejad and
Abdelrahman Mohamed and
Omer Levy and
Veselin Stoyanov and
Luke Zettlemoyer},
title = {{BART:} Denoising Sequence-to-Sequence Pre-training for Natural Language
Generation, Translation, and Comprehension},
journal = {CoRR},
volume = {abs/1910.13461},
year = {2019},
url = {http://arxiv.org/abs/1910.13461},
eprinttype = {arXiv},
eprint = {1910.13461},
timestamp = {Thu, 31 Oct 2019 14:02:26 +0100},
biburl = {https://dblp.org/rec/journals/corr/abs-1910-13461.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
📄 ライセンス
このモデルはMITライセンスで提供されています。
📦 モデル情報
属性 |
詳細 |
モデルタイプ |
テキスト要約モデル |
学習データ |
CNN Daily Mail |
評価指標 |
ROUGE-1: 42.9486;ROUGE-2: 20.8149;ROUGE-L: 30.6186;ROUGE-LSUM: 40.0376;loss: 2.529000997543335;gen_len: 78.5866 |