kiddothe2b commited on
Commit
436a44c
1 Parent(s): 535fa18

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +7 -7
README.md CHANGED
@@ -7,24 +7,24 @@ tags:
7
  datasets:
8
  - c4
9
  model-index:
10
- - name: kiddothe2b/hat-base-4096
11
  results: []
12
  ---
13
 
14
- # Hierarchical Attention Transformer (HAT) / hat-base-4096
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), and continued pre-trained for MLM in long sequences following the paradigm of Longformer released by Beltagy et al. (2020). 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=hat) 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.
@@ -35,7 +35,7 @@ You can use this model directly with a pipeline for masked language modeling:
35
 
36
  ```python
37
  from transformers import pipeline
38
- mlm_model = pipeline('fill-mask', model='kiddothe2b/hat-base-4096', trust_remote_code=True)
39
  mlm_model("Hello I'm a <mask> model.")
40
  ```
41
 
@@ -43,8 +43,8 @@ You can also fine-tun it for SequenceClassification, SequentialSentenceClassific
43
 
44
  ```python
45
  from transformers import AutoTokenizer, AutoModelforSequenceClassification
46
- tokenizer = AutoTokenizer.from_pretrained("kiddothe2b/hat-base-4096", trust_remote_code=True)
47
- doc_classifier = AutoModelforSequenceClassification(model='kiddothe2b/hat-base-4096', trust_remote_code=True)
48
  ```
49
 
50
  ## Limitations and bias
 
7
  datasets:
8
  - c4
9
  model-index:
10
+ - name: kiddothe2b/hierarchical-transformer-base-4096
11
  results: []
12
  ---
13
 
14
+ # Hierarchical Attention Transformer (HAT) / hierarchical-transformer-base-4096
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.
 
35
 
36
  ```python
37
  from transformers import pipeline
38
+ mlm_model = pipeline('fill-mask', model='kiddothe2b/hierarchical-transformer-base-4096', trust_remote_code=True)
39
  mlm_model("Hello I'm a <mask> model.")
40
  ```
41
 
 
43
 
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