openai / tiktoken

tiktoken is a fast BPE tokeniser for use with OpenAI's models.
MIT License
11.98k stars 816 forks source link

Add Terminal-Based Visualization Tool for Tokenized Data Points in Tiktoken Tokenizer #314

Open LVivona opened 3 months ago

LVivona commented 3 months ago

Key Features

Benefits

import tiktoken
enc = tiktoken.get_encoding("gpt2")
enc.environment()
Screenshot 2024-06-18 at 12 17 01 PM