AI Tokenizer Demo

A small demo app showcasing how the texts are encoded into tokens and how they are decoded back to characters by AI Tokenizer

This is inspired by Steve Kinney's Python: AI & Hugging Face Workshop on Frontend Masters

Built using Hugging Face Transformers.js CDN/library and Models to tokenize, encode and decode text using various AI models

Choose a Model

Enter text to tokenize & encode


Converts text by adding special tokens and converting them to IDs respective to the model chosen.

Decode Tokens


Converts encoded IDs back to text.

Model used

Model's max text length

Tokenized

Encoded

Decoded