kiddothe2b
commited on
Commit
·
0d8688e
1
Parent(s):
ea4dc1a
Update README.md
Browse files
README.md
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
license: cc-by-nc-sa-4.0
|
3 |
pipeline_tag: fill-mask
|
4 |
language: en
|
|
|
5 |
tags:
|
6 |
- long-documents
|
7 |
datasets:
|
@@ -15,21 +16,20 @@ model-index:
|
|
15 |
|
16 |
## Model description
|
17 |
|
18 |
-
This is a Hierarchical Attention Transformer (HAT) model as presented in [An Exploration of Hierarchical Attention Transformers for Efficient Long Document Classification (Chalkidis et al., 2022)](https://arxiv.org/abs/
|
19 |
|
20 |
-
The model has been warm-started re-using the weights of RoBERTa
|
21 |
|
22 |
-
HAT
|
23 |
|
24 |
Note: If you wish to use a fully pre-trained HAT model, you have to use [kiddothe2b/adhoc-hat-base-4096](https://huggingface.co/kiddothe2b/adhoc-hat-base-4096).
|
25 |
|
26 |
## Intended uses & limitations
|
27 |
|
28 |
-
|
29 |
-
See the [model hub](https://huggingface.co/models?filter=hierarchical-transformer) to look for fine-tuned versions on a task that
|
30 |
-
interests you.
|
31 |
|
32 |
-
Note that this model is primarily aimed at being fine-tuned on tasks that use the whole document to make decisions, such as document classification, sequential sentence classification or question answering.
|
33 |
|
34 |
## How to use
|
35 |
|
@@ -38,7 +38,7 @@ You can fine-tune it for SequenceClassification, SequentialSentenceClassificatio
|
|
38 |
```python
|
39 |
from transformers import AutoTokenizer, AutoModelforSequenceClassification
|
40 |
tokenizer = AutoTokenizer.from_pretrained("kiddothe2b/adhoc-hierarchical-transformer-base-4096", trust_remote_code=True)
|
41 |
-
doc_classifier = AutoModelforSequenceClassification(
|
42 |
```
|
43 |
|
44 |
Note: If you wish to use a fully pre-trained HAT model, you have to use [kiddothe2b/hierarchical-transformer-base-4096](https://huggingface.co/kiddothe2b/hierarchical-transformer-base-4096).
|
@@ -64,13 +64,15 @@ The model has been warm-started from [roberta-base](https://huggingface.co/rober
|
|
64 |
- Tokenizers 0.11.6
|
65 |
|
66 |
|
67 |
-
##Citing
|
68 |
|
69 |
-
If you use HAT in your research, please cite
|
|
|
|
|
70 |
|
71 |
```
|
72 |
@misc{chalkidis-etal-2022-hat,
|
73 |
-
url = {https://arxiv.org/abs/
|
74 |
author = {Chalkidis, Ilias and Dai, Xiang and Fergadiotis, Manos and Malakasiotis, Prodromos and Elliott, Desmond},
|
75 |
title = {An Exploration of Hierarchical Attention Transformers for Efficient Long Document Classification},
|
76 |
publisher = {arXiv},
|
|
|
2 |
license: cc-by-nc-sa-4.0
|
3 |
pipeline_tag: fill-mask
|
4 |
language: en
|
5 |
+
arxiv: 2210.05529
|
6 |
tags:
|
7 |
- long-documents
|
8 |
datasets:
|
|
|
16 |
|
17 |
## Model description
|
18 |
|
19 |
+
This is a Hierarchical Attention Transformer (HAT) model as presented in [An Exploration of Hierarchical Attention Transformers for Efficient Long Document Classification (Chalkidis et al., 2022)](https://arxiv.org/abs/2210.05529).
|
20 |
|
21 |
+
The model has been warm-started re-using the weights of RoBERTa (Liu et al., 2019), BUT has not been continued pre-trained. It supports sequences of length up to 4,096.
|
22 |
|
23 |
+
HAT uses hierarchical attention, which is a combination of segment-wise and cross-segment attention operations. You can think of segments as paragraphs or sentences.
|
24 |
|
25 |
Note: If you wish to use a fully pre-trained HAT model, you have to use [kiddothe2b/adhoc-hat-base-4096](https://huggingface.co/kiddothe2b/adhoc-hat-base-4096).
|
26 |
|
27 |
## Intended uses & limitations
|
28 |
|
29 |
+
The model is intended to be fine-tuned on a downstream task.
|
30 |
+
See the [model hub](https://huggingface.co/models?filter=hierarchical-transformer) to look for other versions of HAT, or fine-tuned versions on a task that interests you.
|
|
|
31 |
|
32 |
+
Note that this model is primarily aimed at being fine-tuned on tasks that use the whole document to make decisions, such as document classification, sequential sentence classification, or question answering.
|
33 |
|
34 |
## How to use
|
35 |
|
|
|
38 |
```python
|
39 |
from transformers import AutoTokenizer, AutoModelforSequenceClassification
|
40 |
tokenizer = AutoTokenizer.from_pretrained("kiddothe2b/adhoc-hierarchical-transformer-base-4096", trust_remote_code=True)
|
41 |
+
doc_classifier = AutoModelforSequenceClassification("kiddothe2b/adhoc-hierarchical-transformer-base-4096", trust_remote_code=True)
|
42 |
```
|
43 |
|
44 |
Note: If you wish to use a fully pre-trained HAT model, you have to use [kiddothe2b/hierarchical-transformer-base-4096](https://huggingface.co/kiddothe2b/hierarchical-transformer-base-4096).
|
|
|
64 |
- Tokenizers 0.11.6
|
65 |
|
66 |
|
67 |
+
## Citing
|
68 |
|
69 |
+
If you use HAT in your research, please cite:
|
70 |
+
|
71 |
+
[An Exploration of Hierarchical Attention Transformers for Efficient Long Document Classification](https://arxiv.org/abs/2210.05529). Ilias Chalkidis, Xiang Dai, Manos Fergadiotis, Prodromos Malakasiotis, and Desmond Elliott. 2022. arXiv:2210.05529 (Preprint).
|
72 |
|
73 |
```
|
74 |
@misc{chalkidis-etal-2022-hat,
|
75 |
+
url = {https://arxiv.org/abs/2210.05529},
|
76 |
author = {Chalkidis, Ilias and Dai, Xiang and Fergadiotis, Manos and Malakasiotis, Prodromos and Elliott, Desmond},
|
77 |
title = {An Exploration of Hierarchical Attention Transformers for Efficient Long Document Classification},
|
78 |
publisher = {arXiv},
|