File size: 2,295 Bytes
da3e9a1
4466b80
 
185d21c
 
4466b80
 
da3e9a1
4466b80
05abb7e
 
3b66e43
05abb7e
3b66e43
da3e9a1
 
 
 
 
e5c3288
c9ba5d0
da3e9a1
 
d1b6463
d40c016
 
 
8909624
 
da3e9a1
f2f710f
 
 
 
 
 
 
 
 
 
da3e9a1
 
 
a13f866
da3e9a1
 
 
607ffd7
da3e9a1
 
3af9130
a13f866
da3e9a1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
70
71
---
language:
- it
metrics:
- type squad
datasets:
- squad_it
tags:
- Q&A
widget:
- text: "Come si chiama il primo re di Roma?"
  context: "Roma è una delle più belle ed antiche città del mondo. Il più famoso monumento di Roma è il Colosseo. Un altro monumento molto bello è la Colonna Traiana. Il primo re di Roma è stato Romolo. Roma ha avuto tanti re: Numa Pompilio, Tullio Ostilio."
- text: "Qual è il più famoso monumento di Roma?"
  context: "Roma è una delle più belle ed antiche città del mondo. Il più famoso monumento di Roma è il Colosseo. Un altro monumento molto bello è la Colonna Traiana. Il primo re di Roma è stato Romolo. Roma ha avuto tanti re: Numa Pompilio, Tullio Ostilio."
model-index:
- name: squad_it_xxl_cased_hub1
  results: []
---

# squad_it_xxl_cased
This is a model, based on **BERT** trained on cased Italian, that can be used for [Extractive Q&A](https://huggingface.co/tasks/question-answering) on Italian texts.

## Model description
This model has been trained on **squad_it** dataset starting from the pre-trained model [dbmdz/bert-base-italian-xxl-cased](https://huggingface.co/dbmdz/bert-base-italian-xxl-cased).

These are the metrics computed on evaluation set:

- EM:	63.95
- F1:	75.27

#### How to use

```python
from transformers import pipeline

pipe_qa = pipeline('question-answering', model='luigisaetta/squad_it_xxl_cased_hub1')

pipe_qa(context="Io sono nato a Napoli. Il mare bagna Napoli. Napoli è la più bella città del mondo", 
        question="Qual è la più bella città del mondo?")
```

## Intended uses & limitations

This model can be used for Extractive Q&A on Italian Text

## Training and evaluation data

[squad_it](https://huggingface.co/datasets/squad_it)

## Training procedure
 see code in this [NoteBook](https://github.com/luigisaetta/nlp-qa-italian/blob/main/train_squad_it_final1.ipynb)
 
### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 8
- eval_batch_size: 8
- seed: 1234
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 2
- mixed_precision_training: Native AMP

### Framework versions

- Transformers 4.20.0.dev0
- Pytorch 1.9.0
- Datasets 1.11.0
- Tokenizers 0.12.1