Update README.md
Browse files
README.md
CHANGED
@@ -28,71 +28,43 @@ inference: false
|
|
28 |
</p>
|
29 |
|
30 |
<div style="margin:auto; text-align:center">
|
31 |
-
<h1 style="margin-bottom: 0; font-size:
|
32 |
-
<em style="font-size:
|
33 |
</div>
|
34 |
|
35 |
This model is a fine-tuned version of [BramVanroy/GEITje-7B-ultra](https://huggingface.co/BramVanroy/GEITje-7B-ultra) on the [snoels/FinGEITje-sft](https://huggingface.co/datasets/snoels/FinGEITje-sft) dataset.
|
36 |
|
37 |
-
It achieves the following results on the evaluation set:
|
38 |
-
- **Loss**: 0.3928
|
39 |
-
|
40 |
## Model Description
|
41 |
|
42 |
-
FinGEITje 7B is a large open Dutch financial language model with 7 billion parameters, based on Mistral 7B. It has been further trained on Dutch financial texts, enhancing its proficiency in the Dutch language and its knowledge of financial topics. As a result, FinGEITje provides more accurate and relevant responses in the domain of finance
|
43 |
-
|
44 |
-
FinGEITje builds upon the foundation of GEITje models, which are Dutch language models based on Mistral 7B and have been further pretrained on extensive Dutch corpora.
|
45 |
-
|
46 |
-
## Intended Uses & Limitations
|
47 |
-
|
48 |
-
### Intended Use
|
49 |
-
|
50 |
-
- **Educational Purposes**: Researching Dutch financial language patterns, generating financial texts for study, or aiding in financial education.
|
51 |
-
- **Content Generation**: Assisting in drafting Dutch financial reports, summaries, articles, or other finance-related content.
|
52 |
-
- **Financial Chatbots**: Integrating into chatbots to provide responses related to Dutch financial matters, customer service, or financial advice simulations.
|
53 |
-
- **Financial Analysis**: Supporting analysis by generating insights or summarizing financial data in Dutch.
|
54 |
-
|
55 |
-
### Limitations
|
56 |
-
|
57 |
-
- **Not for Real-time Financial Decisions**: The model does not have access to real-time data and may not reflect the most current financial regulations or market conditions. It should not be used for making actual financial decisions.
|
58 |
-
- **Accuracy**: While trained on financial data, the model may still produce incorrect or nonsensical answers, especially for prompts outside its training scope.
|
59 |
-
- **Bias**: The model may reflect biases present in its training data, potentially affecting the neutrality of its responses.
|
60 |
-
- **Ethical Use**: Users should ensure that the model's outputs comply with ethical standards and do not promote misinformation or harmful content.
|
61 |
-
|
62 |
-
### Ethical Considerations
|
63 |
-
|
64 |
-
- **License Restrictions**: FinGEITje is released under a non-commercial license (CC BY-NC 4.0). Commercial use is prohibited without obtaining proper permissions.
|
65 |
-
- **Misinformation**: Users should verify the information generated by the model, particularly for critical applications.
|
66 |
-
- **Data Privacy**: The model should not be used to generate or infer personal identifiable information or confidential data.
|
67 |
|
68 |
## Training and Evaluation Data
|
69 |
|
70 |
### Training Data
|
71 |
|
72 |
-
FinGEITje 7B was fine-tuned on the [snoels/FinGEITje-sft](https://huggingface.co/datasets/snoels/FinGEITje-sft) dataset, which consists of translated and processed Dutch financial texts. This dataset includes a wide range of financial topics and instruction tuning data
|
73 |
|
74 |
#### Data Processing Steps
|
75 |
|
76 |
1. **Translation**: Original instruction tuning datasets were translated into Dutch using a specialized translation service to maintain the integrity of financial terminology.
|
77 |
2. **Post-processing**: The translated data underwent post-processing to correct any translation inconsistencies and to format it according to the original dataset structure.
|
78 |
3. **Formatting**: The data was formatted to match the style and requirements of instruction tuning datasets, ensuring compatibility with the fine-tuning process.
|
79 |
-
4. **Filtering**: A Dutch language check and predefined validation checks were applied to filter out any low-quality or irrelevant data
|
80 |
|
81 |
### Evaluation Data
|
82 |
|
83 |
The model was evaluated using:
|
84 |
|
85 |
-
- **[snoels/FinDutchBench](https://huggingface.co/datasets/snoels/FinDutchBench)**: A Dutch financial benchmark dataset designed to assess the model's performance on various financial tasks.
|
86 |
|
87 |
## Training Procedure
|
88 |
|
89 |
-
FinGEITje was trained following the methodology described in the [Alignment Handbook](https://github.com/huggingface/alignment-handbook)
|
90 |
|
91 |
### Training Configuration
|
92 |
|
93 |
-
- The training configuration is based on the recipe outlined in the alignment handbook and can be found in the
|
94 |
- The model was further trained using **QLoRA** (Quantized LoRA) for efficient fine-tuning with reduced computational resources.
|
95 |
-
- Training was conducted on a multi-GPU setup to handle the large model size and extensive dataset.
|
96 |
|
97 |
### Training Hyperparameters
|
98 |
|
@@ -120,8 +92,8 @@ The following hyperparameters were used during training:
|
|
120 |
|
121 |
The evaluation package includes a set of metrics defined per task, grouped per dataset to evaluate the model's performance across different financial domains. The evaluation notebooks are available:
|
122 |
|
123 |
-
- **[Evaluation in Dutch](https://github.com/
|
124 |
-
- **[Evaluation in English](https://github.com/
|
125 |
|
126 |
### Framework Versions
|
127 |
|
@@ -156,7 +128,7 @@ tokenizer = AutoTokenizer.from_pretrained("BramVanroy/GEITje-7B-ultra", use_fast
|
|
156 |
base_model = AutoModelForCausalLM.from_pretrained("BramVanroy/GEITje-7B-ultra", device_map='auto')
|
157 |
|
158 |
# Load the FinGEITje model with PEFT adapters
|
159 |
-
model = PeftModel.from_pretrained(base_model, "snoels/FinGEITje-7B", device_map='auto')
|
160 |
```
|
161 |
|
162 |
### Generating Text
|
@@ -173,34 +145,6 @@ response = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
|
173 |
print(response)
|
174 |
```
|
175 |
|
176 |
-
### Interactive Conversation
|
177 |
-
|
178 |
-
```python
|
179 |
-
from transformers import pipeline, Conversation
|
180 |
-
|
181 |
-
# Initialize the conversational pipeline
|
182 |
-
chatbot = pipeline(
|
183 |
-
"conversational",
|
184 |
-
model=model,
|
185 |
-
tokenizer=tokenizer,
|
186 |
-
device_map='auto'
|
187 |
-
)
|
188 |
-
|
189 |
-
# Start a conversation
|
190 |
-
start_messages = [
|
191 |
-
{"role": "system", "content": "Je bent een behulpzame financiële assistent."},
|
192 |
-
{"role": "user", "content": "Kun je me iets vertellen over de huidige rentevoeten voor hypotheekleningen in Nederland?"}
|
193 |
-
]
|
194 |
-
|
195 |
-
conversation = Conversation()
|
196 |
-
for msg in start_messages:
|
197 |
-
conversation.add_message(**msg)
|
198 |
-
|
199 |
-
# Get the assistant's response
|
200 |
-
response = chatbot(conversation)
|
201 |
-
print(response)
|
202 |
-
```
|
203 |
-
|
204 |
## Limitations and Future Work
|
205 |
|
206 |
While FinGEITje 7B demonstrates significant improvements in understanding and generating Dutch financial content, certain limitations exist:
|
@@ -209,6 +153,8 @@ While FinGEITje 7B demonstrates significant improvements in understanding and ge
|
|
209 |
- **Accuracy Concerns**: The model may generate incorrect or outdated information. Users should verify critical information with reliable sources.
|
210 |
- **Biases**: Potential biases in the training data may affect the neutrality and fairness of the model's responses.
|
211 |
- **Language Scope**: Primarily designed for Dutch; performance in other languages is not optimized.
|
|
|
|
|
212 |
|
213 |
### Future Work
|
214 |
|
@@ -223,7 +169,7 @@ We would like to thank:
|
|
223 |
|
224 |
- **Rijgersberg** ([GitHub](https://github.com/Rijgersberg)) for creating [GEITje](https://github.com/Rijgersberg/GEITje), one of the first Dutch foundation models, and for contributing significantly to the development of Dutch language models.
|
225 |
- **Bram Vanroy** ([GitHub](https://github.com/BramVanroy)) for creating [GEITje-7B-ultra](https://huggingface.co/BramVanroy/GEITje-7B-ultra), an open-source Dutch chat model, and for sharing training, translation, and evaluation resources.
|
226 |
-
- **Contributors of the Alignment Handbook** for providing valuable resources that guided the development and training process of FinGEITje.
|
227 |
|
228 |
## Citation
|
229 |
|
@@ -243,13 +189,6 @@ If you use FinGEITje in your work, please cite:
|
|
243 |
|
244 |
This model is licensed under the [Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)](https://creativecommons.org/licenses/by-nc/4.0/) license.
|
245 |
|
246 |
-
### Summary
|
247 |
-
|
248 |
-
- **Attribution**: You must give appropriate credit, provide a link to the license, and indicate if changes were made.
|
249 |
-
- **NonCommercial**: You may not use the material for commercial purposes.
|
250 |
-
|
251 |
-
For the full license text, please refer to the [license document](https://creativecommons.org/licenses/by-nc/4.0/legalcode).
|
252 |
-
|
253 |
## Contact
|
254 |
|
255 |
For any inquiries or questions, please contact [Sander Noels](mailto:sander.noels@ugent.be).
|
|
|
28 |
</p>
|
29 |
|
30 |
<div style="margin:auto; text-align:center">
|
31 |
+
<h1 style="margin-bottom: 0; font-size: 3em;">🐐 FinGEITje 7B</h1>
|
32 |
+
<em style="font-size: 1em;">A large open Dutch Financial language model.</em>
|
33 |
</div>
|
34 |
|
35 |
This model is a fine-tuned version of [BramVanroy/GEITje-7B-ultra](https://huggingface.co/BramVanroy/GEITje-7B-ultra) on the [snoels/FinGEITje-sft](https://huggingface.co/datasets/snoels/FinGEITje-sft) dataset.
|
36 |
|
|
|
|
|
|
|
37 |
## Model Description
|
38 |
|
39 |
+
FinGEITje 7B is a large open Dutch financial language model with 7 billion parameters, based on Mistral 7B. It has been further trained on Dutch financial texts, enhancing its proficiency in the Dutch language and its knowledge of financial topics. As a result, FinGEITje provides more accurate and relevant responses in the domain of finance.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
## Training and Evaluation Data
|
42 |
|
43 |
### Training Data
|
44 |
|
45 |
+
FinGEITje 7B was fine-tuned on the [snoels/FinGEITje-sft](https://huggingface.co/datasets/snoels/FinGEITje-sft) dataset, which consists of translated and processed Dutch financial texts. This dataset includes a wide range of financial topics and instruction tuning data.
|
46 |
|
47 |
#### Data Processing Steps
|
48 |
|
49 |
1. **Translation**: Original instruction tuning datasets were translated into Dutch using a specialized translation service to maintain the integrity of financial terminology.
|
50 |
2. **Post-processing**: The translated data underwent post-processing to correct any translation inconsistencies and to format it according to the original dataset structure.
|
51 |
3. **Formatting**: The data was formatted to match the style and requirements of instruction tuning datasets, ensuring compatibility with the fine-tuning process.
|
52 |
+
4. **Filtering**: A Dutch language check and predefined validation checks were applied to filter out any low-quality or irrelevant data.
|
53 |
|
54 |
### Evaluation Data
|
55 |
|
56 |
The model was evaluated using:
|
57 |
|
58 |
+
- **[snoels/FinDutchBench](https://huggingface.co/datasets/snoels/FinDutchBench)**: A Dutch financial benchmark dataset designed to assess the model's performance on various financial tasks.
|
59 |
|
60 |
## Training Procedure
|
61 |
|
62 |
+
FinGEITje was trained following the methodology described in the [Alignment Handbook](https://github.com/huggingface/alignment-handbook).
|
63 |
|
64 |
### Training Configuration
|
65 |
|
66 |
+
- The training configuration is based on the recipe outlined in the alignment handbook and can be found in the [config_qlora.yaml](https://github.com/snoels/fingeit/blob/master/src/training/sft/config_qlora.yaml) file.
|
67 |
- The model was further trained using **QLoRA** (Quantized LoRA) for efficient fine-tuning with reduced computational resources.
|
|
|
68 |
|
69 |
### Training Hyperparameters
|
70 |
|
|
|
92 |
|
93 |
The evaluation package includes a set of metrics defined per task, grouped per dataset to evaluate the model's performance across different financial domains. The evaluation notebooks are available:
|
94 |
|
95 |
+
- **[Evaluation in Dutch](https://github.com/snoels/fingeit/blob/master/notebooks/evaluation_nl.ipynb)**: Assesses the model's performance on the Dutch financial benchmark dataset.
|
96 |
+
- **[Evaluation in English](https://github.com/snoels/fingeit/blob/master/notebooks/evaluation_en.ipynb)**: Evaluates the model's performance on English financial benchmarks for comparison purposes.
|
97 |
|
98 |
### Framework Versions
|
99 |
|
|
|
128 |
base_model = AutoModelForCausalLM.from_pretrained("BramVanroy/GEITje-7B-ultra", device_map='auto')
|
129 |
|
130 |
# Load the FinGEITje model with PEFT adapters
|
131 |
+
model = PeftModel.from_pretrained(base_model, "snoels/FinGEITje-7B-sft", device_map='auto')
|
132 |
```
|
133 |
|
134 |
### Generating Text
|
|
|
145 |
print(response)
|
146 |
```
|
147 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
148 |
## Limitations and Future Work
|
149 |
|
150 |
While FinGEITje 7B demonstrates significant improvements in understanding and generating Dutch financial content, certain limitations exist:
|
|
|
153 |
- **Accuracy Concerns**: The model may generate incorrect or outdated information. Users should verify critical information with reliable sources.
|
154 |
- **Biases**: Potential biases in the training data may affect the neutrality and fairness of the model's responses.
|
155 |
- **Language Scope**: Primarily designed for Dutch; performance in other languages is not optimized.
|
156 |
+
- **Ethical Use**: Users should ensure that the model's outputs comply with ethical standards and do not promote misinformation or harmful content.
|
157 |
+
|
158 |
|
159 |
### Future Work
|
160 |
|
|
|
169 |
|
170 |
- **Rijgersberg** ([GitHub](https://github.com/Rijgersberg)) for creating [GEITje](https://github.com/Rijgersberg/GEITje), one of the first Dutch foundation models, and for contributing significantly to the development of Dutch language models.
|
171 |
- **Bram Vanroy** ([GitHub](https://github.com/BramVanroy)) for creating [GEITje-7B-ultra](https://huggingface.co/BramVanroy/GEITje-7B-ultra), an open-source Dutch chat model, and for sharing training, translation, and evaluation resources.
|
172 |
+
- **Contributors of the [Alignment Handbook](https://github.com/huggingface/alignment-handbook)** for providing valuable resources that guided the development and training process of FinGEITje.
|
173 |
|
174 |
## Citation
|
175 |
|
|
|
189 |
|
190 |
This model is licensed under the [Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)](https://creativecommons.org/licenses/by-nc/4.0/) license.
|
191 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
## Contact
|
193 |
|
194 |
For any inquiries or questions, please contact [Sander Noels](mailto:sander.noels@ugent.be).
|