Closed fanpeeps closed 11 months ago
When len(string) > 32k, this produces no response (num_tokens = None):
encoding = tiktoken.get_encoding("cl100k_base") num_tokens = len(encoding.encode(string))
Does encoder have a # tokens limit?
This works just fine for me:
import tiktoken s = "a b c" * 32000 encoding = tiktoken.get_encoding("cl100k_base") print("num_tokens", len(encoding.encode(s)))
Feel free to re-open if you have a clear repro
When len(string) > 32k, this produces no response (num_tokens = None):
Does encoder have a # tokens limit?