hSterz commited on
Commit
9d908ff
1 Parent(s): 052be1b
README.md ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - adapterhub:qa/bioasq
4
+ - adapter-transformers
5
+ - bart
6
+ ---
7
+
8
+ # Adapter `AdapterHub/bioASQfactoid` for facebook/bart-base
9
+
10
+ An [adapter](https://adapterhub.ml) for the `facebook/bart-base` model that was trained on the [qa/bioasq](https://adapterhub.ml/explore/qa/bioasq/) dataset and includes a prediction head for question answering.
11
+
12
+ This adapter was created for usage with the **[adapter-transformers](https://github.com/Adapter-Hub/adapter-transformers)** library.
13
+
14
+ ## Usage
15
+
16
+ First, install `adapter-transformers`:
17
+
18
+ ```
19
+ pip install -U adapter-transformers
20
+ ```
21
+ _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)_
22
+
23
+ Now, the adapter can be loaded and activated like this:
24
+
25
+ ```python
26
+ from transformers import AutoModelWithHeads
27
+
28
+ model = AutoModelWithHeads.from_pretrained("facebook/bart-base")
29
+ adapter_name = model.load_adapter("AdapterHub/bioASQfactoid", source="hf", set_active=True)
30
+ ```
31
+
32
+ ## Architecture & Training
33
+
34
+ <!-- Add some description here -->
35
+
36
+ ## Evaluation results
37
+
38
+ <!-- Add some description here -->
39
+
40
+ ## Citation
41
+
42
+ <!-- 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": "BartModelWithHeads",
20
+ "model_name": "facebook/bart-base",
21
+ "model_type": "bart",
22
+ "name": "bioASQfactoid"
23
+ }
head_config.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "config": {
3
+ "activation_function": null,
4
+ "head_type": "question_answering",
5
+ "label2id": {
6
+ "LABEL_0": 0,
7
+ "LABEL_1": 1
8
+ },
9
+ "layers": 1,
10
+ "num_labels": 2
11
+ },
12
+ "hidden_size": 768,
13
+ "model_class": "BartModelWithHeads",
14
+ "model_name": "facebook/bart-base",
15
+ "model_type": "bart",
16
+ "name": "bioASQfactoid"
17
+ }
pytorch_adapter.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3344fa3f75bcf3e2fede895198ff66d85bbc7af096b63e8ee841d649bcc8dee4
3
+ size 3595887
pytorch_model_head.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d5e8d18d0e95a54d902ae966457f1dcd906aafd97e029c9864073c782dd82669
3
+ size 7231