seddiktrk commited on
Commit
7eae93e
1 Parent(s): 1efbfb4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +61 -18
README.md CHANGED
@@ -1,10 +1,16 @@
1
  ---
2
  base_model: google/pegasus-cnn_dailymail
3
- tags:
4
- - generated_from_trainer
5
  model-index:
6
  - name: pegasus-samsum
7
  results: []
 
 
 
 
 
 
 
 
8
  ---
9
 
10
  <!-- This model card has been generated automatically according to the information the Trainer had access to. You
@@ -12,25 +18,21 @@ should probably proofread and complete it, then remove this comment. -->
12
 
13
  # pegasus-samsum
14
 
15
- This model is a fine-tuned version of [google/pegasus-cnn_dailymail](https://huggingface.co/google/pegasus-cnn_dailymail) on an unknown dataset.
 
16
  It achieves the following results on the evaluation set:
17
  - Loss: 1.3839
18
 
19
- ## Model description
 
 
 
20
 
21
- More information needed
 
22
 
23
- ## Intended uses & limitations
24
-
25
- More information needed
26
-
27
- ## Training and evaluation data
28
-
29
- More information needed
30
-
31
- ## Training procedure
32
-
33
- ### Training hyperparameters
34
 
35
  The following hyperparameters were used during training:
36
  - learning_rate: 5e-05
@@ -44,7 +46,7 @@ The following hyperparameters were used during training:
44
  - lr_scheduler_warmup_steps: 500
45
  - num_epochs: 2
46
 
47
- ### Training results
48
 
49
  | Training Loss | Epoch | Step | Validation Loss |
50
  |:-------------:|:------:|:----:|:---------------:|
@@ -52,10 +54,51 @@ The following hyperparameters were used during training:
52
  | 1.4737 | 1.0861 | 1000 | 1.4040 |
53
  | 1.4735 | 1.6292 | 1500 | 1.3839 |
54
 
 
55
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  ### Framework versions
57
 
58
  - Transformers 4.44.0
59
  - Pytorch 2.4.0
60
  - Datasets 2.21.0
61
- - Tokenizers 0.19.1
 
1
  ---
2
  base_model: google/pegasus-cnn_dailymail
 
 
3
  model-index:
4
  - name: pegasus-samsum
5
  results: []
6
+ datasets:
7
+ - Samsung/samsum
8
+ language:
9
+ - en
10
+ metrics:
11
+ - rouge
12
+ pipeline_tag: summarization
13
+ library_name: transformers
14
  ---
15
 
16
  <!-- This model card has been generated automatically according to the information the Trainer had access to. You
 
18
 
19
  # pegasus-samsum
20
 
21
+ This model is a fine-tuned version of [google/pegasus-cnn_dailymail](https://huggingface.co/google/pegasus-cnn_dailymail) on
22
+ [SAMSum](https://huggingface.co/datasets/Samsung/samsum) dataset.
23
  It achieves the following results on the evaluation set:
24
  - Loss: 1.3839
25
 
26
+ # Intended uses & limitations
27
+ ## Intended uses:
28
+ * Dialogue summarization (e.g., chat logs, meetings)
29
+ * Text summarization for conversational datasets
30
 
31
+ ## Limitations:
32
+ * May struggle with very long conversations or non-dialogue text.
33
 
34
+ # Training procedure
35
+ ## Training hyperparameters
 
 
 
 
 
 
 
 
 
36
 
37
  The following hyperparameters were used during training:
38
  - learning_rate: 5e-05
 
46
  - lr_scheduler_warmup_steps: 500
47
  - num_epochs: 2
48
 
49
+ ## Training results
50
 
51
  | Training Loss | Epoch | Step | Validation Loss |
52
  |:-------------:|:------:|:----:|:---------------:|
 
54
  | 1.4737 | 1.0861 | 1000 | 1.4040 |
55
  | 1.4735 | 1.6292 | 1500 | 1.3839 |
56
 
57
+ ### Test results
58
 
59
+ | rouge1 | rouge2 | rougeL | rougeLsum Loss |
60
+ |:-------------:|:------:|:----:|:---------------:|
61
+ | 0.427614 | 0.200571 | 0.340648 | 0.340738 |
62
+
63
+ ## How to use
64
+ You can use this model with the transformers library for dialogue summarization. Here's an example in Python:
65
+
66
+ ```python
67
+ from transformers import pipeline
68
+ import torch
69
+
70
+ device = 0 if torch.cuda.is_available() else -1
71
+ pipe = pipeline("summarization",
72
+ model="seddiktrk/pegasus-samsum",
73
+ device=device)
74
+
75
+ custom_dialogue = """\
76
+ Seddik: Hey, have you tried using PEGASUS for summarization?
77
+ John: Yeah, I just started experimenting with it last week!
78
+ Seddik: It's pretty powerful, especially for abstractive summaries.
79
+ John: I agree! The results are really impressive.
80
+ Seddik: I was thinking of using it for my next project. Want to collaborate?
81
+ John: Absolutely! We could make some awesome improvements together.
82
+ Seddik: Perfect, let's brainstorm ideas this weekend.
83
+ John: Sounds like a plan!
84
+ """
85
+
86
+ # Summarize dialogue
87
+ gen_kwargs = {"length_penalty": 0.8, "num_beams":8, "max_length": 128}
88
+ print(pipe(custom_dialogue, **gen_kwargs)[0]["summary_text"])
89
+ ```
90
+ Example Output
91
+ ```
92
+ John started using PEG for summarization last week. Seddik is thinking of using it for his next project.
93
+ John and Seddik will brainstorm ideas this weekend.
94
+
95
+ ```
96
+
97
+
98
+
99
  ### Framework versions
100
 
101
  - Transformers 4.44.0
102
  - Pytorch 2.4.0
103
  - Datasets 2.21.0
104
+ - Tokenizers 0.19.1