tiktokenEasy Playground

Fast BPE tokenizer used by OpenAI models

Getting started with tiktokenRun locally
Install
pip install tiktoken
Python CodeRun locally
Expected Output
# Expected output shown below
# (Run locally with: tiktoken)

tiktoken is a third-party package. Fast BPE tokenizer used by OpenAI models. Install with: pip install tiktoken

Challenge

Try modifying the code above to explore different behaviors. Can you extend the example to handle a new use case?