Geigle commited on
Commit
cbdd9b0
1 Parent(s): 4b92226
README.md ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - adapter-transformers
4
+ - adapterhub:quality_estimation/wmt21
5
+ - xlm-roberta
6
+ ---
7
+
8
+ # Adapter `Gregor/xlm-roberta-base-wmt21-qe` for xlm-roberta-base
9
+
10
+ An [adapter](https://adapterhub.ml) for the xlm-roberta-base model that was trained on the [quality_estimation/wmt21](https://adapterhub.ml/explore/quality_estimation/wmt21/) dataset and includes a prediction head for classification.
11
+
12
+ This adapter was created for usage with the **[adapter-transformers](https://github.com/Adapter-Hub/adapter-transformers)** library.
13
+
14
+ ## Usage
15
+
16
+ First, install `adapter-transformers`:
17
+
18
+ ```
19
+ pip install -U adapter-transformers
20
+ ```
21
+ _Note: adapter-transformers is a fork of transformers that acts as a drop-in replacement with adapter support. [More](https://docs.adapterhub.ml/installation.html)_
22
+
23
+ Now, the adapter can be loaded and activated like this:
24
+
25
+ ```python
26
+ from transformers import AutoModelWithHeads
27
+
28
+ model = AutoModelWithHeads.from_pretrained("xlm-roberta-base")
29
+ adapter_name = model.load_adapter("Gregor/xlm-roberta-base-wmt21-qe")
30
+ model.active_adapters = adapter_name
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,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "config": {
3
+ "adapter_residual_before_ln": false,
4
+ "cross_adapter": false,
5
+ "inv_adapter": null,
6
+ "inv_adapter_reduction_factor": null,
7
+ "leave_out": [],
8
+ "ln_after": false,
9
+ "ln_before": false,
10
+ "mh_adapter": false,
11
+ "non_linearity": "gelu",
12
+ "original_ln_after": true,
13
+ "original_ln_before": true,
14
+ "output_adapter": true,
15
+ "reduction_factor": 8,
16
+ "residual_before_ln": true
17
+ },
18
+ "hidden_size": 768,
19
+ "model_class": "XLMRobertaModelWithHeads",
20
+ "model_name": "xlm-roberta-base",
21
+ "model_type": "xlm-roberta",
22
+ "name": "qe_wmt21"
23
+ }
head_config.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "config": {
3
+ "activation_function": "tanh",
4
+ "bias": true,
5
+ "head_type": "classification",
6
+ "label2id": {
7
+ "LABEL_0": 0
8
+ },
9
+ "layers": 2,
10
+ "num_labels": 1,
11
+ "use_pooler": false
12
+ },
13
+ "hidden_size": 768,
14
+ "model_class": "XLMRobertaModelWithHeads",
15
+ "model_name": "xlm-roberta-base",
16
+ "model_type": "xlm-roberta",
17
+ "name": "qe_wmt21"
18
+ }
pytorch_adapter.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6c337b9f97920bb217c739aee6312bb16a55ae792322f115e5080684a1979c29
3
+ size 7136623
pytorch_model_head.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b77a5a6ad058b29dc34c421c521f4d16917a814c1cc7aa12b4668436ab4d4c8b
3
+ size 2367119