Upload model
Browse files- README.md +41 -0
- adapter_config.json +75 -0
- head_config.json +18 -0
- pytorch_adapter.bin +3 -0
- pytorch_model_head.bin +3 -0
README.md
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- t5
|
4 |
+
- adapter-transformers
|
5 |
+
- adapterhub:sum/xsum
|
6 |
+
---
|
7 |
+
|
8 |
+
# Adapter `ilhami/my-awesome-adapter` for t5-small
|
9 |
+
|
10 |
+
An [adapter](https://adapterhub.ml) for the `t5-small` model that was trained on the [sum/xsum](https://adapterhub.ml/explore/sum/xsum/) dataset and includes a prediction head for seq2seq lm.
|
11 |
+
|
12 |
+
This adapter was created for usage with the **[Adapters](https://github.com/Adapter-Hub/adapters)** library.
|
13 |
+
|
14 |
+
## Usage
|
15 |
+
|
16 |
+
First, install `adapters`:
|
17 |
+
|
18 |
+
```
|
19 |
+
pip install -U adapters
|
20 |
+
```
|
21 |
+
|
22 |
+
Now, the adapter can be loaded and activated like this:
|
23 |
+
|
24 |
+
```python
|
25 |
+
from adapters import AutoAdapterModel
|
26 |
+
|
27 |
+
model = AutoAdapterModel.from_pretrained("t5-small")
|
28 |
+
adapter_name = model.load_adapter("ilhami/my-awesome-adapter", source="hf", set_active=True)
|
29 |
+
```
|
30 |
+
|
31 |
+
## Architecture & Training
|
32 |
+
|
33 |
+
<!-- Add some description here -->
|
34 |
+
|
35 |
+
## Evaluation results
|
36 |
+
|
37 |
+
<!-- Add some description here -->
|
38 |
+
|
39 |
+
## Citation
|
40 |
+
|
41 |
+
<!-- Add some description here -->
|
adapter_config.json
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"config": {
|
3 |
+
"architecture": "union",
|
4 |
+
"configs": [
|
5 |
+
{
|
6 |
+
"alpha": 8,
|
7 |
+
"architecture": "lora",
|
8 |
+
"attn_matrices": [
|
9 |
+
"q",
|
10 |
+
"v"
|
11 |
+
],
|
12 |
+
"composition_mode": "add",
|
13 |
+
"dropout": 0.0,
|
14 |
+
"init_weights": "lora",
|
15 |
+
"intermediate_lora": false,
|
16 |
+
"leave_out": [],
|
17 |
+
"output_lora": false,
|
18 |
+
"r": 8,
|
19 |
+
"selfattn_lora": true,
|
20 |
+
"use_gating": true
|
21 |
+
},
|
22 |
+
{
|
23 |
+
"architecture": "prefix_tuning",
|
24 |
+
"bottleneck_size": 512,
|
25 |
+
"cross_prefix": true,
|
26 |
+
"dropout": 0.0,
|
27 |
+
"encoder_prefix": true,
|
28 |
+
"flat": false,
|
29 |
+
"leave_out": [],
|
30 |
+
"non_linearity": "tanh",
|
31 |
+
"prefix_length": 10,
|
32 |
+
"shared_gating": true,
|
33 |
+
"use_gating": true
|
34 |
+
},
|
35 |
+
{
|
36 |
+
"adapter_residual_before_ln": false,
|
37 |
+
"cross_adapter": false,
|
38 |
+
"factorized_phm_W": true,
|
39 |
+
"factorized_phm_rule": false,
|
40 |
+
"hypercomplex_nonlinearity": "glorot-uniform",
|
41 |
+
"init_weights": "bert",
|
42 |
+
"inv_adapter": null,
|
43 |
+
"inv_adapter_reduction_factor": null,
|
44 |
+
"is_parallel": false,
|
45 |
+
"learn_phm": true,
|
46 |
+
"leave_out": [],
|
47 |
+
"ln_after": false,
|
48 |
+
"ln_before": false,
|
49 |
+
"mh_adapter": false,
|
50 |
+
"non_linearity": "relu",
|
51 |
+
"original_ln_after": true,
|
52 |
+
"original_ln_before": true,
|
53 |
+
"output_adapter": true,
|
54 |
+
"phm_bias": true,
|
55 |
+
"phm_c_init": "normal",
|
56 |
+
"phm_dim": 4,
|
57 |
+
"phm_init_range": 0.0001,
|
58 |
+
"phm_layer": false,
|
59 |
+
"phm_rank": 1,
|
60 |
+
"reduction_factor": 16,
|
61 |
+
"residual_before_ln": true,
|
62 |
+
"scaling": 1.0,
|
63 |
+
"shared_W_phm": false,
|
64 |
+
"shared_phm_rule": true,
|
65 |
+
"use_gating": true
|
66 |
+
}
|
67 |
+
]
|
68 |
+
},
|
69 |
+
"hidden_size": 512,
|
70 |
+
"model_class": "T5AdapterModel",
|
71 |
+
"model_name": "t5-small",
|
72 |
+
"model_type": "t5",
|
73 |
+
"name": "xsum",
|
74 |
+
"version": "0.1.1"
|
75 |
+
}
|
head_config.json
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"config": {
|
3 |
+
"activation_function": null,
|
4 |
+
"bias": false,
|
5 |
+
"head_type": "seq2seq_lm",
|
6 |
+
"label2id": null,
|
7 |
+
"layer_norm": false,
|
8 |
+
"layers": 1,
|
9 |
+
"shift_labels": false,
|
10 |
+
"vocab_size": 32128
|
11 |
+
},
|
12 |
+
"hidden_size": 512,
|
13 |
+
"model_class": "T5AdapterModel",
|
14 |
+
"model_name": "t5-small",
|
15 |
+
"model_type": "t5",
|
16 |
+
"name": "xsum",
|
17 |
+
"version": "0.1.1"
|
18 |
+
}
|
pytorch_adapter.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2d9ab432246b2ca00cc5106671b92082bdb31be0a99e6b572de32b1ebee84ad0
|
3 |
+
size 44106132
|
pytorch_model_head.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3c62960e655f28561ab8afdea57f4cec119b1ab6a5badf01a1c4bd445716f5d1
|
3 |
+
size 65799443
|