MikaSie commited on
Commit
a1489ce
1 Parent(s): fdc048e

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +89 -58
README.md CHANGED
@@ -1,79 +1,110 @@
1
  ---
2
- base_model: meta-llama/Meta-Llama-3-8B
3
- datasets:
4
- - eur-lex-sum
5
- library_name: peft
6
- license: llama3
7
  tags:
8
- - trl
9
- - sft
10
- - generated_from_trainer
 
11
  model-index:
12
- - name: LLama3_no_extraction_V2
13
- results: []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  ---
15
 
16
- <!-- This model card has been generated automatically according to the information the Trainer had access to. You
17
- should probably proofread and complete it, then remove this comment. -->
18
 
19
- # LLama3_no_extraction_V2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
 
21
- This model is a fine-tuned version of [meta-llama/Meta-Llama-3-8B](https://huggingface.co/meta-llama/Meta-Llama-3-8B) on the eur-lex-sum dataset.
22
- It achieves the following results on the evaluation set:
23
- - Loss: 1.1678
 
 
 
 
 
 
 
 
 
24
 
25
- ## Model description
26
 
27
- More information needed
28
 
29
- ## Intended uses & limitations
30
 
31
- More information needed
32
 
33
- ## Training and evaluation data
 
34
 
35
- More information needed
 
 
 
 
 
 
36
 
37
- ## Training procedure
38
 
39
- ### Training hyperparameters
40
 
41
- The following hyperparameters were used during training:
42
- - learning_rate: 5e-05
43
- - train_batch_size: 2
44
- - eval_batch_size: 1
45
- - seed: 42
46
- - distributed_type: multi-GPU
47
- - num_devices: 4
48
- - gradient_accumulation_steps: 2
49
- - total_train_batch_size: 16
50
- - total_eval_batch_size: 4
51
- - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
52
- - lr_scheduler_type: linear
53
- - lr_scheduler_warmup_ratio: 0.1
54
- - num_epochs: 40
55
 
56
- ### Training results
 
57
 
58
- | Training Loss | Epoch | Step | Validation Loss |
59
- |:-------------:|:-------:|:----:|:---------------:|
60
- | No log | 0.9927 | 68 | 4.4449 |
61
- | No log | 2.0 | 137 | 1.2067 |
62
- | No log | 2.9927 | 205 | 1.1637 |
63
- | No log | 4.0 | 274 | 1.1201 |
64
- | No log | 4.9927 | 342 | 1.1205 |
65
- | No log | 6.0 | 411 | 1.1096 |
66
- | No log | 6.9927 | 479 | 1.1154 |
67
- | 2.3119 | 8.0 | 548 | 1.1304 |
68
- | 2.3119 | 8.9927 | 616 | 1.1343 |
69
- | 2.3119 | 10.0 | 685 | 1.1357 |
70
- | 2.3119 | 10.9927 | 753 | 1.1678 |
71
 
 
 
72
 
73
- ### Framework versions
74
 
75
- - PEFT 0.11.1
76
- - Transformers 4.41.2
77
- - Pytorch 2.3.1+cu121
78
- - Datasets 2.20.0
79
- - Tokenizers 0.19.1
 
1
  ---
2
+ base_model: LLama3
3
+ datasets: dennlinger/eur-lex-sum
4
+ language: en
5
+ pipeline_tag: summarization
 
6
  tags:
7
+ - summarization
8
+ - abstractive
9
+ - hybrid
10
+ - multistep
11
  model-index:
12
+ - name: BART
13
+ results:
14
+ - task:
15
+ type: summarization
16
+ name: Long, Legal Document Summarization
17
+ dataset:
18
+ name: eur-lex-sum
19
+ type: dennlinger/eur-lex-sum
20
+ metrics:
21
+ - type: ROUGE-1
22
+ value: 0.0
23
+ - type: ROUGE-2
24
+ value: 0.0
25
+ - type: ROUGE-L
26
+ value: 0.0
27
+ - type: BERTScore
28
+ value: 0.0
29
+ - type: BARTScore
30
+ value: -5.38701422259001
31
+ - type: BLANC
32
+ value: 0.0
33
  ---
34
 
35
+ # Model Card for LLama3_no_extraction_V2
 
36
 
37
+ ## Model Details
38
+ ---
39
+ ### Model Description
40
+
41
+ This model is a fine-tuned version of LLama3. The research involves a multi-step summarization approach to long, legal documents. Many decisions in the renewables energy space are heavily dependent on regulations. But these regulations are often long and complicated. The proposed architecture first uses one or more extractive summarization steps to compress the source text, before the final summary is created by the abstractive summarization model. This fine-tuned abstractive model has been trained on a dataset, pre-processed through extractive summarization by No extractive model with No ratio ratio. The research has used multiple extractive-abstractive model combinations, which can be found on https://huggingface.co/MikaSie. To obtain optimal results, feed the model an extractive summary as input as it was designed this way!
42
+
43
+ The dataset used by this model is the [EUR-lex-sum](https://huggingface.co/datasets/dennlinger/eur-lex-sum) dataset. The evaluation metrics can be found in the metadata of this model card.
44
+ This paper was introduced by the master thesis of Mika Sie at the University Utrecht in collaboration with Power2x. More information can be found in PAPER_LINK.
45
+
46
+ - **Developed by:** Mika Sie
47
+ - **Funded by:** University Utrecht & Power2X
48
+ - **Language (NLP):** English
49
+ - **Finetuned from model:** LLama3
50
+
51
+
52
+ ### Model Sources
53
+
54
+ - **Repository**: https://github.com/MikaSie/Thesis
55
+ - **Paper**: PAPER_LINK
56
+ - **Streamlit demo**: STREAMLIT_LINK
57
 
58
+ ## Uses
59
+ ---
60
+ ### Direct Use
61
+
62
+ This model can be directly used for summarizing long, legal documents. However, it is recommended to first use an extractive summarization tool, such as No extractive model, to compress the source text before feeding it to this model. This model has been specifically designed to work with extractive summaries.
63
+ An example using the Huggingface pipeline could be:
64
+
65
+ ```python
66
+ pip install bert-extractive-summarizer
67
+
68
+ from summarizer import Summarizer
69
+ from transformers import pipeline
70
 
71
+ extractive_model = Summarizer()
72
 
73
+ text = 'Original document text to be summarized'
74
 
75
+ extractive_summary = Summarizer(text)
76
 
77
+ abstractive_model = pipeline('summarization', model = 'MikaSie/LLama3_no_extraction_V2', tokenizer = 'MikaSie/LLama3_no_extraction_V2')
78
 
79
+ result = pipeline(extractive_summary)
80
+ ```
81
 
82
+ But more information of implementation can be found in the Thesis report.
83
+ ### Out-of-Scope Use
84
+
85
+ Using this model without an extractive summarization step may not yield optimal results. It is recommended to follow the proposed multi-step summarization approach outlined in the model description for best performance.
86
+
87
+ ## Bias, Risks, and Limitations
88
+ ---
89
 
90
+ ### Bias
91
 
92
+ As with any language model, this model may inherit biases present in the training data. It is important to be aware of potential biases in the source text and to critically evaluate the generated summaries.
93
 
94
+ ### Risks
 
 
 
 
 
 
 
 
 
 
 
 
 
95
 
96
+ - The model may not always generate accurate or comprehensive summaries, especially for complex legal documents.
97
+ - The model may not generate truthful information.
98
 
99
+ ### Limitations
 
 
 
 
 
 
 
 
 
 
 
 
100
 
101
+ - The model may produce summaries that are overly abstractive or fail to capture important details.
102
+ - The model's performance may vary depending on the quality and relevance of the extractive summaries used as input.
103
 
104
+ ### Recommendations
105
 
106
+ - Carefully review and validate the generated summaries before relying on them for critical tasks.
107
+ - Consider using the model in conjunction with human review or other validation mechanisms to ensure the accuracy and completeness of the summaries.
108
+ - Experiment with different extractive summarization models or techniques to find the most suitable input for the abstractive model.
109
+ - Provide feedback and contribute to the ongoing research and development of the model to help improve its performance and address its limitations.
110
+ - Any actions taken based on this content are at your own risk.