lenglaender commited on
Commit
4116224
1 Parent(s): 10250b5

Upload model

Browse files
README.md ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - adapter-transformers
4
+ - t5
5
+ datasets:
6
+ - amazon_polarity
7
+ ---
8
+
9
+ # Adapter `lenglaender/xlm-roberta-base-lora-cls-amazon-polarity` for google-t5/t5-base
10
+
11
+ An [adapter](https://adapterhub.ml) for the `google-t5/t5-base` model that was trained on the [amazon_polarity](https://huggingface.co/datasets/amazon_polarity/) dataset and includes a prediction head for classification.
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("google-t5/t5-base")
29
+ adapter_name = model.load_adapter("lenglaender/xlm-roberta-base-lora-cls-amazon-polarity", 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,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "config": {
3
+ "alpha": 8,
4
+ "architecture": "lora",
5
+ "attn_matrices": [
6
+ "q",
7
+ "v"
8
+ ],
9
+ "composition_mode": "add",
10
+ "dropout": 0.1,
11
+ "init_weights": "lora",
12
+ "intermediate_lora": false,
13
+ "leave_out": [],
14
+ "output_lora": false,
15
+ "r": 8,
16
+ "selfattn_lora": true,
17
+ "use_gating": false
18
+ },
19
+ "hidden_size": 768,
20
+ "model_class": "T5AdapterModel",
21
+ "model_name": "google-t5/t5-base",
22
+ "model_type": "t5",
23
+ "name": "amazon_cls",
24
+ "version": "0.2.0"
25
+ }
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
+ "0": 0,
9
+ "1": 1
10
+ },
11
+ "layers": 2,
12
+ "num_labels": 2,
13
+ "use_pooler": false
14
+ },
15
+ "hidden_size": 768,
16
+ "model_class": "T5AdapterModel",
17
+ "model_name": "google-t5/t5-base",
18
+ "model_type": "t5",
19
+ "name": "amazon_cls",
20
+ "version": "0.2.0"
21
+ }
pytorch_adapter.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:58b7cd94b38049b4943f24285ea85f850a24deb499bc60ff3c863ae749dc7f8d
3
+ size 3591154
pytorch_model_head.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2bc286624f3b5ed9b4779afeeccd1b7ca52022cd55b0016ee69eab4147b1b284
3
+ size 2370664