Counting tokens at scale using tiktokenUsing encode_to_numpy to count number of tokens in large strings to save memory and CPUJul 22, 2025·2 min read·730