system's picture
system HF staff
Update README.md
2eab1bc
|
raw
history blame
1.63 kB
metadata
language: italian
widget:
  - text: Quando nacque D'Annunzio?
    context: D'Annunzio nacque nel 1863

Italian Bert Base Uncased on Squad-it

Model description

This model is the uncased base version of the italian BERT (which you may find at dbmdz/bert-base-italian-uncased) trained on the question answering task.

How to use

from transformers import pipeline

nlp = pipeline('question-answering', model='antoniocappiello/bert-base-italian-uncased-squad-it')

# nlp(context="D'Annunzio nacque nel 1863", question="Quando nacque D'Annunzio?")
# {'score': 0.9990354180335999, 'start': 22, 'end': 25, 'answer': '1863'}

Training data

It has been trained on the question answering task using SQuAD-it, derived from the original SQuAD dataset and obtained through the semi-automatic translation of the SQuAD dataset in Italian.

Training procedure

python ./examples/run_squad.py \
    --model_type bert \
    --model_name_or_path dbmdz/bert-base-italian-uncased \
    --do_train \
    --do_eval \
    --train_file ./squad_it_uncased/train-v1.1.json \
    --predict_file ./squad_it_uncased/dev-v1.1.json \
    --learning_rate 3e-5 \
    --num_train_epochs 2 \
    --max_seq_length 384 \
    --doc_stride 128 \
    --output_dir ./models/bert-base-italian-uncased-squad-it/ \
    --per_gpu_eval_batch_size=3   \
    --per_gpu_train_batch_size=3   \
    --do_lower_case \

Eval results

Model batch EM F1
BERT base uncased 3 63.8 75.30