Upload model
Browse files- README.md +42 -0
- adapter_config.json +75 -0
- pytorch_adapter.bin +3 -0
README.md
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- adapter-transformers
|
4 |
+
- roberta
|
5 |
+
datasets:
|
6 |
+
- BigTMiami/amazon_helpfulness_TAPT_pretraining_dataset
|
7 |
+
---
|
8 |
+
|
9 |
+
# Adapter `BigTMiami/pretrain_dapt_tapt_unipelt_adapter` for roberta-base
|
10 |
+
|
11 |
+
An [adapter](https://adapterhub.ml) for the `roberta-base` model that was trained on the [BigTMiami/amazon_helpfulness_TAPT_pretraining_dataset](https://huggingface.co/datasets/BigTMiami/amazon_helpfulness_TAPT_pretraining_dataset/) dataset.
|
12 |
+
|
13 |
+
This adapter was created for usage with the **[Adapters](https://github.com/Adapter-Hub/adapters)** library.
|
14 |
+
|
15 |
+
## Usage
|
16 |
+
|
17 |
+
First, install `adapters`:
|
18 |
+
|
19 |
+
```
|
20 |
+
pip install -U adapters
|
21 |
+
```
|
22 |
+
|
23 |
+
Now, the adapter can be loaded and activated like this:
|
24 |
+
|
25 |
+
```python
|
26 |
+
from adapters import AutoAdapterModel
|
27 |
+
|
28 |
+
model = AutoAdapterModel.from_pretrained("roberta-base")
|
29 |
+
adapter_name = model.load_adapter("BigTMiami/pretrain_dapt_tapt_unipelt_adapter", 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,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"config": {
|
3 |
+
"architecture": "union",
|
4 |
+
"configs": [
|
5 |
+
{
|
6 |
+
"architecture": "prefix_tuning",
|
7 |
+
"bottleneck_size": 512,
|
8 |
+
"cross_prefix": true,
|
9 |
+
"dropout": 0.0,
|
10 |
+
"encoder_prefix": true,
|
11 |
+
"flat": false,
|
12 |
+
"leave_out": [],
|
13 |
+
"non_linearity": "tanh",
|
14 |
+
"prefix_length": 10,
|
15 |
+
"shared_gating": true,
|
16 |
+
"use_gating": true
|
17 |
+
},
|
18 |
+
{
|
19 |
+
"adapter_residual_before_ln": false,
|
20 |
+
"cross_adapter": false,
|
21 |
+
"factorized_phm_W": true,
|
22 |
+
"factorized_phm_rule": false,
|
23 |
+
"hypercomplex_nonlinearity": "glorot-uniform",
|
24 |
+
"init_weights": "bert",
|
25 |
+
"inv_adapter": null,
|
26 |
+
"inv_adapter_reduction_factor": null,
|
27 |
+
"is_parallel": false,
|
28 |
+
"learn_phm": true,
|
29 |
+
"leave_out": [],
|
30 |
+
"ln_after": false,
|
31 |
+
"ln_before": false,
|
32 |
+
"mh_adapter": false,
|
33 |
+
"non_linearity": "relu",
|
34 |
+
"original_ln_after": true,
|
35 |
+
"original_ln_before": true,
|
36 |
+
"output_adapter": true,
|
37 |
+
"phm_bias": true,
|
38 |
+
"phm_c_init": "normal",
|
39 |
+
"phm_dim": 4,
|
40 |
+
"phm_init_range": 0.0001,
|
41 |
+
"phm_layer": false,
|
42 |
+
"phm_rank": 1,
|
43 |
+
"reduction_factor": 16,
|
44 |
+
"residual_before_ln": true,
|
45 |
+
"scaling": 1.0,
|
46 |
+
"shared_W_phm": false,
|
47 |
+
"shared_phm_rule": true,
|
48 |
+
"use_gating": true
|
49 |
+
},
|
50 |
+
{
|
51 |
+
"alpha": 8,
|
52 |
+
"architecture": "lora",
|
53 |
+
"attn_matrices": [
|
54 |
+
"q",
|
55 |
+
"v"
|
56 |
+
],
|
57 |
+
"composition_mode": "add",
|
58 |
+
"dropout": 0.0,
|
59 |
+
"init_weights": "lora",
|
60 |
+
"intermediate_lora": false,
|
61 |
+
"leave_out": [],
|
62 |
+
"output_lora": false,
|
63 |
+
"r": 8,
|
64 |
+
"selfattn_lora": true,
|
65 |
+
"use_gating": true
|
66 |
+
}
|
67 |
+
]
|
68 |
+
},
|
69 |
+
"hidden_size": 768,
|
70 |
+
"model_class": "RobertaAdapterModel",
|
71 |
+
"model_name": "roberta-base",
|
72 |
+
"model_type": "roberta",
|
73 |
+
"name": "review_adapter_unipelt",
|
74 |
+
"version": "0.1.2"
|
75 |
+
}
|
pytorch_adapter.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e59102dd21fcd9e2bfe0513d91f75b3c15e22dc26fe59b1ddabe1a73b6deb72c
|
3 |
+
size 44421424
|