File size: 1,985 Bytes
a37f413
 
 
29dd194
a37f413
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29dd194
a37f413
c2f0c41
a37f413
 
 
29dd194
 
a37f413
 
 
29dd194
a37f413
 
 
29dd194
 
 
 
a37f413
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c2f0c41
a37f413
 
 
 
c2f0c41
a37f413
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
base_model: mistralai/Mistral-7B-Instruct-v0.3
datasets:
- naimsassine/belgian-law-qafrench-dataset
library_name: peft
license: apache-2.0
tags:
- trl
- sft
- generated_from_trainer
model-index:
- name: mistralinstruct-7b-sft-lora
  results: []
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# mistralinstruct-7b-sft-lora

This model is a fine-tuned version of [mistralai/Mistral-7B-Instruct-v0.3](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.3) on the Belgian Law QnA dataset.
It achieves the following results on the evaluation set:
- Loss: 1.2937

## Model description

The goal of this model was to experiment how far we can push a model by fine tuning it on a french QnA dataset on Belgian Law. The goal here is to see if we can get a small
size LLM to become good enough in terms of Legal Expertise in a specific country

## Intended uses & limitations

Legal Question Answering (Belgian Law/French)

## Training and evaluation data

SFT-LORA
Big thanks to Niels Rogge's notebook that helped me through the process 
https://github.com/NielsRogge/Transformers-Tutorials/blob/master/Mistral/Supervised_fine_tuning_(SFT)_of_an_LLM_using_Hugging_Face_tooling.ipynb


## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 1
- eval_batch_size: 1
- seed: 42
- gradient_accumulation_steps: 128
- total_train_batch_size: 128
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine
- num_epochs: 1

### Training results

| Training Loss | Epoch  | Step | Validation Loss |
|:-------------:|:------:|:----:|:---------------:|
| 1.3021        | 0.9778 | 10   | 1.2937          |


### Framework versions

- PEFT 0.12.0
- Transformers 4.42.4
- Pytorch 2.3.1+cu121
- Datasets 2.20.0
- Tokenizers 0.19.1