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

remove tokens that exceed the max_seq_len #274

Open
p11188536 opened this issue Sep 5, 2023 · 1 comment
Open

remove tokens that exceed the max_seq_len #274

p11188536 opened this issue Sep 5, 2023 · 1 comment

Comments

@p11188536
Copy link

I want to remove tokens that exceed the max_seq_len. How can I achieve this functionality?

@Qubitium
Copy link

Qubitium commented Sep 6, 2023

token_in  = tokenizer.encode(input)

// do your python array slice limit <= max_seq_len here
// ask bing/gpt how to return a sub-slice of a python slice/array

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

No branches or pull requests

2 participants