Add adapter roberta-large-qnli_houlsby version 1
Browse files- ._adapter_config.json +0 -0
- ._head_config.json +0 -0
- ._pytorch_adapter.bin +3 -0
- ._pytorch_model_head.bin +3 -0
- ._roberta-large_qnli_houlsby +0 -0
- README.md +68 -0
- adapter_config.json +41 -0
- head_config.json +21 -0
- pytorch_adapter.bin +3 -0
- pytorch_model_head.bin +3 -0
._adapter_config.json
ADDED
Binary file (280 Bytes). View file
|
|
._head_config.json
ADDED
Binary file (280 Bytes). View file
|
|
._pytorch_adapter.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7d155c5c46c230dd9370996dfbc2bf1ce12e650cbbb7f4c467428d712965bb4d
|
3 |
+
size 280
|
._pytorch_model_head.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7d155c5c46c230dd9370996dfbc2bf1ce12e650cbbb7f4c467428d712965bb4d
|
3 |
+
size 280
|
._roberta-large_qnli_houlsby
ADDED
Binary file (547 Bytes). View file
|
|
README.md
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- adapterhub:nli/qnli
|
4 |
+
- adapter-transformers
|
5 |
+
- text-classification
|
6 |
+
- roberta
|
7 |
+
license: "apache-2.0"
|
8 |
+
---
|
9 |
+
|
10 |
+
# Adapter `roberta-large-qnli_houlsby` for roberta-large
|
11 |
+
|
12 |
+
QNLI adapter (with head) trained using the `run_glue.py` script with an extension that retains the best checkpoint (out of 15 epochs).
|
13 |
+
|
14 |
+
|
15 |
+
**This adapter was created for usage with the [Adapters](https://github.com/Adapter-Hub/adapters) library.**
|
16 |
+
|
17 |
+
## Usage
|
18 |
+
|
19 |
+
First, install `adapters`:
|
20 |
+
|
21 |
+
```
|
22 |
+
pip install -U adapters
|
23 |
+
```
|
24 |
+
|
25 |
+
Now, the adapter can be loaded and activated like this:
|
26 |
+
|
27 |
+
```python
|
28 |
+
from adapters import AutoAdapterModel
|
29 |
+
|
30 |
+
model = AutoAdapterModel.from_pretrained("roberta-large")
|
31 |
+
adapter_name = model.load_adapter("AdapterHub/roberta-large-qnli_houlsby")
|
32 |
+
model.set_active_adapters(adapter_name)
|
33 |
+
```
|
34 |
+
|
35 |
+
## Architecture & Training
|
36 |
+
|
37 |
+
- Adapter architecture: houlsby
|
38 |
+
- Prediction head: classification
|
39 |
+
- Dataset: [QNLI](https://adapterhub.ml/explore/nli/qnli/)
|
40 |
+
|
41 |
+
## Author Information
|
42 |
+
|
43 |
+
- Author name(s): Andreas Rücklé
|
44 |
+
- Author email: [email protected]
|
45 |
+
- Author links: [Website](http://rueckle.net), [GitHub](https://github.com/arueckle), [Twitter](https://twitter.com/@arueckle)
|
46 |
+
|
47 |
+
|
48 |
+
|
49 |
+
## Citation
|
50 |
+
|
51 |
+
```bibtex
|
52 |
+
@article{pfeiffer2020AdapterHub,
|
53 |
+
title={AdapterHub: A Framework for Adapting Transformers},
|
54 |
+
author={Jonas Pfeiffer,
|
55 |
+
Andreas R\"uckl\'{e},
|
56 |
+
Clifton Poth,
|
57 |
+
Aishwarya Kamath,
|
58 |
+
Ivan Vuli\'{c},
|
59 |
+
Sebastian Ruder,
|
60 |
+
Kyunghyun Cho,
|
61 |
+
Iryna Gurevych},
|
62 |
+
journal={ArXiv},
|
63 |
+
year={2020}
|
64 |
+
}
|
65 |
+
|
66 |
+
```
|
67 |
+
|
68 |
+
*This adapter has been auto-imported from https://github.com/Adapter-Hub/Hub/blob/master/adapters/ukp/roberta-large-qnli_houlsby.yaml*.
|
adapter_config.json
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"config": {
|
3 |
+
"adapter_residual_before_ln": false,
|
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 |
+
"ln_after": false,
|
16 |
+
"ln_before": false,
|
17 |
+
"mh_adapter": true,
|
18 |
+
"non_linearity": "swish",
|
19 |
+
"original_ln_after": true,
|
20 |
+
"original_ln_before": false,
|
21 |
+
"output_adapter": true,
|
22 |
+
"phm_bias": true,
|
23 |
+
"phm_c_init": "normal",
|
24 |
+
"phm_dim": 4,
|
25 |
+
"phm_init_range": 0.0001,
|
26 |
+
"phm_layer": false,
|
27 |
+
"phm_rank": 1,
|
28 |
+
"reduction_factor": 16,
|
29 |
+
"residual_before_ln": true,
|
30 |
+
"scaling": 1.0,
|
31 |
+
"shared_W_phm": false,
|
32 |
+
"shared_phm_rule": true,
|
33 |
+
"use_gating": false
|
34 |
+
},
|
35 |
+
"hidden_size": 1024,
|
36 |
+
"model_class": "RobertaAdapterModel",
|
37 |
+
"model_name": "roberta-large",
|
38 |
+
"model_type": "roberta",
|
39 |
+
"name": "qnli",
|
40 |
+
"version": "0.2.0"
|
41 |
+
}
|
head_config.json
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"config": {
|
3 |
+
"activation_function": "tanh",
|
4 |
+
"bias": true,
|
5 |
+
"dropout_prob": null,
|
6 |
+
"head_type": "classification",
|
7 |
+
"label2id": {
|
8 |
+
"LABEL_0": 0,
|
9 |
+
"LABEL_1": 1
|
10 |
+
},
|
11 |
+
"layers": 2,
|
12 |
+
"num_labels": 2,
|
13 |
+
"use_pooler": false
|
14 |
+
},
|
15 |
+
"hidden_size": 1024,
|
16 |
+
"model_class": "RobertaAdapterModel",
|
17 |
+
"model_name": "roberta-large",
|
18 |
+
"model_type": "roberta",
|
19 |
+
"name": "qnli",
|
20 |
+
"version": "0.2.0"
|
21 |
+
}
|
pytorch_adapter.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:821a89721ea8c043866194a7086e96626a025e5411526e4c98a4fc7db07e88a7
|
3 |
+
size 25442578
|
pytorch_model_head.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c82edd960b84ef330f6f24ef93b88585a694c3a210790a2ebba3b53b76eb8168
|
3 |
+
size 4208680
|