Transformers: max sentence length

Created on 24 Jan 2019  路  4Comments  路  Source: huggingface/transformers

is there an max sentence length for this bert code?

Most helpful comment

Hi, 512 tokens if you use the pre-trained models. Any length you want if you train your models from scratch.

All 4 comments

Hi, 512 tokens if you use the pre-trained models. Any length you want if you train your models from scratch.

could we set it smaller ? cause if i set it as 512, then result is out of memory

You can just send a smaller input in the model, no need to go to the max

thank you @thomwolf

Was this page helpful?
0 / 5 - 0 ratings