Clifton Alexander Poth commited on
Commit
7c899ad
1 Parent(s): 911cbef

Initial version.

Browse files
README.md ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - adapterhub:sts/qqp
4
+ - roberta
5
+ - adapter-transformers
6
+ language:
7
+ - en
8
+ ---
9
+
10
+ # Adapter `AdapterHub/roberta-base-pf-qqp` for roberta-base
11
+
12
+ An [adapter](https://adapterhub.ml) for the `roberta-base` model that was trained on the [sts/qqp](https://adapterhub.ml/explore/sts/qqp/) dataset and includes a prediction head for classification.
13
+
14
+ This adapter was created for usage with the **[adapter-transformers](https://github.com/Adapter-Hub/adapter-transformers)** library.
15
+
16
+ ## Usage
17
+
18
+ First, install `adapter-transformers`:
19
+
20
+ ```
21
+ pip install -U adapter-transformers
22
+ ```
23
+ _Note: adapter-transformers is a fork of transformers that acts as a drop-in replacement with adapter support. [More](https://docs.adapterhub.ml/installation.html)_
24
+
25
+ Now, the adapter can be loaded and activated like this:
26
+
27
+ ```python
28
+ from transformers import AutoModelWithHeads
29
+
30
+ model = AutoModelWithHeads.from_pretrained("roberta-base")
31
+ adapter_name = model.load_adapter("AdapterHub/roberta-base-pf-qqp", source="hf", set_active=True)
32
+ ```
33
+
34
+ ## Architecture & Training
35
+
36
+ The training code for this adapter is available at https://github.com/adapter-hub/efficient-task-transfer.
37
+ In particular, training configurations for all tasks can be found [here](https://github.com/adapter-hub/efficient-task-transfer/tree/master/run_configs).
38
+
39
+
40
+ ## Evaluation results
41
+
42
+ Refer to [the paper](https://arxiv.org/pdf/2104.08247) for more information on results.
43
+
44
+ ## Citation
45
+
46
+ If you use this adapter, please cite our paper ["What to Pre-Train on? Efficient Intermediate Task Selection"](https://arxiv.org/pdf/2104.08247):
47
+
48
+ ```bibtex
49
+ @inproceedings{poth-etal-2021-what-to-pre-train-on,
50
+ title={What to Pre-Train on? Efficient Intermediate Task Selection},
51
+ author={Clifton Poth and Jonas Pfeiffer and Andreas Rücklé and Iryna Gurevych},
52
+ booktitle = "Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing (EMNLP)",
53
+ month = nov,
54
+ year = "2021",
55
+ address = "Online",
56
+ publisher = "Association for Computational Linguistics",
57
+ url = "https://arxiv.org/abs/2104.08247",
58
+ pages = "to appear",
59
+ }
60
+ ```
adapter_config.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "config": {
3
+ "adapter_residual_before_ln": false,
4
+ "cross_adapter": false,
5
+ "inv_adapter": null,
6
+ "inv_adapter_reduction_factor": null,
7
+ "leave_out": [],
8
+ "ln_after": false,
9
+ "ln_before": false,
10
+ "mh_adapter": false,
11
+ "non_linearity": "relu",
12
+ "original_ln_after": true,
13
+ "original_ln_before": true,
14
+ "output_adapter": true,
15
+ "reduction_factor": 16,
16
+ "residual_before_ln": true
17
+ },
18
+ "hidden_size": 768,
19
+ "model_class": "RobertaModelWithHeads",
20
+ "model_name": "roberta-base",
21
+ "model_type": "roberta",
22
+ "name": "glue_qqp"
23
+ }
head_config.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "config": {
3
+ "activation_function": "tanh",
4
+ "bias": true,
5
+ "head_type": "classification",
6
+ "label2id": {
7
+ "duplicate": 1,
8
+ "not_duplicate": 0
9
+ },
10
+ "layers": 2,
11
+ "num_labels": 2,
12
+ "use_pooler": false
13
+ },
14
+ "hidden_size": 768,
15
+ "model_class": "RobertaModelWithHeads",
16
+ "model_name": "roberta-base",
17
+ "model_type": "roberta",
18
+ "name": "glue_qqp"
19
+ }
pytorch_adapter.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9c2b7f64072b1a2ac9eb96f6e95bf4843e536cd549e35507afd3b9a13cee1baf
3
+ size 3594927
pytorch_model_head.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:53443e6d9a10908fdd2cb824cf8cbdeefb6c96cafb38dc5ccee96cec5acf58b1
3
+ size 2370175