hSterz commited on
Commit
3777ff4
1 Parent(s): b7d0c12
README.md ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - adapterhub:qa/narrativeqa
4
+ - adapter-transformers
5
+ - bart
6
+ datasets:
7
+ - narrativeqa
8
+ ---
9
+
10
+ # Adapter `hSterz/narrativeqa` for facebook/bart-base
11
+
12
+ An [adapter](https://adapterhub.ml) for the `facebook/bart-base` model that was trained on the [qa/narrativeqa](https://adapterhub.ml/explore/qa/narrativeqa/) dataset.
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("facebook/bart-base")
31
+ adapter_name = model.load_adapter("hSterz/narrativeqa", source="hf", set_active=True)
32
+ ```
33
+
34
+ ## Architecture & Training
35
+
36
+ <!-- Add some description here -->
37
+
38
+ ## Evaluation results
39
+
40
+ <!-- Add some description here -->
41
+
42
+ ## Citation
43
+
44
+ <!-- Add some description here -->
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": "BartForConditionalGeneration",
20
+ "model_name": "facebook/bart-base",
21
+ "model_type": "bart",
22
+ "name": "narrativeqa"
23
+ }
head_config.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "config": null,
3
+ "hidden_size": 768,
4
+ "label2id": {
5
+ "LABEL_0": 0,
6
+ "LABEL_1": 1,
7
+ "LABEL_2": 2
8
+ },
9
+ "model_class": "BartForConditionalGeneration",
10
+ "model_name": "facebook/bart-base",
11
+ "model_type": "bart",
12
+ "name": null,
13
+ "num_labels": 3
14
+ }
pytorch_adapter.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9f95c8e953b6ce46dea51e2e410f9980c398da3f7d56280f5bc7ca8c43975d14
3
+ size 3595823
pytorch_model_head.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f2a9d23a11ed2149a03668c9491def6550184a0f7f289f7f19ef133dc9735e68
3
+ size 154616191