Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-1774: get max subtokens from transformer model #1804

Merged
merged 1 commit into from
Aug 12, 2020

Conversation

alanakbik
Copy link
Collaborator

Previously, the TransformerDocumentEmbeddings truncated all text to 512 subtokens. But some transformer models can handle longer text. With this PR, the max number of subtokens is read from the transformer model and it is only truncated accordingly.

Closes #1774

@alanakbik alanakbik merged commit caa1db9 into master Aug 12, 2020
@alanakbik alanakbik deleted the GH-1774-document-transformer-length branch August 13, 2020 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is TransformerDocumentEmbeddings sentence length is limited to 512 tokens?
1 participant