Open manaswimancha opened 10 months ago
I had the same problem and I had to spend a long time debugging it. It turns out the BOS and EOS are not included in the seq counting for max_input_len
, which is 4096. So when the input docs are long enough, their concatenation seq after tokenization may be "Index out of range" for position embedding. For me, once I set max_length=4094 // len(articles)
for tokenizer, the bug goes away.
I am fine tuning a Longformer Encoder Decoder model for multi document text summarization. When I try to run through the forward pass, it gives me an error "index out of range in self". The input shape seems to be correct, but the debugger points to something in torch Embedding going wrong. How do I fix this?