lordtt13 commited on
Commit
e6fb750
1 Parent(s): 74e4449

Readme add

Browse files

Signed-off-by: lordtt13 <thakurtanmay72@yahoo.com>

Files changed (1) hide show
  1. README.md +41 -0
README.md ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ inference: false
4
+ ---
5
+
6
+ ## T5-inshorts: T5 model trained on inshorts data
7
+
8
+ ### Details of T5
9
+
10
+ The **T5** model was presented in [Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer](https://arxiv.org/abs/1910.10683) 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:
11
+
12
+ 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.
13
+
14
+ ### Details of the downstream task (Summarization) - Dataset 📚
15
+
16
+ - The summarization data has been taken from [Inshorts News Data](https://www.kaggle.com/shashichander009/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.
17
+
18
+
19
+ ### Model training
20
+
21
+ The training script is present [here](https://github.com/lordtt13/transformers-experiments/blob/master/Custom%20Tasks/fine-tune-t5-for-summarization.ipynb).
22
+
23
+ ### Pipelining the Model
24
+
25
+ ```python
26
+ import transformers
27
+
28
+ model = transformers.T5ForConditionalGeneration.from_pretrained('lordtt13/t5-inshorts')
29
+
30
+ tokenizer = transformers.T5Tokenizer.from_pretrained("lordtt13/t5-inshorts")
31
+
32
+ nlp_fill = transformers.pipeline('summarization', model = model, tokenizer = tokenizer)
33
+ 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)
34
+
35
+ # Output:
36
+ # [{'summary_text': ': CBI books 4 ex-bank officials for cheating, forgery'}]
37
+ ```
38
+
39
+ > Created by [Tanmay Thakur](https://github.com/lordtt13) | [LinkedIn](https://www.linkedin.com/in/tanmay-thakur-6bb5a9154/)
40
+
41
+ > PS: Still looking for more resources to expand my expansion!