ghadeermobasher
commited on
Commit
·
49fea9a
1
Parent(s):
334c51b
add model
Browse files- README.md +44 -0
- adapter_config.json +23 -0
- head_config.json +16 -0
- pytorch_adapter.bin +3 -0
- pytorch_model_head.bin +3 -0
README.md
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- adapter-transformers
|
4 |
+
- adapterhub:other
|
5 |
+
- xlm-roberta
|
6 |
+
datasets:
|
7 |
+
- ghadeermobasher/BC5CDR-Chemical-Disease
|
8 |
+
---
|
9 |
+
|
10 |
+
# Adapter `ghadeermobasher/BC5CDR-Chemical-Disease-balanced-SapBERT-UMLS-2020AB-all-lang-from-XLMR` for ghadeermobasher/BC5CDR-Chemical-Disease-balanced-SapBERT-UMLS-2020AB-all-lang-from-XLMR
|
11 |
+
|
12 |
+
An [adapter](https://adapterhub.ml) for the `ghadeermobasher/BC5CDR-Chemical-Disease-balanced-SapBERT-UMLS-2020AB-all-lang-from-XLMR` model that was trained on the [other](https://adapterhub.ml/explore/other/) dataset.
|
13 |
+
|
14 |
+
This adapter was created for usage with the **[adapter-transformers](https://github.com/Adapter-Hub/adapter-transformers)** library.
|
15 |
+
|
16 |
+
## Usage
|
17 |
+
|
18 |
+
First, install `adapter-transformers`:
|
19 |
+
|
20 |
+
```
|
21 |
+
pip install -U adapter-transformers
|
22 |
+
```
|
23 |
+
_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)_
|
24 |
+
|
25 |
+
Now, the adapter can be loaded and activated like this:
|
26 |
+
|
27 |
+
```python
|
28 |
+
from transformers import AutoModelWithHeads
|
29 |
+
|
30 |
+
model = AutoModelWithHeads.from_pretrained("ghadeermobasher/BC5CDR-Chemical-Disease-balanced-SapBERT-UMLS-2020AB-all-lang-from-XLMR")
|
31 |
+
adapter_name = model.load_adapter("ghadeermobasher/BC5CDR-Chemical-Disease-balanced-SapBERT-UMLS-2020AB-all-lang-from-XLMR", source="hf", set_active=True)
|
32 |
+
```
|
33 |
+
|
34 |
+
## Architecture & Training
|
35 |
+
|
36 |
+
<!-- Add some description here -->
|
37 |
+
|
38 |
+
## Evaluation results
|
39 |
+
|
40 |
+
<!-- Add some description here -->
|
41 |
+
|
42 |
+
## Citation
|
43 |
+
|
44 |
+
<!-- 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": "relu",
|
12 |
+
"original_ln_after": true,
|
13 |
+
"original_ln_before": true,
|
14 |
+
"output_adapter": true,
|
15 |
+
"reduction_factor": 16,
|
16 |
+
"residual_before_ln": true
|
17 |
+
},
|
18 |
+
"hidden_size": 768,
|
19 |
+
"model_class": "XLMRobertaForTokenClassification",
|
20 |
+
"model_name": "ghadeermobasher/BC5CDR-Chemical-Disease-balanced-SapBERT-UMLS-2020AB-all-lang-from-XLMR",
|
21 |
+
"model_type": "xlm-roberta",
|
22 |
+
"name": "BC5CDR-Chemical-Disease-balanced-SapBERT-UMLS-2020AB-all-lang-from-XLMR"
|
23 |
+
}
|
head_config.json
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"config": null,
|
3 |
+
"hidden_size": 768,
|
4 |
+
"label2id": {
|
5 |
+
"B-Chemical": 2,
|
6 |
+
"B-Disease": 4,
|
7 |
+
"I-Chemical": 1,
|
8 |
+
"I-Disease": 3,
|
9 |
+
"O": 0
|
10 |
+
},
|
11 |
+
"model_class": "XLMRobertaForTokenClassification",
|
12 |
+
"model_name": "ghadeermobasher/BC5CDR-Chemical-Disease-balanced-SapBERT-UMLS-2020AB-all-lang-from-XLMR",
|
13 |
+
"model_type": "xlm-roberta",
|
14 |
+
"name": null,
|
15 |
+
"num_labels": 5
|
16 |
+
}
|
pytorch_adapter.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:992113c11fdae48c7e88cd397d86714f4233b96c7eecce59e3126c19a22f696e
|
3 |
+
size 3596629
|
pytorch_model_head.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4b28e99a53be3ba4586a976e694551fd194269dc7e4e543fbdb7fcbc537fb793
|
3 |
+
size 16359
|