nicoberk commited on
Commit
cbbf4de
1 Parent(s): 6643402

Upload model

Browse files
README.md ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - roberta
4
+ - adapterhub:sentiment/rotten_tomatoes
5
+ - adapter-transformers
6
+ datasets:
7
+ - rotten_tomatoes
8
+ ---
9
+
10
+ # Adapter `nicoberk/test-adapter-lora` for roberta-base
11
+
12
+ An [adapter](https://adapterhub.ml) for the `roberta-base` model that was trained on the [sentiment/rotten_tomatoes](https://adapterhub.ml/explore/sentiment/rotten_tomatoes/) dataset and includes a prediction head for classification.
13
+
14
+ This adapter was created for usage with the **[Adapters](https://github.com/Adapter-Hub/adapters)** library.
15
+
16
+ ## Usage
17
+
18
+ First, install `adapters`:
19
+
20
+ ```
21
+ pip install -U adapters
22
+ ```
23
+
24
+ Now, the adapter can be loaded and activated like this:
25
+
26
+ ```python
27
+ from adapters import AutoAdapterModel
28
+
29
+ model = AutoAdapterModel.from_pretrained("roberta-base")
30
+ adapter_name = model.load_adapter("nicoberk/test-adapter-lora", source="hf", set_active=True)
31
+ ```
32
+
33
+ ## Architecture & Training
34
+
35
+ <!-- Add some description here -->
36
+
37
+ ## Evaluation results
38
+
39
+ <!-- Add some description here -->
40
+
41
+ ## Citation
42
+
43
+ <!-- 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.0,
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": "RobertaAdapterModel",
21
+ "model_name": "roberta-base",
22
+ "model_type": "roberta",
23
+ "name": "rotten_tomatoes",
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
+ "\ud83d\udc4d": 1,
9
+ "\ud83d\udc4e": 0
10
+ },
11
+ "layers": 2,
12
+ "num_labels": 2,
13
+ "use_pooler": false
14
+ },
15
+ "hidden_size": 768,
16
+ "model_class": "RobertaAdapterModel",
17
+ "model_name": "roberta-base",
18
+ "model_type": "roberta",
19
+ "name": "rotten_tomatoes",
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:3f371bd256235a17b4216fe9bb9dc66b42dd2faefc05a8fddc3e4843c385f93d
3
+ size 1197670
pytorch_model_head.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:27b8b08ff04c191e48f74e8b3752a7db92f6de18c69eff49d5bff6cb35ffe7b3
3
+ size 2370728