kiddothe2b commited on
Commit
578a507
1 Parent(s): 6151925

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +10 -9
README.md CHANGED
@@ -1,7 +1,9 @@
1
  ---
2
  license: cc-by-nc-sa-4.0
3
  pipeline_tag: fill-mask
 
4
  language: en
 
5
  tags:
6
  - long-documents
7
  datasets:
@@ -15,28 +17,27 @@ 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 RoBERTa [(Liu et al., 2019)](https://arxiv.org/abs/1907.11692), and continued pre-trained for MLM in long sequences following the paradigm of Longformer released by [Beltagy et al. (2020)](https://arxiv.org/abs/2004.05150). It supports sequences of length up to 4,096.
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?filter=hierarchical-transformer) to look for fine-tuned versions on a task that
28
- 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 with a pipeline for masked language modeling:
35
 
36
  ```python
37
  from transformers import AutoTokenizer, AutoModelforForMaskedLM
38
  tokenizer = AutoTokenizer.from_pretrained("kiddothe2b/hierarchical-transformer-base-4096", trust_remote_code=True)
39
- mlm_model = AutoModelforForMaskedLM(model='kiddothe2b/hierarchical-transformer-base-4096', trust_remote_code=True)
40
  ```
41
 
42
  You can also fine-tun it for SequenceClassification, SequentialSentenceClassification, and MultipleChoice down-stream tasks:
@@ -44,7 +45,7 @@ You can also fine-tun it for SequenceClassification, SequentialSentenceClassific
44
  ```python
45
  from transformers import AutoTokenizer, AutoModelforSequenceClassification
46
  tokenizer = AutoTokenizer.from_pretrained("kiddothe2b/hierarchical-transformer-base-4096", trust_remote_code=True)
47
- doc_classifier = AutoModelforSequenceClassification(model='kiddothe2b/hierarchical-transformer-base-4096', trust_remote_code=True)
48
  ```
49
 
50
  ## Limitations and bias
@@ -98,7 +99,7 @@ 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,
 
1
  ---
2
  license: cc-by-nc-sa-4.0
3
  pipeline_tag: fill-mask
4
+ arxiv: 2210.05529
5
  language: en
6
+ thumbnail: https://raw.githubusercontent.com/coastalcph/hierarchical-transformers/main/data/figures/hat_encoder.png
7
  tags:
8
  - long-documents
9
  datasets:
 
17
 
18
  ## Model description
19
 
20
+ 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).
21
 
22
  The model has been warm-started re-using the weights of RoBERTa [(Liu et al., 2019)](https://arxiv.org/abs/1907.11692), and continued pre-trained for MLM in long sequences following the paradigm of Longformer released by [Beltagy et al. (2020)](https://arxiv.org/abs/2004.05150). It supports sequences of length up to 4,096.
23
 
24
+ 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.
25
 
26
  ## Intended uses & limitations
27
 
28
  You can use the raw model for masked language modeling, but it's mostly intended to be fine-tuned on a downstream task.
29
+ 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.
 
30
 
31
+ 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.
32
 
33
  ## How to use
34
 
35
+ You can use this model directly for masked language modeling:
36
 
37
  ```python
38
  from transformers import AutoTokenizer, AutoModelforForMaskedLM
39
  tokenizer = AutoTokenizer.from_pretrained("kiddothe2b/hierarchical-transformer-base-4096", trust_remote_code=True)
40
+ mlm_model = AutoModelforForMaskedLM("kiddothe2b/hierarchical-transformer-base-4096", trust_remote_code=True)
41
  ```
42
 
43
  You can also fine-tun it for SequenceClassification, SequentialSentenceClassification, and MultipleChoice down-stream tasks:
 
45
  ```python
46
  from transformers import AutoTokenizer, AutoModelforSequenceClassification
47
  tokenizer = AutoTokenizer.from_pretrained("kiddothe2b/hierarchical-transformer-base-4096", trust_remote_code=True)
48
+ doc_classifier = AutoModelforSequenceClassification("kiddothe2b/hierarchical-transformer-base-4096", trust_remote_code=True)
49
  ```
50
 
51
  ## Limitations and bias
 
99
 
100
  ## Citing
101
 
102
+ If you use HAT in your research, please cite [An Exploration of Hierarchical Attention Transformers for Efficient Long Document Classification](https://arxiv.org/abs/2210.05529)
103
 
104
  ```
105
  @misc{chalkidis-etal-2022-hat,