Validate max_seq_length
#2319
Labels
good first issue
Good for newcomers
journey:intermediate
e.g. model training, api, evaluation...
topic:models
type:feature
New feature or request


Problem
Currently
FARMReaderwill ask users to raisemax_seq_lengthevery time some samples are longer than the value set to it. However, this can be confusing ifmax_seq_lengthis already set to the maximum value allowed by the model, because raising it further will cause hard-to-read CUDA errors.See #2177.
Solution
We should find a way to query the model for the maximum value
max_seq_lengthcan take and tweak the warning message accordingly. We could even use the value to validatemax_seq_length.The text was updated successfully, but these errors were encountered: