Downloads · 30 days
24
10% of all-time downloads
thenlpresearcher/iitb-t5-finetuned-punctuation
iitb-t5-finetuned-punctuation is a text generation model from thenlpresearcher. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This model is a fine-tuned version of google-t5/t5-base on the English Punctuation Restoration dataset. It was developed as part of the research presented in the paper "Assessing and Improving Punctuation Robustness i…
Downloads · 30 days
24
10% of all-time downloads
All-time downloads
230
Public
Parameters
223M
2.7 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors892 MB · 100%
From the Hugging Face model README
This model is a fine-tuned version of google-t5/t5-base on the English Punctuation Restoration dataset. It was developed as part of the research presented in the paper "Assessing and Improving Punctuation Robustness in English-Marathi Machine Translation".
This model is designed to restore missing punctuation in English sentences. It serves as a critical component in a "restore-then-translate" pipeline, where it resolves semantic and structural ambiguities in source English text before it is translated into Marathi. By adding appropriate marks like commas and periods, it improves the overall reliability and meaning preservation of downstream translation tasks.
The model is intended for punctuation restoration in English text, particularly as a pre-processing step for low-resource machine translation pipelines. It focuses on resolving ambiguities where the absence of punctuation (like commas) changes the sentence's interpretation.
from transformers import pipeline
# Initialize the pipeline for text-to-text generation
punctuator_pipeline = pipeline("text2text-generation", model="thenlpresearcher/iitb-t5-finetuned-punctuation")
text = "the morning sky stretched over the city like a quiet sheet of pale blue while people hurried through the streets"
# Run the text through the pipeline
output = punctuator_pipeline(text, max_length=128)
print(output)
# Sample Output: [{'generated_text': 'the morning sky stretched over the city like a quiet sheet of pale blue while people hurried through the streets.'}]
The model was trained on the english_punctuation_restoration dataset. Evaluation was conducted using the Virām benchmark, a manually curated set of 54 punctuation-ambiguous English instances designed to test the robustness of translation systems.
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Bleu |
|---|---|---|---|---|
| 0.0988 | 1.0 | 6441 | 0.0947 | 52.8823 |
| 0.0879 | 2.0 | 12882 | 0.0910 | 52.9691 |
| 0.0832 | 3.0 | 19323 | 0.0897 | 53.0293 |