Tensor size error when generating embeddings for documents using pre-trained models

Thanks @swtb .You are right, the model only supports the length of 512 tokens. My solution is to use other models that support longer length.