T5-inshorts: T5 model trained on inshorts data

Details of T5

The T5 model was presented in Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer by Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, Peter J. Liu and here is the abstract:

Transfer learning, where a model is first pre-trained on a data-rich task before being fine-tuned on a downstream task, has emerged as a powerful technique in natural language processing (NLP). The effectiveness of transfer learning has given rise to a diversity of approaches, methodology, and practice. In this paper, we explore the landscape of transfer learning techniques for NLP by introducing a unified framework that converts all text-based language problems into a text-to-text format. Our systematic study compares pre-training objectives, architectures, unlabeled data sets, transfer approaches, and other factors on dozens of language understanding tasks. By combining the insights from our exploration with scale and our new ``Colossal Clean Crawled Corpus'', we achieve state-of-the-art results on many benchmarks covering summarization, question answering, text classification, and more. To facilitate future work on transfer learning for NLP, we release our data set, pre-trained models, and code.

Details of the downstream task (Summarization) - Dataset ๐Ÿ“š

  • The summarization data has been taken from Inshorts News Data from kaggle. Inshorts is a news service that provides short summaries of news from around the web. This dataset contains headlines and summary of news items along with its source.

Model training

The training script is present here.

Pipelining the Model

import transformers

model = transformers.T5ForConditionalGeneration.from_pretrained('lordtt13/t5-inshorts')

tokenizer = transformers.T5Tokenizer.from_pretrained("lordtt13/t5-inshorts")

nlp_fill = transformers.pipeline('summarization', model = model, tokenizer = tokenizer)
nlp_fill('The CBI on Saturday booked four former officials of Syndicate Bank and six others for cheating, forgery, criminal conspiracy and causing โ‚น209 crore loss to the state-run bank. The accused had availed home loans and credit from Syndicate Bank on the basis of forged and fabricated documents. These funds were fraudulently transferred to the companies owned by the accused persons.', min_length=5, max_length=40)

# Output:
# [{'summary_text': ': CBI books 4 ex-bank officials for cheating, forgery'}]

Created by Tanmay Thakur | LinkedIn

PS: Still looking for more resources to expand my expansion!

Downloads last month
8
Hosted inference API
Text2Text Generation

Inference API has been turned off for this model.