calpt commited on
Commit
8ea93dd
1 Parent(s): a7d825e

Add adapter distilbert-base-uncased_nli_multinli_houlsby version 1

Browse files
README.md ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - text-classification
4
+ - adapter-transformers
5
+ - adapterhub:nli/multinli
6
+ - distilbert
7
+ license: "apache-2.0"
8
+ ---
9
+
10
+ # Adapter `distilbert-base-uncased_nli_multinli_houlsby` for distilbert-base-uncased
11
+
12
+ Adapter for distilbert-base-uncased in Houlsby architecture trained on the MultiNLI dataset for 15 epochs with early stopping and a learning rate of 1e-4.
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("distilbert-base-uncased")
31
+ adapter_name = model.load_adapter("AdapterHub/distilbert-base-uncased_nli_multinli_houlsby")
32
+ model.set_active_adapters(adapter_name)
33
+ ```
34
+
35
+ ## Architecture & Training
36
+
37
+ - Adapter architecture: houlsby
38
+ - Prediction head: classification
39
+ - Dataset: [MultiNLI](https://github.com/NYU-MLL/multiNLI)
40
+
41
+ ## Author Information
42
+
43
+ - Author name(s): Clifton Poth
44
+ - Author email: [email protected]
45
+ - Author links: [Website](https://calpt.github.io), [GitHub](https://github.com/calpt), [Twitter](https://twitter.com/@clifapt)
46
+
47
+
48
+
49
+ ## Citation
50
+
51
+ ```bibtex
52
+
53
+ ```
54
+
55
+ *This adapter has been auto-imported from https://github.com/Adapter-Hub/Hub/blob/master/adapters/ukp/distilbert-base-uncased_nli_multinli_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": "DistilBertAdapterModel",
37
+ "model_name": "distilbert-base-uncased",
38
+ "model_type": "distilbert",
39
+ "name": "mnli",
40
+ "version": "0.2.0"
41
+ }
head_config.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "LABEL_2": 2
11
+ },
12
+ "layers": 2,
13
+ "num_labels": 3,
14
+ "use_pooler": false
15
+ },
16
+ "hidden_size": 768,
17
+ "model_class": "DistilBertAdapterModel",
18
+ "model_name": "distilbert-base-uncased",
19
+ "model_type": "distilbert",
20
+ "name": "mnli",
21
+ "version": "0.2.0"
22
+ }
pytorch_adapter.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:08c98286d1f08c38064005e33aa5c15312f82e272e641e482a1a27c932a3a169
3
+ size 3595686
pytorch_model_head.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7ea6d4e6102c7f578a1bbc38abf9b867f04890983ce13901df3ecdfa16892dd8
3
+ size 2373672