kiddothe2b commited on
Commit
c5d2413
·
1 Parent(s): 8ba0b00

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +15 -11
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,35 +16,35 @@ 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/xxx).
19
 
20
- The model has been warm-started re-using the weights of miniature BERT [(Turc et al., 2019)](https://arxiv.org/abs/1908.08962), and continued pre-trained for MLM following the paradigm of Longformer released by [Beltagy et al. (2020)](](https://arxiv.org/abs/1908.08962)). It supports sequences of length up to 1,024.
21
 
22
- HAT use a hierarchical attention, which is a combination of segment-wise and cross-segment attention operations. You can think segments as paragraphs or sentences.
23
 
24
  ## Intended uses & limitations
25
 
26
  You can use the raw model for masked language modeling, but it's mostly intended to be fine-tuned on a downstream task.
27
- See the [model hub](https://huggingface.co/models?other=hierarchical-transformer) to look for fine-tuned versions on a task that interests you.
28
 
29
- 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.
30
 
31
  ## How to use
32
 
33
- You can use this model directly with a pipeline for masked language modeling:
34
 
35
  ```python
36
  from transformers import AutoTokenizer, AutoModelforForMaskedLM
37
  tokenizer = AutoTokenizer.from_pretrained("kiddothe2b/hierarchical-transformer-EC2-mini-1024", trust_remote_code=True)
38
- mlm_model = AutoModelforForMaskedLM(model="kiddothe2b/hierarchical-transformer-EC2-mini-1024", trust_remote_code=True)
39
  ```
40
 
41
- You can also fine-tun it for SequenceClassification, SequentialSentenceClassification, and MultipleChoice down-stream tasks:
42
 
43
  ```python
44
  from transformers import AutoTokenizer, AutoModelforSequenceClassification
45
  tokenizer = AutoTokenizer.from_pretrained("kiddothe2b/hierarchical-transformer-EC2-mini-1024", trust_remote_code=True)
46
- doc_classifier = AutoModelforSequenceClassification(model="kiddothe2b/hierarchical-transformer-EC2-mini-1024", trust_remote_code=True)
47
  ```
48
 
49
  ## Limitations and bias
@@ -98,11 +99,13 @@ The following hyperparameters were used during training:
98
 
99
  ## Citing
100
 
101
- If you use HAT in your research, please cite [An Exploration of Hierarchical Attention Transformers for Efficient Long Document Classification](https://arxiv.org/abs/xxx)
 
 
102
 
103
  ```
104
  @misc{chalkidis-etal-2022-hat,
105
- url = {https://arxiv.org/abs/xxx},
106
  author = {Chalkidis, Ilias and Dai, Xiang and Fergadiotis, Manos and Malakasiotis, Prodromos and Elliott, Desmond},
107
  title = {An Exploration of Hierarchical Attention Transformers for Efficient Long Document Classification},
108
  publisher = {arXiv},
@@ -111,3 +114,4 @@ If you use HAT in your research, please cite [An Exploration of Hierarchical Att
111
  ```
112
 
113
 
 
 
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 miniature BERT (Turc et al., 2019), and continued pre-trained for MLM following the paradigm of Longformer released by Beltagy et al. (2020). It supports sequences of length up to 1,024.
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
  ## Intended uses & limitations
26
 
27
  You can use the raw model for masked language modeling, but it's mostly intended to be fine-tuned on a downstream task.
28
+ See the [model hub](https://huggingface.co/models?other=hierarchical-transformer) to look for other versions of HAT or fine-tuned versions of a task that interests you.
29
 
30
+ 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.
31
 
32
  ## How to use
33
 
34
+ You can use this model directly for masked language modeling:
35
 
36
  ```python
37
  from transformers import AutoTokenizer, AutoModelforForMaskedLM
38
  tokenizer = AutoTokenizer.from_pretrained("kiddothe2b/hierarchical-transformer-EC2-mini-1024", trust_remote_code=True)
39
+ mlm_model = AutoModelforForMaskedLM(kiddothe2b/hierarchical-transformer-EC2-mini-1024", trust_remote_code=True)
40
  ```
41
 
42
+ You can also fine-tune it for SequenceClassification, SequentialSentenceClassification, and MultipleChoice down-stream tasks:
43
 
44
  ```python
45
  from transformers import AutoTokenizer, AutoModelforSequenceClassification
46
  tokenizer = AutoTokenizer.from_pretrained("kiddothe2b/hierarchical-transformer-EC2-mini-1024", trust_remote_code=True)
47
+ doc_classifier = AutoModelforSequenceClassification("kiddothe2b/hierarchical-transformer-EC2-mini-1024", trust_remote_code=True)
48
  ```
49
 
50
  ## Limitations and bias
 
99
 
100
  ## Citing
101
 
102
+ If you use HAT in your research, please cite:
103
+
104
+ [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).
105
 
106
  ```
107
  @misc{chalkidis-etal-2022-hat,
108
+ url = {https://arxiv.org/abs/2210.05529},
109
  author = {Chalkidis, Ilias and Dai, Xiang and Fergadiotis, Manos and Malakasiotis, Prodromos and Elliott, Desmond},
110
  title = {An Exploration of Hierarchical Attention Transformers for Efficient Long Document Classification},
111
  publisher = {arXiv},
 
114
  ```
115
 
116
 
117
+