Update README.md
Browse files
README.md
CHANGED
@@ -1,199 +1,113 @@
|
|
1 |
---
|
2 |
library_name: transformers
|
3 |
-
tags:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
---
|
5 |
|
6 |
-
|
7 |
|
8 |
-
|
|
|
|
|
9 |
|
|
|
10 |
|
|
|
11 |
|
12 |
-
##
|
13 |
-
|
14 |
-
### Model Description
|
15 |
-
|
16 |
-
<!-- Provide a longer summary of what this model is. -->
|
17 |
-
|
18 |
-
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
19 |
-
|
20 |
-
- **Developed by:** [More Information Needed]
|
21 |
-
- **Funded by [optional]:** [More Information Needed]
|
22 |
-
- **Shared by [optional]:** [More Information Needed]
|
23 |
-
- **Model type:** [More Information Needed]
|
24 |
-
- **Language(s) (NLP):** [More Information Needed]
|
25 |
-
- **License:** [More Information Needed]
|
26 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
27 |
-
|
28 |
-
### Model Sources [optional]
|
29 |
-
|
30 |
-
<!-- Provide the basic links for the model. -->
|
31 |
-
|
32 |
-
- **Repository:** [More Information Needed]
|
33 |
-
- **Paper [optional]:** [More Information Needed]
|
34 |
-
- **Demo [optional]:** [More Information Needed]
|
35 |
-
|
36 |
-
## Uses
|
37 |
-
|
38 |
-
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
39 |
-
|
40 |
-
### Direct Use
|
41 |
-
|
42 |
-
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
43 |
-
|
44 |
-
[More Information Needed]
|
45 |
-
|
46 |
-
### Downstream Use [optional]
|
47 |
-
|
48 |
-
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
49 |
-
|
50 |
-
[More Information Needed]
|
51 |
-
|
52 |
-
### Out-of-Scope Use
|
53 |
-
|
54 |
-
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
55 |
-
|
56 |
-
[More Information Needed]
|
57 |
-
|
58 |
-
## Bias, Risks, and Limitations
|
59 |
-
|
60 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
61 |
-
|
62 |
-
[More Information Needed]
|
63 |
-
|
64 |
-
### Recommendations
|
65 |
-
|
66 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
67 |
-
|
68 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
69 |
-
|
70 |
-
## How to Get Started with the Model
|
71 |
-
|
72 |
-
Use the code below to get started with the model.
|
73 |
-
|
74 |
-
[More Information Needed]
|
75 |
-
|
76 |
-
## Training Details
|
77 |
-
|
78 |
-
### Training Data
|
79 |
-
|
80 |
-
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
81 |
-
|
82 |
-
[More Information Needed]
|
83 |
-
|
84 |
-
### Training Procedure
|
85 |
-
|
86 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
87 |
-
|
88 |
-
#### Preprocessing [optional]
|
89 |
-
|
90 |
-
[More Information Needed]
|
91 |
-
|
92 |
-
|
93 |
-
#### Training Hyperparameters
|
94 |
-
|
95 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
96 |
-
|
97 |
-
#### Speeds, Sizes, Times [optional]
|
98 |
-
|
99 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
100 |
-
|
101 |
-
[More Information Needed]
|
102 |
-
|
103 |
-
## Evaluation
|
104 |
-
|
105 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
106 |
-
|
107 |
-
### Testing Data, Factors & Metrics
|
108 |
-
|
109 |
-
#### Testing Data
|
110 |
-
|
111 |
-
<!-- This should link to a Dataset Card if possible. -->
|
112 |
-
|
113 |
-
[More Information Needed]
|
114 |
-
|
115 |
-
#### Factors
|
116 |
-
|
117 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
118 |
-
|
119 |
-
[More Information Needed]
|
120 |
-
|
121 |
-
#### Metrics
|
122 |
-
|
123 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
124 |
-
|
125 |
-
[More Information Needed]
|
126 |
-
|
127 |
-
### Results
|
128 |
-
|
129 |
-
[More Information Needed]
|
130 |
-
|
131 |
-
#### Summary
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
## Model Examination [optional]
|
136 |
-
|
137 |
-
<!-- Relevant interpretability work for the model goes here -->
|
138 |
-
|
139 |
-
[More Information Needed]
|
140 |
-
|
141 |
-
## Environmental Impact
|
142 |
-
|
143 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
144 |
|
145 |
-
|
146 |
|
147 |
-
|
148 |
-
- **Hours used:** [More Information Needed]
|
149 |
-
- **Cloud Provider:** [More Information Needed]
|
150 |
-
- **Compute Region:** [More Information Needed]
|
151 |
-
- **Carbon Emitted:** [More Information Needed]
|
152 |
|
153 |
-
|
154 |
|
155 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
|
157 |
-
|
|
|
|
|
|
|
|
|
|
|
158 |
|
159 |
-
|
160 |
|
161 |
-
|
162 |
|
163 |
-
|
164 |
|
165 |
-
|
166 |
|
167 |
-
|
168 |
|
169 |
-
|
170 |
|
171 |
-
##
|
172 |
|
173 |
-
|
|
|
|
|
|
|
|
|
|
|
174 |
|
175 |
-
**
|
|
|
|
|
|
|
176 |
|
177 |
-
|
178 |
|
179 |
-
**
|
180 |
|
181 |
-
|
182 |
|
183 |
-
|
|
|
|
|
|
|
|
|
184 |
|
185 |
-
|
186 |
|
187 |
-
|
|
|
|
|
188 |
|
189 |
-
|
|
|
|
|
|
|
190 |
|
191 |
-
|
192 |
|
193 |
-
##
|
194 |
|
195 |
-
|
196 |
|
197 |
-
|
|
|
|
|
|
|
198 |
|
199 |
-
[More Information Needed]
|
|
|
1 |
---
|
2 |
library_name: transformers
|
3 |
+
tags:
|
4 |
+
- GDPR
|
5 |
+
- Law
|
6 |
+
- English
|
7 |
+
- Data Protection
|
8 |
+
license: mit
|
9 |
+
datasets:
|
10 |
+
- sims2k/GDPR_QA_instruct_dataset
|
11 |
+
language:
|
12 |
+
- en
|
13 |
+
metrics:
|
14 |
+
- bleu
|
15 |
+
- rouge
|
16 |
+
- meteor
|
17 |
+
- bertscore
|
18 |
+
base_model: Equall/Saul-7B-Instruct-v1
|
19 |
---
|
20 |
|
21 |
+
## **Model Overview**
|
22 |
|
23 |
+
**Model Name**: Equall/Saul-7B-Instruct-GDPR-v1
|
24 |
+
**Base Model**: Equall/Saul-7B-Instruct-v1
|
25 |
+
**Finetuning Method**: QLoRA (Quantized Low-Rank Adaptation)
|
26 |
|
27 |
+
Equall/Saul-7B-Instruct-GDPR-v1 is a fine-tuned version of the Equall/Saul-7B-Instruct-v1 model, specifically optimized for handling **GDPR compliance tasks**. The model is designed to generate accurate, legally grounded responses aligned with the General Data Protection Regulation (GDPR). It supports various compliance-related tasks such as data audits, legal advisory, and ensuring adherence to GDPR requirements for data controllers and processors.
|
28 |
|
29 |
+
---
|
30 |
|
31 |
+
## **GDPR Task Focus**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
+
The model is optimized to address detailed queries related to GDPR compliance, providing step-by-step instructions aligned with relevant GDPR articles. Below is an example illustrating how the model approaches a specific GDPR task related to conducting a Data Protection Impact Assessment (DPIA):
|
34 |
|
35 |
+
### Example Task: Conducting a Data Protection Impact Assessment (DPIA)
|
|
|
|
|
|
|
|
|
36 |
|
37 |
+
**Input**: What are the benefits of conducting a DPIA?
|
38 |
|
39 |
+
**Response**:
|
40 |
+
Conducting a **Data Protection Impact Assessment (DPIA)** provides several benefits in ensuring GDPR compliance:
|
41 |
+
1. **Identifying Risks**: DPIAs help identify and mitigate risks to individuals’ rights and freedoms by evaluating potential impacts on personal data processing activities.
|
42 |
+
2. **Accountability**: DPIAs demonstrate compliance with **GDPR Article 24(1)**, which requires controllers to implement appropriate technical and organizational measures to ensure and maintain data protection.
|
43 |
+
3. **Building Compliance**: Through a structured approach, DPIAs facilitate building compliance by identifying necessary measures for processing activities.
|
44 |
+
4. **Legal Basis**: A DPIA can serve as a legal basis for processing personal data, especially when dealing with special categories of data or large-scale monitoring (referencing **Article 6(1)(c)** and **Article 9(2)(i)**).
|
45 |
+
5. **Regulatory Compliance**: Meeting DPIA requirements helps prevent fines imposed by supervisory authorities for non-compliance with GDPR articles, including **Articles 35(1), (3)-(4)**, **Article 35(2)**, **Article 35(7)-(9)**, and **Article 36(3)(e)**.
|
46 |
|
47 |
+
**Relevant GDPR Articles**:
|
48 |
+
- **Article 35** (DPIA requirements)
|
49 |
+
- **Article 24** (Accountability of controllers)
|
50 |
+
- **Article 6(1)(c)** (Legal basis for processing)
|
51 |
+
- **Article 9(2)(i)** (Processing of special categories of data)
|
52 |
+
- **Article 36(3)(e)** (Consultation with supervisory authorities)
|
53 |
|
54 |
+
This demonstrates the model's capacity to generate structured, article-specific responses that assist organizations in navigating GDPR compliance tasks.
|
55 |
|
56 |
+
---
|
57 |
|
58 |
+
## **Fine-Tuning Methodology**
|
59 |
|
60 |
+
The fine-tuning of this model was conducted using **QLoRA** (Quantized Low-Rank Adaptation) to optimize model efficiency and accuracy, particularly when handling legal texts. QLoRA enabled the fine-tuning process to maintain a high level of performance while significantly reducing the computational load by quantizing the model weights to 4-bit precision.
|
61 |
|
62 |
+
Training was conducted using the **bwUniCluster 2.0 computing facility**, utilizing **Tesla V100 GPUs** for efficient training over multiple iterations. Each iteration aimed to improve the model’s capacity to understand and generate responses to GDPR-specific inquiries by referencing the appropriate articles of the regulation.
|
63 |
|
64 |
+
---
|
65 |
|
66 |
+
## **Datasets**
|
67 |
|
68 |
+
### **1. Training Dataset**
|
69 |
+
**Dataset Name**: sims2k/GDPR_QA_instruct_dataset
|
70 |
+
- **Number of Entries**: 316 Question-Answer pairs
|
71 |
+
- **Creation Method**: This dataset was synthetically generated using **ChatGPT-4** to create specialized Q&A pairs focused on GDPR compliance tasks. The dataset was carefully crafted by synthesizing information from trusted sources, including **GDPR articles**, **Legal FAQs**, and **Guidelines, Recommendations, and Best Practices from the European Data Protection Board (EDPB)**.
|
72 |
+
- **Advanced Prompt Engineering** techniques were employed, including **one-shot** and **chain-of-thought prompting**, to create precise, contextually relevant responses. The output generation was controlled using a **temperature setting of zero**, ensuring determinism and reliability in the responses.
|
73 |
+
- Each dataset entry was fact-checked for accuracy and cross-referenced with the related GDPR articles, ensuring legal validity and practical utility in real-world settings.
|
74 |
|
75 |
+
### **2. Evaluation Dataset**
|
76 |
+
**Dataset Name**: sims2k/GDPR_QA_instruct_eval_dataset
|
77 |
+
- **Number of Entries**: 63 Question-Answer pairs
|
78 |
+
- **Description**: This evaluation dataset was designed to rigorously test the model's ability to generalize its learning. Each entry focuses on unseen GDPR queries, ensuring the model’s ability to respond accurately to new contexts. The dataset was evaluated using advanced NLP metrics like **ROUGE**, **BLEU**, **METEOR**, and **BERTScore**, which help measure the structural and semantic quality of the responses.
|
79 |
|
80 |
+
---
|
81 |
|
82 |
+
## **Performance Metrics**
|
83 |
|
84 |
+
The model’s performance was assessed using advanced NLP metrics to evaluate both the quality of generated text and the adherence to legal standards in GDPR queries.
|
85 |
|
86 |
+
### **Metrics Used**:
|
87 |
+
1. **BLEU**: Measures precision by calculating n-gram overlap between the generated response and the reference text.
|
88 |
+
2. **ROUGE**: Focuses on recall, assessing how much of the reference content is captured in the generated response.
|
89 |
+
3. **METEOR**: Combines both precision and recall, weighting recall more heavily and evaluating the quality of text alignment.
|
90 |
+
4. **BERTScore**: Uses contextual embeddings to compare the generated and reference texts, focusing on semantic coherence.
|
91 |
|
92 |
+
The results are presented in the **Composite Scores for All Evaluated Models** graph below, showcasing the model’s performance across these metrics.
|
93 |
|
94 |
+
<p align="center">
|
95 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/653e07af6d28265c85c84f6b/O011sXNOkCMOVnT-QtQ8F.png" alt="image/png">
|
96 |
+
</p>
|
97 |
|
98 |
+
### **Understanding the Graph**:
|
99 |
+
- **Higher Composite Scores** represent a stronger performance in generating accurate, legally valid, and contextually appropriate responses.
|
100 |
+
- **Normalization** was applied to all metrics using **Min-Max scaling**, ensuring an equal contribution of each metric to the final score.
|
101 |
+
- **Equal Weighting** was used across metrics to provide a balanced assessment of the model’s capabilities.
|
102 |
|
103 |
+
---
|
104 |
|
105 |
+
## **Limitations and Future Work**
|
106 |
|
107 |
+
Despite its strong performance in GDPR compliance tasks, the model may face challenges in handling **edge cases** or **complex legal nuances**. The model's accuracy could further be improved by expanding the dataset to include additional legal scenarios and by incorporating domain-specific datasets from other regulatory frameworks.
|
108 |
|
109 |
+
Future improvements will focus on:
|
110 |
+
- Expanding the dataset size and diversity.
|
111 |
+
- Conducting more fine-tuning iterations to address subtle legal interpretations.
|
112 |
+
- Potentially integrating legal reasoning from other regulatory domains beyond GDPR.
|
113 |
|
|