Support for BigBird
iamakshay1 opened this issue · comments
Hi, I'm able to run a BigBird model in the trivial case:
from transformers import AutoTokenizer, AutoModel
from bertviz import model_view
model_name = 'google/bigbird-roberta-base'
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModel.from_pretrained(model_name, output_attentions=True)
inputs = tokenizer.encode("The cat sat on the mat", return_tensors='pt')
outputs = model(inputs)
attention = outputs[-1] # Output includes attention weights when output_attentions=True
tokens = tokenizer.convert_ids_to_tokens(inputs[0])
model_view(attention, tokens)
Is this a publicly available model that you're working with? If so, would you mind sharing the name and associated code so that I can debug on my end? Thanks!