Views
No views yet
1from transformers import BigBirdModel
2
3# by default its in `block_sparse` mode with num_random_blocks=3, block_size=64
4model = BigBirdModel.from_pretrained("flax-community/pino-bigbird-roberta-base")
5
6# you can change `attention_type` to full attention like this:
7model = BigBirdModel.from_pretrained("flax-community/pino-bigbird-roberta-base", attention_type="original_full")
8
9# you can change `block_size` & `num_random_blocks` like this:
10model = BigBirdModel.from_pretrained("flax-community/pino-bigbird-roberta-base", block_size=16, num_random_blocks=2)
11
121@misc{zaheer2021big,
2 title={Big Bird: Transformers for Longer Sequences},
3 author={Manzil Zaheer and Guru Guruganesh and Avinava Dubey and Joshua Ainslie and Chris Alberti and Santiago Ontanon and Philip Pham and Anirudh Ravula and Qifan Wang and Li Yang and Amr Ahmed},
4 year={2021},
5 eprint={2007.14062},
6 archivePrefix={arXiv},
7 primaryClass={cs.LG}
8}