KipperDev commited on
Commit
5f5ad51
1 Parent(s): 30af36a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +101 -3
README.md CHANGED
@@ -6,9 +6,107 @@ language:
6
  - en
7
  metrics:
8
  - rouge
9
- pipeline_tag: summarization
10
  tags:
 
 
11
  - text summarization
12
- - summazation
13
  - abstractive summarization
14
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  - en
7
  metrics:
8
  - rouge
 
9
  tags:
10
+ - summarization
11
+ - summarizer
12
  - text summarization
 
13
  - abstractive summarization
14
+ pipeline_tag: summarization
15
+ ---
16
+
17
+ [![Generic badge](https://img.shields.io/badge/STATUS-WIP-yellow.svg)](https://shields.io/)
18
+
19
+ [![Open in Collab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1TWasAT17zU90CqgbK98ouDuBXXHtwbVL?usp=sharing)
20
+
21
+ # Table of Contents
22
+
23
+ 1. [Model Details](#model-details)
24
+ 2. [Usage](#usage)
25
+ 3. [Training Details](#training-details)
26
+ 4. [Training Results](#training-results)
27
+ 5. [Citation](#citation)
28
+ 6. [Author](#model-card-authors)
29
+
30
+ # Model Details
31
+
32
+ This variant of the [facebook/bart-base](https://huggingface.co/facebook/bart-base) model, is fine-tuned specifically for the task of text summarization. This model aims to generate concise, coherent, and informative summaries from extensive text documents, leveraging the power of the T5's text-to-text approach.
33
+
34
+ # Usage
35
+
36
+ This model is intended for use in summarizing long-form texts into concise, informative abstracts. It's particularly useful for professionals and researchers who need to quickly grasp the essence of detailed reports, research papers, or articles without reading the entire text.
37
+
38
+ ## Get Started
39
+
40
+ Install with `pip`:
41
+
42
+ ```bash
43
+ pip install transformers
44
+ ```
45
+
46
+ Use in python:
47
+
48
+ ```python
49
+ from transformers import pipeline
50
+ from transformers import AutoTokenizer
51
+ from transformers import AutoModelForSeq2SeqLM
52
+
53
+ model_name = "KipperDev/bart_summarizer_model"
54
+
55
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
56
+ model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
57
+ summarizer = pipeline("summarization", model=model, tokenizer=tokenizer)
58
+
59
+ # Example usage
60
+ prefix = "summarize: "
61
+ input_text = "Your input text here."
62
+ input_ids = tokenizer.encode(prefix + input_text, return_tensors="pt")
63
+ summary_ids = model.generate(input_ids)
64
+ summary = tokenizer.decode(summary_ids[0], skip_special_tokens=True)
65
+
66
+ print(summary)
67
+ ```
68
+
69
+ **NOTE THAT FOR THE MODEL TO WORK AS INTENDED, YOU NEED TO APPEND THE 'summarize:' PREFIX BEFORE THE INPUT DATA**
70
+
71
+ # Training Details
72
+
73
+ ## Training Data
74
+
75
+ The model was trained using the [Big Patent Dataset](https://huggingface.co/datasets/big_patent), comprising 1.3 million US patent documents and their corresponding human-written summaries. This dataset was chosen for its rich language and complex structure, representative of the challenging nature of document summarization tasks.
76
+
77
+ Training involved multiple subsets of the dataset to ensure broad coverage and robust model performance across varied document types.
78
+
79
+ ## Training Procedure
80
+
81
+ Training was conducted over three rounds, with initial settings including a learning rate of 0.00002, batch size of 8, and 4 epochs. Subsequent rounds adjusted these parameters to refine model performance further, for respectively 0.0003, 8 and 12. As well, a linear decay learning rate schedule was applied to enhance model learning efficiency over time.
82
+
83
+ # Training results
84
+
85
+ Model performance was evaluated using the ROUGE metric, highlighting its capability to generate summaries closely aligned with human-written abstracts.
86
+
87
+ | **Metric** | **Value** |
88
+ |-----------------------------------------|------------|
89
+ | Evaluation Loss (Eval Loss) | 1.9244 |
90
+ | Rouge-1 | 0.5007 |
91
+ | Rouge-2 | 0.2704 |
92
+ | Rouge-L | 0.3627 |
93
+ | Rouge-Lsum | 0.3636 |
94
+ | Average Generation Length (Gen Len) | 122.1489 |
95
+ | Runtime (seconds) | 1459.3826 |
96
+ | Samples per Second | 1.312 |
97
+ | Steps per Second | 0.164 |
98
+
99
+
100
+ # Citation
101
+
102
+ **BibTeX:**
103
+
104
+ ```bibtex
105
+ @article{kipper_t5_summarizer,
106
+ // SOON
107
+ }
108
+ ```
109
+
110
+ # Authors
111
+
112
+ This model card was written by [Fernanda Kipper](https://www.fernandakipper.com/)