calpt commited on
Commit
a144eec
1 Parent(s): 046c9a1

Add adapter facebook-bart-large_qa_squad2_lohfink-rossi-leaveout version 1

Browse files
README.md ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - adapter-transformers
4
+ - question-answering
5
+ - adapterhub:qa/squad2
6
+ - bart
7
+ datasets:
8
+ - squad_v2
9
+ license: "apache-2.0"
10
+ ---
11
+
12
+ # Adapter `facebook-bart-large_qa_squad2_lohfink-rossi-leaveout` for facebook/bart-large
13
+
14
+ **Note: This adapter was not trained by the AdapterHub team, but by these author(s): Till Lohfink & Maria Rossi (Contributed equally.).
15
+ See author details below.**
16
+
17
+ Adapter for bart-large using a custom architecture (Lohfink-Rossi-Leaveout) trained on the SQuAD 2.0 dataset for 15 epochs with a Cosine with Restarts learning rate scheduler ans learning rate 0.001.
18
+
19
+ **This adapter was created for usage with the [Adapters](https://github.com/Adapter-Hub/adapters) library.**
20
+
21
+ ## Usage
22
+
23
+ First, install `adapters`:
24
+
25
+ ```
26
+ pip install -U adapters
27
+ ```
28
+
29
+ Now, the adapter can be loaded and activated like this:
30
+
31
+ ```python
32
+ from adapters import AutoAdapterModel
33
+
34
+ model = AutoAdapterModel.from_pretrained("facebook/bart-large")
35
+ adapter_name = model.load_adapter("AdapterHub/facebook-bart-large_qa_squad2_lohfink-rossi-leaveout")
36
+ model.set_active_adapters(adapter_name)
37
+ ```
38
+
39
+ ## Architecture & Training
40
+
41
+ - Adapter architecture: lohfink-rossi-leaveout
42
+ - Prediction head: question answering
43
+ - Dataset: [SQuAD 2.0](https://rajpurkar.github.io/SQuAD-explorer/)
44
+
45
+ ## Author Information
46
+
47
+ - Author name(s): Till Lohfink & Maria Rossi (Contributed equally.)
48
+ - Author email: tlohfink3@gatech.edu;mrossi7@gatech.edu
49
+ - Author links:
50
+
51
+
52
+
53
+ ## Citation
54
+
55
+ ```bibtex
56
+
57
+ ```
58
+
59
+ *This adapter has been auto-imported from https://github.com/Adapter-Hub/Hub/blob/master/adapters/lohfink-rossi/facebook-bart-large_qa_squad2_lohfink-rossi-leaveout.yaml*.
adapter_config.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "config": {
3
+ "adapter_residual_before_ln": true,
4
+ "cross_adapter": false,
5
+ "dropout": 0.0,
6
+ "factorized_phm_W": true,
7
+ "factorized_phm_rule": false,
8
+ "hypercomplex_nonlinearity": "glorot-uniform",
9
+ "init_weights": "bert",
10
+ "inv_adapter": null,
11
+ "inv_adapter_reduction_factor": null,
12
+ "is_parallel": false,
13
+ "learn_phm": true,
14
+ "leave_out": [
15
+ 0,
16
+ 1,
17
+ 2,
18
+ 3,
19
+ 11,
20
+ 12,
21
+ 13,
22
+ 14
23
+ ],
24
+ "ln_after": false,
25
+ "ln_before": false,
26
+ "mh_adapter": true,
27
+ "non_linearity": "relu",
28
+ "original_ln_after": true,
29
+ "original_ln_before": true,
30
+ "output_adapter": true,
31
+ "phm_bias": true,
32
+ "phm_c_init": "normal",
33
+ "phm_dim": 4,
34
+ "phm_init_range": 0.0001,
35
+ "phm_layer": false,
36
+ "phm_rank": 1,
37
+ "reduction_factor": 16,
38
+ "residual_before_ln": true,
39
+ "scaling": 1.0,
40
+ "shared_W_phm": false,
41
+ "shared_phm_rule": true,
42
+ "use_gating": false
43
+ },
44
+ "hidden_size": 1024,
45
+ "model_class": "BartAdapterModel",
46
+ "model_name": "facebook/bart-large",
47
+ "model_type": "bart",
48
+ "name": "squad_v2",
49
+ "version": "0.2.0"
50
+ }
head_config.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "config": {
3
+ "activation_function": null,
4
+ "dropout_prob": null,
5
+ "head_type": "question_answering",
6
+ "label2id": {
7
+ "LABEL_0": 0,
8
+ "LABEL_1": 1
9
+ },
10
+ "layers": 1,
11
+ "num_labels": 2
12
+ },
13
+ "hidden_size": 1024,
14
+ "model_class": "BartAdapterModel",
15
+ "model_name": "facebook/bart-large",
16
+ "model_type": "bart",
17
+ "name": "squad_v2",
18
+ "version": "0.2.0"
19
+ }
pytorch_adapter.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:90c45903aa3485478ed8b7d107d4a6d3893bc4e1158a7838fbbe3c546347a90f
3
+ size 16962770
pytorch_model_head.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9cd4911b4a8b88f1eb628ad35fc2363d736224acf3c47f310e0b2cbb87e8ebf0
3
+ size 9754