Upload model
Browse files- README.md +40 -0
- adapter_config.json +41 -0
- head_config.json +21 -0
- pytorch_adapter.bin +3 -0
- pytorch_model_head.bin +3 -0
README.md
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- adapter-transformers
|
4 |
+
- bert
|
5 |
+
---
|
6 |
+
|
7 |
+
# Adapter `tona3738/my-chungliao-adapter-A1-2` for robzchhangte/MizBERT
|
8 |
+
|
9 |
+
An [adapter](https://adapterhub.ml) for the `robzchhangte/MizBERT` model that was trained on the None dataset and includes a prediction head for classification.
|
10 |
+
|
11 |
+
This adapter was created for usage with the **[Adapters](https://github.com/Adapter-Hub/adapters)** library.
|
12 |
+
|
13 |
+
## Usage
|
14 |
+
|
15 |
+
First, install `adapters`:
|
16 |
+
|
17 |
+
```
|
18 |
+
pip install -U adapters
|
19 |
+
```
|
20 |
+
|
21 |
+
Now, the adapter can be loaded and activated like this:
|
22 |
+
|
23 |
+
```python
|
24 |
+
from adapters import AutoAdapterModel
|
25 |
+
|
26 |
+
model = AutoAdapterModel.from_pretrained("robzchhangte/MizBERT")
|
27 |
+
adapter_name = model.load_adapter("tona3738/my-chungliao-adapter-A1-2", set_active=True)
|
28 |
+
```
|
29 |
+
|
30 |
+
## Architecture & Training
|
31 |
+
|
32 |
+
<!-- Add some description here -->
|
33 |
+
|
34 |
+
## Evaluation results
|
35 |
+
|
36 |
+
<!-- Add some description here -->
|
37 |
+
|
38 |
+
## Citation
|
39 |
+
|
40 |
+
<!-- Add some description here -->
|
adapter_config.json
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"config": {
|
3 |
+
"adapter_residual_before_ln": false,
|
4 |
+
"cross_adapter": false,
|
5 |
+
"dropout": 0.0,
|
6 |
+
"factorized_phm_W": true,
|
7 |
+
"factorized_phm_rule": false,
|
8 |
+
"hypercomplex_nonlinearity": "glorot-uniform",
|
9 |
+
"init_weights": "bert",
|
10 |
+
"inv_adapter": null,
|
11 |
+
"inv_adapter_reduction_factor": null,
|
12 |
+
"is_parallel": false,
|
13 |
+
"learn_phm": true,
|
14 |
+
"leave_out": [],
|
15 |
+
"ln_after": false,
|
16 |
+
"ln_before": false,
|
17 |
+
"mh_adapter": false,
|
18 |
+
"non_linearity": "relu",
|
19 |
+
"original_ln_after": true,
|
20 |
+
"original_ln_before": true,
|
21 |
+
"output_adapter": true,
|
22 |
+
"phm_bias": true,
|
23 |
+
"phm_c_init": "normal",
|
24 |
+
"phm_dim": 4,
|
25 |
+
"phm_init_range": 0.0001,
|
26 |
+
"phm_layer": false,
|
27 |
+
"phm_rank": 1,
|
28 |
+
"reduction_factor": 16,
|
29 |
+
"residual_before_ln": true,
|
30 |
+
"scaling": 1.0,
|
31 |
+
"shared_W_phm": false,
|
32 |
+
"shared_phm_rule": true,
|
33 |
+
"use_gating": false
|
34 |
+
},
|
35 |
+
"hidden_size": 768,
|
36 |
+
"model_class": "BertAdapterModel",
|
37 |
+
"model_name": "robzchhangte/MizBERT",
|
38 |
+
"model_type": "bert",
|
39 |
+
"name": "sentimentanalysis",
|
40 |
+
"version": "adapters.1.0.0"
|
41 |
+
}
|
head_config.json
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"config": {
|
3 |
+
"activation_function": "tanh",
|
4 |
+
"bias": true,
|
5 |
+
"dropout_prob": null,
|
6 |
+
"head_type": "classification",
|
7 |
+
"label2id": {
|
8 |
+
"LABEL_0": 0,
|
9 |
+
"LABEL_1": 1
|
10 |
+
},
|
11 |
+
"layers": 2,
|
12 |
+
"num_labels": 2,
|
13 |
+
"use_pooler": false
|
14 |
+
},
|
15 |
+
"hidden_size": 768,
|
16 |
+
"model_class": "BertAdapterModel",
|
17 |
+
"model_name": "robzchhangte/MizBERT",
|
18 |
+
"model_type": "bert",
|
19 |
+
"name": "sentimentanalysis",
|
20 |
+
"version": "adapters.1.0.0"
|
21 |
+
}
|
pytorch_adapter.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5782f4563e976d56b2c6d062eba94c2abe5dd193bdf49398e7a7cc68b0ecdb9c
|
3 |
+
size 3596006
|
pytorch_model_head.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8b05a8672fe4eabacb9fb874a89b7b3fc2a2617cd94cfe4bc049afb03a2e9871
|
3 |
+
size 2370728
|