Edit model card
YAML Metadata Error: "datasets[0]" with value "https://huggingface.co/datasets/nbroad/fix_punctuation" is not valid. If possible, use a dataset id from https://hf.co/datasets.

fix_punct_cased_t5_small

This model is a fine-tuned version of google/t5-v1_1-small on the NPR utterances dataset.

Dataset

The model was trained on 80k rows from the above dataset consisting of NPR radio transcripts. Commans, periods, and semicolons were removed from the text and then random commas, periods, and semicolons were added. The model was trained to place those three punctuation marks in the correct location. The casing of the texts was not modified during training.

It achieves the following results on the evaluation set:

  • Loss: 0.2744
  • Rouge1: 93.3712
  • Rouge2: 91.0027
  • Rougel: 93.3618
  • Rougelsum: 93.3479
  • Gen Len: 46.0728

Model description

The purpose of this model is to correct the punctuation in a sentence. For example, the phrase "This is, a sentence. with odd punctuation to show off what, the model. can do" gets changed to "This is a sentence with odd punctuation to show off what the model can do."

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 8e-05
  • train_batch_size: 128
  • eval_batch_size: 256
  • seed: 42
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lr_scheduler_type: linear
  • num_epochs: 3.0

Training results

Training Loss Epoch Step Validation Loss Rouge1 Rouge2 Rougel Rougelsum Gen Len
1.2254 1.0 600 0.3501 63.2952 59.8766 63.137 63.2022 16.2637
0.7345 2.0 1200 0.2815 64.896 61.6256 64.8677 64.8728 16.3625
0.6536 3.0 1800 0.2744 64.8724 61.6282 64.8483 64.8502 16.3906

Framework versions

  • Transformers 4.22.2
  • Pytorch 1.11.0a0+17540c5
  • Datasets 2.5.1
  • Tokenizers 0.12.1
Downloads last month
3