Closed Cheerful0 closed 6 months ago
Hello @Cheerful0,
The max_positions
is here to deal with padding and as a protection. The tokenizer returned by get_pretrained_model
will pad the sequences to this max_positions
and raise an error if a sequence longer than this is passed to it. That way, you are sure to provide the model with sequences of appropriate length and you don't have to deal yourself with batching the inputs!
Hope this helps, Hugo
Hello, In the module of get_pretrained_model, you set the 'max_positions=32', I cannot understand the meaning of this value equal to 32, could you please tell me why set the value in it? Thanks