Edit model card

AmsterdamDocClassificationMistral200T1Epochs

As part of the Assessing Large Language Models for Document Classification project by the Municipality of Amsterdam, we fine-tune Mistral, Llama, and GEITje for document classification. The fine-tuning is performed using the AmsterdamBalancedFirst200Tokens dataset, which consists of documents truncated to the first 200 tokens. In our research, we evaluate the fine-tuning of these LLMs across one, two, and three epochs. This model is a fine-tuned version of mistralai/Mistral-7B-Instruct-v0.2 and has been fine-tuned for one epoch.

It achieves the following results on the evaluation set:

  • Loss: 0.7673

Training and evaluation data

  • The training data consists of 9900 documents and their labels formatted into conversations.
  • The evaluation data consists of 1100 documents and their labels formatted into conversations.

Training procedure

See the GitHub for specifics about the training and the code.

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 1e-05
  • train_batch_size: 2
  • eval_batch_size: 8
  • seed: 42
  • gradient_accumulation_steps: 8
  • total_train_batch_size: 16
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lr_scheduler_type: cosine
  • lr_scheduler_warmup_ratio: 0.1
  • num_epochs: 1

Training results

Training Loss Epoch Step Validation Loss
0.7202 0.1988 123 0.8994
0.7523 0.3976 246 0.8242
0.4706 0.5964 369 0.7938
0.5285 0.7952 492 0.7687
0.7677 0.9939 615 0.7673

Training time: it took in total 44 minutes to fine-tuned the model for one epoch.

Framework versions

  • Transformers 4.41.1
  • Pytorch 2.3.0+cu121
  • Datasets 2.19.1
  • Tokenizers 0.19.1

Acknowledgements

This model was trained as part of [insert thesis info] in collaboration with Amsterdam Intelligence for the City of Amsterdam.

Downloads last month
4
Safetensors
Model size
7.24B params
Tensor type
BF16
·
Inference Examples
Inference API (serverless) is not available, repository is disabled.

Model tree for FemkeBakker/AmsterdamDocClassificationMistral200T1Epochs

Finetuned
this model

Dataset used to train FemkeBakker/AmsterdamDocClassificationMistral200T1Epochs

Collection including FemkeBakker/AmsterdamDocClassificationMistral200T1Epochs