readme: ---
  license: apache-2.0
  language:
  - fr
  metrics:
  - accuracy
  tags:
  - French
  - proverb
  - nlp
  - bert
  - fine-tune
  ---
  
  
  # bert-base-french-europeana-cased
  
  This model is a fine-tuned version of [bert-base-french-europeana-cased](https://huggingface.co/dbmdz/bert-base-french-europeana-cased) on a manually created dataset.
  It achieves the following results on the evaluation set:
  - Loss: 1.21
  - Accuracy: 0.85
  
  ### Training hyperparameters
  
  The following hyperparameters were used during training:
  - learning_rate: 2e-05
  - train_batch_size: 64
  - eval_batch_size: 64
  - seed: 42
  - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  - num_epochs: 10
  
  ### Training results
  
  | Training Loss | Epoch | Step | Validation Loss | Accuracy 
  |:-------------:|:-----:|:----:|:---------------:|:--------:|
  | 4.2           | 1.0   | 47    | 4.15156         | 0.174    | 
  ...
  | 1.216         | 10    | 490   | 1.2586          | 0.856    |
  
  
  ## How to use
  
  ```python
  from transformers import pipeline, AutoTokenizer
  
  model_checkpoint = "dbmdz/bert-base-french-europeana-cased"
  tokenizer = AutoTokenizer.from_pretrained(model_checkpoint, use_fast=True)
  model= "rasta/proverbes-french-IFT-7022"
  
  generator = pipeline(task="fill-mask", model=model, tokenizer=tokenizer)
  
  sentence = 'quand la poire est mûre, elle [MASK]'
  results = generator(sentence)
  
  ```
  
  
  ### Framework versions
  
  - Transformers 4.18.0
  - Pytorch 1.11.0+cu113
  - Datasets 2.1.0
  - Tokenizers 0.12.1
  