🚀 bart-large-samsum
bart-large-samsum
是一個用於文本摘要的模型,它基於 facebook/bart-large
進行微調,在 samsum
語料庫上表現出色,能有效完成抽象文本摘要任務。
🚀 快速開始
推理使用
以下是使用該模型進行推理的示例代碼:
from transformers import pipeline
summarizer = pipeline("summarization", model="linydub/bart-large-samsum")
input_text = '''
Henry: Hey, is Nate coming over to watch the movie tonight?
Kevin: Yea, he said he'll be arriving a bit later at around 7 since he gets off of work at 6. Have you taken out the garbage yet?
Henry: Oh I forgot. I'll do that once I'm finished with my assignment for my math class.
Kevin: Yea, you should take it out as soon as possible. And also, Nate is bringing his girlfriend.
Henry: Nice, I'm really looking forward to seeing them again.
'''
summarizer(input_text)
在 AzureML 上微調
你可以通過以下按鈕在 AzureML 上進行微調:

更多關於微調過程的信息(包括示例和基準):
[預覽] https://github.com/linydub/azureml-greenai-txtsum
📚 詳細文檔
資源使用情況
這些結果是從 Azure Monitor Metrics
獲取的。所有實驗都在 AzureML 低優先級計算集群上運行。
屬性 |
詳情 |
區域 |
美國西部 2 |
AzureML 計算 SKU |
STANDARD_ND40RS_V2 |
計算 SKU GPU 設備 |
8 x NVIDIA V100 32GB (NVLink) |
計算節點數量 |
1 |
運行時長 |
6 分 48 秒 |
計算成本(專用/低優先級) |
2.50 美元 / 0.50 美元 |
平均 CPU 利用率 |
47.9% |
平均 GPU 利用率 |
69.8% |
平均 GPU 內存使用量 |
25.71 GB |
總 GPU 能源使用量 |
370.84 kJ |
*計算成本 ($) 是根據運行時長、使用的計算節點數量和 SKU 的每小時價格估算的。最新的 SKU 定價可在 此處 找到。
碳排放
這些結果是使用 CodeCarbon
獲得的。碳排放僅根據訓練運行時間估算(不包括設置和評估運行時間)。
屬性 |
詳情 |
時間戳 |
2021-09-16T23:54:25 |
持續時間 |
263.2430217266083 |
排放量 |
0.029715544634717518 |
能源消耗 |
0.09985062041235725 |
國家名稱 |
美國 |
地區 |
華盛頓 |
雲服務提供商 |
azure |
雲區域 |
westus2 |
超參數
- max_source_length: 512
- max_target_length: 90
- fp16: True
- seed: 1
- per_device_train_batch_size: 16
- per_device_eval_batch_size: 16
- gradient_accumulation_steps: 1
- learning_rate: 5e-5
- num_train_epochs: 3.0
- weight_decay: 0.1
結果
ROUGE 指標 |
得分 |
eval_rouge1 |
55.0234 |
eval_rouge2 |
29.6005 |
eval_rougeL |
44.914 |
eval_rougeLsum |
50.464 |
predict_rouge1 |
53.4345 |
predict_rouge2 |
28.7445 |
predict_rougeL |
44.1848 |
predict_rougeLsum |
49.1874 |
指標 |
值 |
epoch |
3.0 |
eval_gen_len |
30.6027 |
eval_loss |
1.4327096939086914 |
eval_runtime |
22.9127 |
eval_samples |
818 |
eval_samples_per_second |
35.701 |
eval_steps_per_second |
0.306 |
predict_gen_len |
30.4835 |
predict_loss |
1.4501988887786865 |
predict_runtime |
26.0269 |
predict_samples |
819 |
predict_samples_per_second |
31.467 |
predict_steps_per_second |
0.269 |
train_loss |
1.2014821151207233 |
train_runtime |
263.3678 |
train_samples |
14732 |
train_samples_per_second |
167.811 |
train_steps_per_second |
1.321 |
total_steps |
348 |
total_flops |
4.26008990669865e+16 |
📄 許可證
本項目採用 Apache-2.0 許可證。