Question Answering
Transformers
PyTorch
Catalan
roberta
catalan
qa
Eval Results
Inference Endpoints
gonzalez-agirre commited on
Commit
91d323e
1 Parent(s): 1f02ddc

Upload model.

Browse files
README.md CHANGED
@@ -1,3 +1,105 @@
1
  ---
 
 
 
 
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+
4
+ - ca
5
+
6
  license: apache-2.0
7
+
8
+ tags:
9
+
10
+ - "catalan"
11
+
12
+ - "qa"
13
+
14
+ datasets:
15
+
16
+ - "xquad-ca"
17
+
18
+ - "catalanqa"
19
+
20
+ model-index:
21
+ - name: roberta-base-ca-v2-cased-qa
22
+ results:
23
+ - task:
24
+ type: question-answering
25
+ dataset:
26
+ type: projecte-aina/catalanqa
27
+ name: CatalanQA
28
+ metrics:
29
+ - name: F1
30
+ type: f1
31
+ value: 0.8950
32
+
33
+ metrics:
34
+
35
+ - "f1"
36
+
37
+ - "exact match"
38
+
39
+ widget:
40
+
41
+ - text: "Quan va començar el Super3?"
42
+ context: "El Super3 o Club Super3 és un univers infantil català creat a partir d'un programa emès per Televisió de Catalunya des del 1991. Està format per un canal de televisió, la revista Súpers!, la Festa dels Súpers i un club que té un milió i mig de socis."
43
+
44
+ - text: "Quants eren els germans Marx?"
45
+ context: "Els germans Marx van ser un grup de còmics dels Estats Units que originàriament estava compost per cinc germans (entre parèntesis els noms artístics): Leonard (Chico), Adolph (Harpo), Julius (Groucho), Milton (Gummo) i Herbert (Zeppo)."
46
+
47
+ - text: "On van ser els Jocs Olímpics de 1992?"
48
+ context: "Els Jocs Olímpics d'estiu de 1992, oficialment Jocs Olímpics de la XXV Olimpíada, es van celebrar a la ciutat de Barcelona entre els dies 25 de juliol i 9 d'agost de 1992. Hi participaren 9.356 atletes (6.652 homes i 2.704 dones) de 169 comitès nacionals, que competiren en 32 esports i 286 especialitats."
49
+
50
+ - text: "Qui va dissenyar la Sagrada Família?"
51
+ context: "El Temple Expiatori de la Sagrada Família, conegut habitualment com la Sagrada Família, és una basílica catòlica situada a la ciutat de Barcelona. És un dels exemples més coneguts del modernisme català i un edifici únic al món, que ha esdevingut tot un símbol de la ciutat. Obra inacabada de l'arquitecte català Antoni Gaudí, és al barri de la Sagrada Família, al districte de l'Eixample de la ciutat."
52
+
53
+ - text: "Quin és el tercer volcà més gran de la Terra?"
54
+ context: "El Teide (o Pic del Teide) és un estratovolcà i muntanya de Tenerife, Illes Canàries (28.27 N, 16.6 O). Amb una altitud de 3718 m sobre el nivell del mar i amb aproximadament uns 7000 m sobre el llit marí adjacent, és la muntanya més alta d'Espanya, la muntanya més alta de totes les illes atlàntiques i el tercer volcà més gran de la Terra."
55
+
56
+
57
  ---
58
+
59
+ # Catalan BERTa-v2 (roberta-base-ca-v2) finetuned for Question Answering.
60
+
61
+ The **roberta-base-ca-v2-cased-qa** is a Question Answering (QA) model for the Catalan language fine-tuned from the [roberta-base-ca-v2](https://huggingface.co/projecte-aina/roberta-base-ca-v2) model, a [RoBERTa](https://arxiv.org/abs/1907.11692) base model pre-trained on a medium-size corpus collected from publicly available corpora and crawlers (check the roberta-base-ca-v2 model card for more details).
62
+
63
+ ## Datasets
64
+ We used the QA dataset in Catalan called [CatalanQA](https://huggingface.co/datasets/projecte-aina/catalanqa) for training and evaluation, and the [XQuAD-ca](https://huggingface.co/datasets/projecte-aina/xquad-ca) test set for evaluation.
65
+
66
+ ## Evaluation and results
67
+ We evaluated the _roberta-base-ca-v2-cased-qa_ on the CatalanQA and XQuAD-ca test sets against standard multilingual and monolingual baselines:
68
+
69
+
70
+ | Model | CatalanQA (F1/EM) | XQuAD-ca (F1/EM) |
71
+ | ------------|:-------------:| -----:|
72
+ | roberta-base-ca-v2-cased-qa | **89.50**/76.63 | **73.64/55.42** |
73
+ | roberta-base-ca-cased-qa | 89.17/**77.14** | 69.20/51.47 |
74
+ | mBERT | 86.90/74.19 | 68.79/50.80 |
75
+ | XLM-RoBERTa | 88.17/75.93 | 72.55/54.16 |
76
+
77
+ For more details, check the fine-tuning and evaluation scripts in the official [GitHub repository](https://github.com/projecte-aina/club).
78
+
79
+
80
+ ## Citing
81
+ If you use any of these resources (datasets or models) in your work, please cite our latest paper:
82
+ ```bibtex
83
+ @inproceedings{armengol-estape-etal-2021-multilingual,
84
+ title = "Are Multilingual Models the Best Choice for Moderately Under-resourced Languages? {A} Comprehensive Assessment for {C}atalan",
85
+ author = "Armengol-Estap{\'e}, Jordi and
86
+ Carrino, Casimiro Pio and
87
+ Rodriguez-Penagos, Carlos and
88
+ de Gibert Bonet, Ona and
89
+ Armentano-Oller, Carme and
90
+ Gonzalez-Agirre, Aitor and
91
+ Melero, Maite and
92
+ Villegas, Marta",
93
+ booktitle = "Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021",
94
+ month = aug,
95
+ year = "2021",
96
+ address = "Online",
97
+ publisher = "Association for Computational Linguistics",
98
+ url = "https://aclanthology.org/2021.findings-acl.437",
99
+ doi = "10.18653/v1/2021.findings-acl.437",
100
+ pages = "4933--4946",
101
+ }
102
+ ```
103
+
104
+ ### Funding
105
+ This work was funded by the [Catalan Government](https://politiquesdigitals.gencat.cat/en/inici/index.html) within the framework of the [AINA project.](https://politiquesdigitals.gencat.cat/ca/economia/catalonia-ai/aina).
config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "projecte-aina/roberta-base-ca-v2-cased-qa",
3
+ "architectures": [
4
+ "RobertaForQuestionAnswering"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "eos_token_id": 2,
9
+ "gradient_checkpointing": false,
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 768,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 3072,
15
+ "layer_norm_eps": 1e-05,
16
+ "max_position_embeddings": 514,
17
+ "model_type": "roberta",
18
+ "num_attention_heads": 12,
19
+ "num_hidden_layers": 12,
20
+ "pad_token_id": 1,
21
+ "position_embedding_type": "absolute",
22
+ "transformers_version": "4.6.1",
23
+ "type_vocab_size": 1,
24
+ "use_cache": true,
25
+ "vocab_size": 50262
26
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:151d697e1dcc8c40ac0a2bf25a9f8e535631d2b4ffd4a4f846fd85a2d165d23a
3
+ size 496301809
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"bos_token": {"content": "<s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "eos_token": {"content": "</s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "unk_token": {"content": "<unk>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "sep_token": {"content": "</s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "pad_token": {"content": "<pad>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "cls_token": {"content": "<s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "mask_token": {"content": "<mask>", "single_word": false, "lstrip": true, "rstrip": false, "normalized": true}}
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"unk_token": {"content": "<unk>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "bos_token": {"content": "<s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "eos_token": {"content": "</s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "add_prefix_space": true, "errors": "replace", "sep_token": {"content": "</s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "cls_token": {"content": "<s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "pad_token": {"content": "<pad>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "mask_token": {"content": "<mask>", "single_word": false, "lstrip": true, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "max_len": 512, "special_tokens_map_file": null, "name_or_path": "/gpfs/projects/bsc88/BERTs/models/roberta_base_ca_jsc/transformed_lr0.0005"}
vocab.json ADDED
The diff for this file is too large to render. See raw diff