exllama icon indicating copy to clipboard operation
exllama copied to clipboard

remove tokens that exceed the max_seq_len

Open p11188536 opened this issue 2 years ago • 1 comments

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

p11188536 avatar Sep 05 '23 14:09 p11188536

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

Qubitium avatar Sep 06 '23 10:09 Qubitium