What you are doing here seems correct

  
    
    
    Strange error when using the Longformer (HuggingFace developers, please reply) 🤗Transformers
  
  
    Hello, 
I am trying to use LongformerForMultipleChoice model, and the code I am using is the following: 
# import the pre-trained HuggingFace Longformer tokenizer.
longformer_tokenizer = LongformerTokenizer.from_pretrained('allenai/longformer-base-4096')

# get the pre-trained HuggingFace Longformer
best_model_longformer = LongformerForMultipleChoice.from_pretrained('allenai/longformer-base-4096',
                                                         output_hidden_states = True)

# my multipl…
  


just make sure when you are passing labels it’s value should be between [0.. num_choices-1]