Upload model
Browse files- README.md +42 -0
- adapter_config.json +75 -0
- head_config.json +19 -0
- pytorch_adapter.bin +3 -0
- pytorch_model_head.bin +3 -0
README.md
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- roberta
|
4 |
+
- adapter-transformers
|
5 |
+
datasets:
|
6 |
+
- BigTMiami/amazon_helpfulness_TAPT_pretraining_dataset
|
7 |
+
---
|
8 |
+
|
9 |
+
# Adapter `ltuzova/pretrain_tapt_unipelt_adpater` 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 and includes a prediction head for masked lm.
|
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("ltuzova/pretrain_tapt_unipelt_adpater", 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": "tapt_unipelt",
|
74 |
+
"version": "0.1.2"
|
75 |
+
}
|
head_config.json
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"config": {
|
3 |
+
"activation_function": "gelu",
|
4 |
+
"bias": true,
|
5 |
+
"embedding_size": 768,
|
6 |
+
"head_type": "masked_lm",
|
7 |
+
"label2id": null,
|
8 |
+
"layer_norm": true,
|
9 |
+
"layers": 2,
|
10 |
+
"shift_labels": false,
|
11 |
+
"vocab_size": 50265
|
12 |
+
},
|
13 |
+
"hidden_size": 768,
|
14 |
+
"model_class": "RobertaAdapterModel",
|
15 |
+
"model_name": "roberta-base",
|
16 |
+
"model_type": "roberta",
|
17 |
+
"name": "tapt_unipelt",
|
18 |
+
"version": "0.1.2"
|
19 |
+
}
|
pytorch_adapter.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b2b4b5e20c9135068f5fffd8bbcc72350955ba18526c25ec2788d075f7e0cf47
|
3 |
+
size 44418864
|
pytorch_model_head.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:98404153079e8f815d4aab0f35195940e9e29f275507b1ee7ce7cf6281fe589b
|
3 |
+
size 156986358
|