🚀 bart-finetuned-samsum 模型
本模型是專門對 facebook/bart-large-xsum 進行適配的版本,通過使用 SamSum 數據集進行微調,以提升其在對話摘要任務上的性能。
🚀 快速開始
本模型可用於對話摘要任務。以下是使用示例:
from transformers import pipeline
model = pipeline("summarization", model="luisotorres/bart-finetuned-samsum")
conversation = '''Sarah: Do you think it's a good idea to invest in Bitcoin?
Emily: I'm skeptical. The market is very volatile, and you could lose money.
Sarah: True. But there's also a high upside, right?
'''
model(conversation)
✨ 主要特性
- 基於 facebook/bart-large-xsum 模型進行微調。
- 針對 SamSum 數據集優化,在對話摘要任務上表現出色。
📦 安裝指南
文檔未提及安裝步驟,可參考 transformers
庫的官方安裝指南進行安裝。
💻 使用示例
基礎用法
from transformers import pipeline
model = pipeline("summarization", model="luisotorres/bart-finetuned-samsum")
conversation = '''Sarah: Do you think it's a good idea to invest in Bitcoin?
Emily: I'm skeptical. The market is very volatile, and you could lose money.
Sarah: True. But there's also a high upside, right?
'''
model(conversation)
📚 詳細文檔
開發相關
訓練參數
evaluation_strategy = "epoch",
save_strategy = 'epoch',
load_best_model_at_end = True,
metric_for_best_model = 'eval_loss',
seed = 42,
learning_rate=2e-5,
per_device_train_batch_size=4,
per_device_eval_batch_size=4,
gradient_accumulation_steps=2,
weight_decay=0.01,
save_total_limit=2,
num_train_epochs=4,
predict_with_generate=True,
fp16=True,
report_to="none"
參考資料
本模型基於原始的 BART 架構,詳情可參考:
Lewis et al. (2019). BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension. arXiv:1910.13461
🔧 技術細節
本模型是對 facebook/bart-large-xsum 進行微調得到的,使用 SamSum 數據集進行訓練,以提升在對話摘要任務上的性能。訓練過程中使用了一系列的訓練參數,如學習率、批次大小等,以優化模型的性能。
📄 許可證
文檔未提及許可證信息。
📋 模型信息
屬性 |
詳情 |
模型類型 |
用於對話摘要的微調模型 |
訓練數據 |
SamSum 數據集 |
評估指標 |
ROUGE-1、ROUGE-2、ROUGE-L、ROUGE-L Sum |
評估結果
數據集 |
ROUGE-1 |
ROUGE-2 |
ROUGE-L |
ROUGE-L Sum |
驗證集 |
53.8804 |
29.2329 |
44.774 |
49.8255 |
測試集 |
52.8156 |
28.1259 |
43.7147 |
48.5712 |
示例輸入
- John 和 Dan 討論是否值得購買 PlayStation 5。
- Sarah 和 Emily 討論投資比特幣是否是個好主意。
- Madison 詢問 Lawrence 文章是否完成。