allenai / longformer

Longformer: The Long-Document Transformer
https://arxiv.org/abs/2004.05150
Apache License 2.0
2.05k stars 276 forks source link

The expanded size of the tensor (4096) must match the existing size (512) at non-singleton dimension 1. #231

Closed vqiangv closed 2 years ago

vqiangv commented 2 years ago

When i run the model, there is an error.

Token indices sequence length is longer than the specified maximum sequence length for this model (4002 > 512). Running this sequence through the model will result in indexing errors.

and

The expanded size of the tensor (4096) must match the existing size (512) at non-singleton dimension 1.  Target sizes: [1, 4096].  Tensor sizes: [1, 512].

I do not what to do.