ashaduzzaman commited on
Commit
4a969cc
1 Parent(s): 31e32c8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +90 -36
README.md CHANGED
@@ -9,60 +9,114 @@ metrics:
9
  model-index:
10
  - name: t5-small-finetuned-billsum
11
  results: []
 
 
 
 
 
12
  ---
13
 
14
  <!-- This model card has been generated automatically according to the information the Trainer had access to. You
15
  should probably proofread and complete it, then remove this comment. -->
16
 
 
17
  # t5-small-finetuned-billsum
18
 
19
- This model is a fine-tuned version of [google-t5/t5-small](https://huggingface.co/google-t5/t5-small) on an unknown dataset.
20
- It achieves the following results on the evaluation set:
21
- - Loss: 2.5533
22
- - Rouge1: 0.1356
23
- - Rouge2: 0.0495
24
- - Rougel: 0.1144
25
- - Rougelsum: 0.1144
26
- - Gen Len: 19.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
- ## Model description
29
 
30
- More information needed
31
 
32
- ## Intended uses & limitations
33
 
34
- More information needed
 
 
 
 
 
 
 
35
 
36
- ## Training and evaluation data
37
 
38
- More information needed
 
 
 
 
39
 
40
- ## Training procedure
41
 
42
- ### Training hyperparameters
 
 
 
43
 
44
- The following hyperparameters were used during training:
45
- - learning_rate: 2e-05
46
- - train_batch_size: 16
47
- - eval_batch_size: 16
48
- - seed: 42
49
- - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
50
- - lr_scheduler_type: linear
51
- - num_epochs: 3
52
- - mixed_precision_training: Native AMP
53
 
54
- ### Training results
 
55
 
56
- | Training Loss | Epoch | Step | Validation Loss | Rouge1 | Rouge2 | Rougel | Rougelsum | Gen Len |
57
- |:-------------:|:-----:|:----:|:---------------:|:------:|:------:|:------:|:---------:|:-------:|
58
- | No log | 1.0 | 62 | 2.6711 | 0.1308 | 0.0445 | 0.1107 | 0.1109 | 19.0 |
59
- | No log | 2.0 | 124 | 2.5761 | 0.1338 | 0.0483 | 0.1137 | 0.1137 | 19.0 |
60
- | No log | 3.0 | 186 | 2.5533 | 0.1356 | 0.0495 | 0.1144 | 0.1144 | 19.0 |
61
 
 
 
 
62
 
63
- ### Framework versions
 
 
 
64
 
65
- - Transformers 4.42.4
66
- - Pytorch 2.3.1+cu121
67
- - Datasets 2.21.0
68
- - Tokenizers 0.19.1
 
 
 
 
 
 
9
  model-index:
10
  - name: t5-small-finetuned-billsum
11
  results: []
12
+ datasets:
13
+ - Helsinki-NLP/opus_books
14
+ language:
15
+ - en
16
+ pipeline_tag: summarization
17
  ---
18
 
19
  <!-- This model card has been generated automatically according to the information the Trainer had access to. You
20
  should probably proofread and complete it, then remove this comment. -->
21
 
22
+
23
  # t5-small-finetuned-billsum
24
 
25
+ This model is a fine-tuned version of [google/t5-small](https://huggingface.co/google/t5-small) on a custom dataset related to legislative bill summarization. It is optimized for generating concise summaries of legislative bills and other similar documents.
26
+
27
+ ## Model Details
28
+
29
+ - **Model Name:** t5-small-finetuned-billsum
30
+ - **Base Model:** [google/t5-small](https://huggingface.co/google/t5-small)
31
+ - **Model Type:** Transformer-based Text-to-Text Generation Model
32
+ - **Fine-tuned on:** Legislative bill texts
33
+
34
+ ### Model Description
35
+
36
+ This model leverages the T5 (Text-to-Text Transfer Transformer) architecture, which treats all NLP tasks as text-to-text tasks, enabling it to handle a wide range of natural language understanding and generation tasks. The T5-small version is a smaller variant of the T5 model, making it more computationally efficient while still delivering reasonable performance. This fine-tuned model is specifically trained to summarize legislative bills, capturing essential details and providing concise summaries.
37
+
38
+ ### Intended Uses & Limitations
39
+
40
+ **Intended Uses:**
41
+ - Summarizing legislative bills and related legal documents.
42
+ - Extracting key information from long legal texts.
43
+ - Assisting in the quick review of bill content for policymakers, legal professionals, and researchers.
44
+
45
+ **Limitations:**
46
+ - The model may not capture all nuances of highly complex legal language.
47
+ - It may omit important details if they are not prevalent in the training data.
48
+ - It is not designed for tasks outside summarization of legislative content.
49
+ - The quality of summaries depends on the quality and relevance of the input data.
50
+
51
+ ### Training and Evaluation Data
52
+
53
+ The model was fine-tuned using a dataset derived from legislative bills. The specific dataset used for training is not explicitly mentioned, but it likely consists of publicly available legislative texts. The evaluation metrics (Rouge scores) indicate the model's performance on generating summaries.
54
+
55
+ ### Evaluation Results
56
+
57
+ The model achieved the following results on the evaluation set:
58
+
59
+ - **Loss:** 2.5533
60
+ - **ROUGE-1:** 0.1356
61
+ - **ROUGE-2:** 0.0495
62
+ - **ROUGE-L:** 0.1144
63
+ - **ROUGE-Lsum:** 0.1144
64
+ - **Generated Summary Length (Gen Len):** 19.0
65
+
66
+ These scores suggest moderate summarization performance, with room for improvement in capturing more comprehensive content.
67
 
68
+ ### Training Procedure
69
 
70
+ The model was trained using the following hyperparameters and setup:
71
 
72
+ #### Training Hyperparameters
73
 
74
+ - **Learning Rate:** 2e-05
75
+ - **Training Batch Size:** 16
76
+ - **Evaluation Batch Size:** 16
77
+ - **Random Seed:** 42
78
+ - **Optimizer:** Adam (betas=(0.9, 0.999), epsilon=1e-08)
79
+ - **Learning Rate Scheduler:** Linear
80
+ - **Number of Epochs:** 3
81
+ - **Mixed Precision Training:** Native AMP (Automatic Mixed Precision)
82
 
83
+ #### Training Results
84
 
85
+ | Training Loss | Epoch | Step | Validation Loss | ROUGE-1 | ROUGE-2 | ROUGE-L | ROUGE-Lsum | Gen Len |
86
+ |:-------------:|:-----:|:----:|:---------------:|:-------:|:-------:|:-------:|:----------:|:-------:|
87
+ | No log | 1.0 | 62 | 2.6711 | 0.1308 | 0.0445 | 0.1107 | 0.1109 | 19.0 |
88
+ | No log | 2.0 | 124 | 2.5761 | 0.1338 | 0.0483 | 0.1137 | 0.1137 | 19.0 |
89
+ | No log | 3.0 | 186 | 2.5533 | 0.1356 | 0.0495 | 0.1144 | 0.1144 | 19.0 |
90
 
91
+ ### Framework Versions
92
 
93
+ - **Transformers:** 4.42.4
94
+ - **PyTorch:** 2.3.1+cu121
95
+ - **Datasets:** 2.21.0
96
+ - **Tokenizers:** 0.19.1
97
 
98
+ ### Ethical Considerations
 
 
 
 
 
 
 
 
99
 
100
+ - **Bias:** The model's summaries might reflect biases present in the training data, potentially affecting the representation of different topics or perspectives.
101
+ - **Data Privacy:** Ensure that the use of the model complies with data privacy regulations, especially when using it on sensitive or proprietary legislative documents.
102
 
103
+ ### Future Improvements
 
 
 
 
104
 
105
+ - Training on a larger and more diverse dataset of legislative texts could improve summarization quality.
106
+ - Fine-tuning further with domain-specific data may help capture nuanced legal language better.
107
+ - Incorporating additional evaluation metrics like BERTScore can provide a more comprehensive understanding of the model's performance.
108
 
109
+ ### Usage
110
+ You can use this model in a Hugging Face pipeline for various text-to-text tasks:
111
+ ```
112
+ from transformers import pipeline
113
 
114
+ translator = pipeline(
115
+ "summarization",
116
+ model="ashaduzzaman/t5-small-finetuned-billsum"
117
+ )
118
+ # Example usage: Summarization
119
+ input_text = "This is a long passage from a book that needs to be summarized."
120
+ summary = generator(input_text)
121
+ print(summary)
122
+ ```