IT-FINANCIAL-BERT / README.md
PeppePasti's picture
Update README.md
acfc9ea verified
|
raw
history blame
1.98 kB
metadata
license: afl-3.0
base_model: dlicari/Italian-Legal-BERT-SC
tags:
  - generated_from_trainer
model-index:
  - name: model
    results: []
language:
  - it
library_name: transformers
pipeline_tag: fill-mask

model

This model is a fine-tuned version of dlicari/Italian-Legal-BERT-SC on a custom dataset about financial norms.

Intended uses & limitations

This mode has just been further pre-trained, if you intend to use it for downstream task you should fine-tune it with your data.

Usage

To use this model you can use the following script:

from transformers import AutoTokenizer, AutoModel,CamembertModel,pipeline
import torch
model = CamembertModel.from_pretrained("PeppePasti/IT-FINANCIAL-BERT")
tokenizer = AutoTokenizer.from_pretrained("dlicari/Italian-Legal-BERT-SC")
tokenizer.model_max_length=512
classifier = pipeline("fill-mask", model=model, tokenizer=tokenizer)
classifier(" La Repubblica riconosce a tutti i <mask> il diritto al lavoro e promuove le condizioni che rendano effettivo questo diritto.")

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 3e-06
  • train_batch_size: 8
  • eval_batch_size: 8
  • seed: 42
  • gradient_accumulation_steps: 256
  • total_train_batch_size: 2048
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lr_scheduler_type: linear
  • lr_scheduler_warmup_ratio: 0.5
  • num_epochs: 1
  • mixed_precision_training: Native AMP

Training results

Training Loss Epoch Step Input Tokens Seen
0.4096 0.9982 202 211812352

Framework versions

  • Transformers 4.40.0
  • Pytorch 2.3.0+cu118
  • Datasets 2.20.0
  • Tokenizers 0.19.1