calpt commited on
Commit
1af59be
1 Parent(s): 53c64fe

Add adapter gpt2_sts_sts-b_houlsby version 1

Browse files
README.md ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - gpt2
4
+ - text-classification
5
+ - adapter-transformers
6
+ - adapterhub:sts/sts-b
7
+ license: "apache-2.0"
8
+ ---
9
+
10
+ # Adapter `gpt2_sts_sts-b_houlsby` for gpt2
11
+
12
+ Adapter for gpt2 in Houlsby architecture trained on the STS-B dataset for 10 epochs with a learning rate of 1e-4.
13
+
14
+ **This adapter was created for usage with the [Adapters](https://github.com/Adapter-Hub/adapters) library.**
15
+
16
+ ## Usage
17
+
18
+ First, install `adapters`:
19
+
20
+ ```
21
+ pip install -U adapters
22
+ ```
23
+
24
+ Now, the adapter can be loaded and activated like this:
25
+
26
+ ```python
27
+ from adapters import AutoAdapterModel
28
+
29
+ model = AutoAdapterModel.from_pretrained("gpt2")
30
+ adapter_name = model.load_adapter("AdapterHub/gpt2_sts_sts-b_houlsby")
31
+ model.set_active_adapters(adapter_name)
32
+ ```
33
+
34
+ ## Architecture & Training
35
+
36
+ - Adapter architecture: houlsby
37
+ - Prediction head: classification
38
+ - Dataset: [STS-B](http://ixa2.si.ehu.es/stswiki/index.php/STSbenchmark)
39
+
40
+ ## Author Information
41
+
42
+ - Author name(s): Hannah Sterz
43
+ - Author email: [email protected]
44
+ - Author links: [Twitter](https://twitter.com/@h_sterz)
45
+
46
+
47
+
48
+ ## Citation
49
+
50
+ ```bibtex
51
+
52
+ ```
53
+
54
+ *This adapter has been auto-imported from https://github.com/Adapter-Hub/Hub/blob/master/adapters/ukp/gpt2_sts_sts-b_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": 768,
36
+ "model_class": "GPT2AdapterModel",
37
+ "model_name": "gpt2",
38
+ "model_type": "gpt2",
39
+ "name": "stsb",
40
+ "version": "0.2.0"
41
+ }
head_config.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "config": {
3
+ "activation_function": null,
4
+ "bias": false,
5
+ "dropout_prob": null,
6
+ "head_type": "classification",
7
+ "label2id": {},
8
+ "layers": 1,
9
+ "num_labels": 1,
10
+ "use_pooler": false
11
+ },
12
+ "hidden_size": 768,
13
+ "model_class": "GPT2AdapterModel",
14
+ "model_name": "gpt2",
15
+ "model_type": "gpt2",
16
+ "name": "stsb",
17
+ "version": "0.2.0"
18
+ }
pytorch_adapter.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8294debc297456defe69e5075d327b783112682f8e439cb5f197dd2a26cd297f
3
+ size 7189782
pytorch_model_head.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:651e32bda246e8b71910bfd61dc35de94d0586b26b42f045ad7604140838e1bc
3
+ size 4371