carnival13
commited on
Commit
•
98907bc
1
Parent(s):
6fc47fa
Upload T5ForConditionalGeneration
Browse files- README.md +43 -0
- adapter_config.json +24 -0
- head_config.json +14 -0
- pytorch_adapter.bin +3 -0
- pytorch_model_head.bin +3 -0
README.md
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- t5
|
4 |
+
- adapter-transformers
|
5 |
+
datasets:
|
6 |
+
- hotpot_qa
|
7 |
+
---
|
8 |
+
|
9 |
+
# Adapter `carnival13/t5-small-hpqa-lora` for mrm8488/t5-small-finetuned-squadv2
|
10 |
+
|
11 |
+
An [adapter](https://adapterhub.ml) for the `mrm8488/t5-small-finetuned-squadv2` model that was trained on the [hotpot_qa](https://huggingface.co/datasets/hotpot_qa/) dataset.
|
12 |
+
|
13 |
+
This adapter was created for usage with the **[adapter-transformers](https://github.com/Adapter-Hub/adapter-transformers)** library.
|
14 |
+
|
15 |
+
## Usage
|
16 |
+
|
17 |
+
First, install `adapter-transformers`:
|
18 |
+
|
19 |
+
```
|
20 |
+
pip install -U adapter-transformers
|
21 |
+
```
|
22 |
+
_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)_
|
23 |
+
|
24 |
+
Now, the adapter can be loaded and activated like this:
|
25 |
+
|
26 |
+
```python
|
27 |
+
from transformers import AutoAdapterModel
|
28 |
+
|
29 |
+
model = AutoAdapterModel.from_pretrained("mrm8488/t5-small-finetuned-squadv2")
|
30 |
+
adapter_name = model.load_adapter("carnival13/t5-small-hpqa-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,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"config": {
|
3 |
+
"alpha": 16,
|
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 |
+
"output_lora": false,
|
14 |
+
"r": 8,
|
15 |
+
"selfattn_lora": true,
|
16 |
+
"use_gating": false
|
17 |
+
},
|
18 |
+
"hidden_size": 512,
|
19 |
+
"model_class": "T5ForConditionalGeneration",
|
20 |
+
"model_name": "mrm8488/t5-small-finetuned-squadv2",
|
21 |
+
"model_type": "t5",
|
22 |
+
"name": "lora_adapter",
|
23 |
+
"version": "3.2.1"
|
24 |
+
}
|
head_config.json
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"config": null,
|
3 |
+
"hidden_size": 512,
|
4 |
+
"label2id": {
|
5 |
+
"LABEL_0": 0,
|
6 |
+
"LABEL_1": 1
|
7 |
+
},
|
8 |
+
"model_class": "T5ForConditionalGeneration",
|
9 |
+
"model_name": "mrm8488/t5-small-finetuned-squadv2",
|
10 |
+
"model_type": "t5",
|
11 |
+
"name": null,
|
12 |
+
"num_labels": 2,
|
13 |
+
"version": "3.2.1"
|
14 |
+
}
|
pytorch_adapter.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:886588aa0c80a882dfa62c1b8f35f386a4c1c37ddcdad0f8ccb704901b208e93
|
3 |
+
size 1205597
|
pytorch_model_head.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:21eae6f078f2d9251795c12a05f9f8e92618b5000c74be5bca7c408e75da4c8a
|
3 |
+
size 65798988
|