openai / tiktoken

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

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

Open LVivona opened 5 months ago

LVivona commented 5 months ago

Key Features

Benefits

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