gonzalez-agirre commited on
Commit
186ce32
1 Parent(s): e303c00

Upload model.

Browse files
README.md CHANGED
@@ -1,3 +1,100 @@
1
  ---
 
 
 
 
 
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+
3
+ language:
4
+
5
+ - ca
6
+
7
  license: apache-2.0
8
+
9
+ tags:
10
+
11
+ - "catalan"
12
+
13
+ - "textual entailment"
14
+
15
+ - "teca"
16
+
17
+ - "CaText"
18
+
19
+ - "Catalan Textual Corpus"
20
+
21
+ datasets:
22
+
23
+ - "projecte-aina/teca"
24
+
25
+ metrics:
26
+
27
+ - "accuracy"
28
+
29
+
30
+ model-index:
31
+ - name: roberta-base-ca-v2-cased-te
32
+ results:
33
+ - task:
34
+ type: text-classification # Required. Example: automatic-speech-recognition
35
+ dataset:
36
+ type: projecte-aina/teca
37
+ name: TECA
38
+ metrics:
39
+ - name: Accuracy
40
+ type: accuracy
41
+ value: 0.8342
42
+
43
+ widget:
44
+
45
+ - text: "M'agrades. T'estimo."
46
+
47
+ - text: "M'agrada el sol i la calor. A la Garrotxa plou molt."
48
+
49
+ - text: "El llibre va caure per la finestra. El llibre va sortir volant."
50
+
51
+ - text: "El meu aniversari és el 23 de maig. Faré anys a finals de maig."
52
+
53
  ---
54
+
55
+ # Catalan BERTa-v2 (roberta-base-ca-v2) finetuned for Textual Entailment.
56
+
57
+ The **roberta-base-ca-v2-cased-te** is a Textual Entailment (TE) 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).
58
+
59
+ ## Datasets
60
+ We used the TE dataset in Catalan called [TECA](https://huggingface.co/datasets/projecte-aina/teca) for training and evaluation.
61
+
62
+ ## Evaluation and results
63
+ We evaluated the roberta-base-ca-cased-te on the TECA test set against standard multilingual and monolingual baselines:
64
+
65
+ | Model | TECA (Accuracy) |
66
+ | ------------|:----|
67
+ | roberta-base-ca-v2-cased-te | **83.14** |
68
+ | BERTa | 79.26 |
69
+ | mBERT | 74.63 |
70
+ | XLM-RoBERTa | 33.30 |
71
+
72
+ For more details, check the fine-tuning and evaluation scripts in the official [GitHub repository](https://github.com/projecte-aina/club).
73
+
74
+ ## Citing
75
+ If you use any of these resources (datasets or models) in your work, please cite our latest paper:
76
+ ```bibtex
77
+ @inproceedings{armengol-estape-etal-2021-multilingual,
78
+ title = "Are Multilingual Models the Best Choice for Moderately Under-resourced Languages? {A} Comprehensive Assessment for {C}atalan",
79
+ author = "Armengol-Estap{\'e}, Jordi and
80
+ Carrino, Casimiro Pio and
81
+ Rodriguez-Penagos, Carlos and
82
+ de Gibert Bonet, Ona and
83
+ Armentano-Oller, Carme and
84
+ Gonzalez-Agirre, Aitor and
85
+ Melero, Maite and
86
+ Villegas, Marta",
87
+ booktitle = "Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021",
88
+ month = aug,
89
+ year = "2021",
90
+ address = "Online",
91
+ publisher = "Association for Computational Linguistics",
92
+ url = "https://aclanthology.org/2021.findings-acl.437",
93
+ doi = "10.18653/v1/2021.findings-acl.437",
94
+ pages = "4933--4946",
95
+ }
96
+ ```
97
+
98
+ ### Funding
99
+ 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).
100
+
config.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "projecte-aina/roberta-base-ca-v2-cased-te",
3
+ "architectures": [
4
+ "RobertaForSequenceClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "eos_token_id": 2,
9
+ "finetuning_task": "mnli",
10
+ "gradient_checkpointing": false,
11
+ "hidden_act": "gelu",
12
+ "hidden_dropout_prob": 0.1,
13
+ "hidden_size": 768,
14
+ "id2label": {
15
+ "0": "ENTAILMENT",
16
+ "1": "NEUTRAL",
17
+ "2": "CONTRADICTION"
18
+ },
19
+ "initializer_range": 0.02,
20
+ "intermediate_size": 3072,
21
+ "label2id": {
22
+ "ENTAILMENT": 0,
23
+ "NEUTRAL": 1,
24
+ "CONTRADICTION": 2
25
+ },
26
+ "layer_norm_eps": 1e-05,
27
+ "max_position_embeddings": 514,
28
+ "model_type": "roberta",
29
+ "num_attention_heads": 12,
30
+ "num_hidden_layers": 12,
31
+ "pad_token_id": 1,
32
+ "position_embedding_type": "absolute",
33
+ "problem_type": "single_label_classification",
34
+ "transformers_version": "4.6.1",
35
+ "type_vocab_size": 1,
36
+ "use_cache": true,
37
+ "vocab_size": 50262
38
+ }
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:a06de16611b37b1379645a1849a9996dc983a11b72efd67fd4027245c24a9de7
3
+ size 498667949
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