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

[tokenizers] support stride in tokenizers #2006

Merged
merged 1 commit into from
Sep 9, 2022

Conversation

siddvenk
Copy link
Contributor

@siddvenk siddvenk commented Sep 9, 2022

Description

This PR adds support for utilizing the stride parameter in truncation. Users can now pass in the stride value and get the overflowing encodings. See #1996

One thought I had is whether we should add a flag to the tokenizer that indicates whether a user wants overflows returned. I'm not sure how often these overflows are used in practice, but I imagine there are cases where tokenization results in overflow but the user doesn't care about them. We could avoid JNI calls in these situations by adding a flag.

@siddvenk siddvenk merged commit c974939 into deepjavalibrary:master Sep 9, 2022
@siddvenk siddvenk deleted the tokenizer-stride branch September 9, 2022 22:29
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.

2 participants