Reputation: 21
I'm pretty new to AllenNLP and I'm currently using its pre-trained question answering model. I wonder if it has a passage length limit to ensure its performance? I know BERT will have a maximum length of 512 and will truncate longer passages.
I have tried longer passages on AllenNLP and it seems working but I just want to confirm. Thank you.
Upvotes: 2
Views: 201
Reputation: 691
Yes, this model does limit the length of the passage (context) and also potentially the question. You can read more about how it does this in the API docs: https://docs.allennlp.org/models/master/models/rc/dataset_readers/transformer_squad/.
But to summarize, the passage will be parsed into multiple input instances by sliding over a window of stride
tokens when the passage + question contain more than length_limit
tokens.
Upvotes: 2