CoolFace
Modelpublic

henryu-lin/t5-large-samsum-deepspeed

sourceHugging Faceapache-2.0updated 5y agoView on Hugging Face
1likes25downloads
Model Card

language: en tags:

  • —azureml
  • —t5
  • —summarization
  • —deepspeed license: apache-2.0 datasets:
  • —samsum model-index:
  • —name: t5-large-samsum-deepspeed results:
  • —task: name: Abstractive Text Summarization type: abstractive-text-summarization dataset: name: "SAMSum Corpus: A Human-annotated Dialogue Dataset for Abstractive Summarization" type: samsum widget:
  • —text: | Kevin: Hey man, are you excited to watch Finding Nemo tonight? Henry: Yea, I can't wait to watch that same movie for the 89th time. Is Nate coming over to watch it with us tonight? Kevin: Yep, 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? It's starting to make the kitchen really smell. Henry: Oh I forgot. I'll do that once I'm finished with my assignment for my math class. I didn't get to start on it until an hour ago, and it's due in 30 minutes. Kevin: Okay dude, you should take it out as soon as possible. By the way, Nate is bringing his girlfriend and their cat too. Henry: Nice, I'm really looking forward to seeing them again. ---

t5-large-samsum-deepspeed

This model was trained using Microsoft's AzureML and DeepSpeed's ZeRO 2 optimization. It was fine-tuned on the SAMSum corpus from t5-large checkpoint.

More information on the fine-tuning process (includes samples and benchmarks): (currently still WIP, major updates coming soon: 7/6/21~7/9/21)

Resource Usage

These results are retrieved from AzureML Studio's resource monitoring module. All experiments were ran on AzureML's low priority clusters.

keyvalue
AzureML SKUND40rs_v2 (8 X V100 32GB)
RegionUS West 2
Run Duration12m 47.13s
Compute Cost (LowPriority/Dedicated)$0.94/$4.69 (USD)
Average CPU Utilization51.2%
Average GPU Utilization42.0%
GPU Memory Usage (Avg/Peak)24.85/28.79 (GB)
Total GPU Energy Usage670.38 (kJ)

Compute cost is calculated from run duration and SKU's price per hour. Updated SKU pricing could be found here: https://azure.microsoft.com/en-us/pricing/details/machine-learning/ Peak memory usage is calculated from average peak across all utilized GPUs.

Carbon Emissions

These results are obtained using codecarbon. The carbon emission is estimated from training runtime only (excluding setup and evaluation runtime). CodeCarbon: https://github.com/mlco2/codecarbon

keyvalue
timestamp2021-07-08T06:29:27
duration515.5018835067749
emissions0.043562840982919106
energy_consumed0.14638051405550773
country_nameUSA
regionWashington
cloud_providerazure
cloud_regionwestus2

Hyperparameters

yaml
fp16: True
per device batch size: 8
effective batch size: 64
epoch: 3.0
learning rate: 1e-4
weight decay: 0.1
seed: 1

*Same per device batch size for evaluations

DeepSpeed

Optimizer = AdamW, Scheduler = WarmupDecayLR, Offload = none

json
  "zero_optimization": {
    "stage": 2,
    "allgather_partitions": true,
    "allgather_bucket_size": 1300000000,
    "overlap_comm": true,
    "reduce_scatter": true,
    "reduce_bucket_size": 1300000000,
    "contiguous_gradients": true
  }

Usage

python
from transformers import pipeline
summarizer = pipeline("summarization", model="henryu-lin/t5-large-samsum-deepspeed")

conversation = '''Kevin: Hey man, are you excited to watch Finding Nemo tonight?
    Henry: Yea, I can't wait to watch that same movie for the 89th time. Is Nate coming over to watch it with us tonight?
    Kevin: Yep, 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? It's starting to make the kitchen really smell.
    Henry: Oh I forgot. I'll do that once I'm finished with my assignment for my math class. I didn't get to start on it until an hour ago, and it's due in 30 minutes.
    Kevin: Okay dude, you should take it out as soon as possible. By the way, Nate is bringing his girlfriend and their cat too.
    Henry: Nice, I'm really looking forward to seeing them again.
'''
summarizer(conversation)

Results

ROUGEScore
eval_rouge153.0823
eval_rouge228.7097
eval_rougeL43.939
eval_rougeLsum49.067
predict_rouge151.6716
predict_rouge226.5372
predict_rougeL42.9681
predict_rougeLsum47.4084
MetricValue
evalgenlen26.4071
predictgenlen25.9451
train_loss1.3212629926497115
eval_loss1.23828125
predict_loss1.2333984375
train_runtime515.2198
train_samples14732
trainsamplesper_second85.781
trainstepsper_second1.345
eval_runtime61.275
eval_samples818
evalsamplesper_second13.35
evalstepsper_second0.212
predict_runtime63.3732
predict_samples819
predictsamplesper_second12.923
predictstepsper_second0.205
total_steps693
total_flos7.20140924616704e+16