Update README.md
Browse files
README.md
CHANGED
@@ -10,7 +10,7 @@ language:
|
|
10 |
- en
|
11 |
---
|
12 |
|
13 |
-
# BigBird-ITC
|
14 |
|
15 |
This is BigBird-base trained on TriviaQA from [Google hub](https://huggingface.co/google/bigbird-base-trivia-itc) and fine-tuned on Multipage DocVQA (MP-DocVQA) dataset.
|
16 |
* Due to Huggingface implementation, the global tokens are defined according to the Internal Transformer Construction (ITC) strategy.
|
@@ -27,13 +27,13 @@ Here is how to use this model to get the features of a given text in PyTorch:
|
|
27 |
from transformers import BigBirdForQuestionAnswering
|
28 |
|
29 |
# by default its in `block_sparse` mode with num_random_blocks=3, block_size=64
|
30 |
-
model = BigBirdForQuestionAnswering.from_pretrained("rubentito/
|
31 |
|
32 |
# you can change `attention_type` to full attention like this:
|
33 |
-
model = BigBirdForQuestionAnswering.from_pretrained("rubentito/
|
34 |
|
35 |
# you can change `block_size` & `num_random_blocks` like this:
|
36 |
-
model = BigBirdForQuestionAnswering.from_pretrained("rubentito/
|
37 |
|
38 |
question = "Replace me by any text you'd like."
|
39 |
context = "Put some context for answering"
|
|
|
10 |
- en
|
11 |
---
|
12 |
|
13 |
+
# BigBird-BASE-ITC fine-tuned on MP-DocVQA
|
14 |
|
15 |
This is BigBird-base trained on TriviaQA from [Google hub](https://huggingface.co/google/bigbird-base-trivia-itc) and fine-tuned on Multipage DocVQA (MP-DocVQA) dataset.
|
16 |
* Due to Huggingface implementation, the global tokens are defined according to the Internal Transformer Construction (ITC) strategy.
|
|
|
27 |
from transformers import BigBirdForQuestionAnswering
|
28 |
|
29 |
# by default its in `block_sparse` mode with num_random_blocks=3, block_size=64
|
30 |
+
model = BigBirdForQuestionAnswering.from_pretrained("rubentito/bigbird-base-itc-mpdocvqa")
|
31 |
|
32 |
# you can change `attention_type` to full attention like this:
|
33 |
+
model = BigBirdForQuestionAnswering.from_pretrained("rubentito/bigbird-base-itc-mpdocvqa", attention_type="original_full")
|
34 |
|
35 |
# you can change `block_size` & `num_random_blocks` like this:
|
36 |
+
model = BigBirdForQuestionAnswering.from_pretrained("rubentito/bigbird-base-itc-mpdocvqa", block_size=16, num_random_blocks=2)
|
37 |
|
38 |
question = "Replace me by any text you'd like."
|
39 |
context = "Put some context for answering"
|