This model is a fine-tuned version of
snoels/FinGEITje-7B-sft on the
BramVanroy/ultra_feedback_dutch dataset.
FinGEITje-7B-dpo is a large open Dutch financial language model with 7 billion parameters, based on Mistral 7B. It has been further trained using
Direct Preference Optimization (DPO) on AI-generated preference data, aligning the model's responses with human-like preferences in the Dutch language. This alignment process enhances the model's ability to generate more helpful, coherent, and user-aligned responses in financial contexts.
FinGEITje-7B-dpo was fine-tuned on the
BramVanroy/ultra_feedback_dutch dataset, which consists of synthetic preference data in Dutch. This dataset includes prompts along with preferred and less preferred responses, allowing the model to learn to generate more aligned responses through DPO.
FinGEITje-7B-dpo can be utilized using the Hugging Face Transformers library along with PEFT to load the adapters efficiently.
1from transformers import AutoTokenizer, AutoModelForCausalLM
2from peft import PeftModel
3
4# Load the tokenizer
5tokenizer = AutoTokenizer.from_pretrained("BramVanroy/GEITje-7B-ultra", use_fast=False)
6
7# Load the base model
8base_model = AutoModelForCausalLM.from_pretrained("BramVanroy/GEITje-7B-ultra", device_map='auto')
9
10# Load the FinGEITje-7B-dpo model with PEFT adapters
11model = PeftModel.from_pretrained(base_model, "snoels/FinGEITje-7B-dpo", device_map='auto')
1# Prepare the input
2input_text = "Wat zijn de laatste trends in de Nederlandse banksector?"
3input_ids = tokenizer.encode(input_text, return_tensors='pt').to(model.device)
4
5# Generate a response
6outputs = model.generate(input_ids, max_length=200, num_return_sequences=1)
7response = tokenizer.decode(outputs[0], skip_special_tokens=True)
8
9print(response)
If you use
FinGEITje-7B-dpo in your work, please cite:
1@inproceedings{10.1145/3677052.3698628,
2author = {Noels, Sander and De Blaere, Jorne and De Bie, Tijl},
3title = {A Dutch Financial Large Language Model},
4year = {2024},
5isbn = {9798400710810},
6publisher = {Association for Computing Machinery},
7address = {New York, NY, USA},
8url = {https://doi.org/10.1145/3677052.3698628},
9doi = {10.1145/3677052.3698628},
10abstract = {This paper presents FinGEITje, the first Dutch financial Large Language Model (LLM) specifically designed and optimized for various financial tasks. Together with the model, we release a specialized Dutch financial instruction tuning dataset with over 140,000 samples, constructed employing an automated translation and data processing method. The open-source data construction method is provided, facilitating the creation of financial instruction datasets in different languages. To evaluate model performance, the study introduces the first Dutch financial evaluation benchmark, along with an automated evaluation method that utilizes an LLM as an independent evaluator, reducing manual intervention in performance evaluation. The experimental results highlight the superior performance of FinGEITje across five critical Dutch and English financial tasks.},
11booktitle = {Proceedings of the 5th ACM International Conference on AI in Finance},
12pages = {283–291},
13numpages = {9},
14keywords = {Financial Large Language Model, Instruction Tuning., Natural Language Processing},
15location = {Brooklyn, NY, USA},
16series = {ICAIF '24}
17}
For any inquiries or questions, please contact
Sander Noels.