ML from scratch: live demos

Two models I trained from scratch, running entirely in your browser: nothing is sent to a server. By Sekou Kaba · code on GitHub.

Caption a photo

A frozen ResNet-50 and a Transformer decoder trained on Flickr8k write a caption, then show where they looked for each word. Pick a photo or use your own.

ONNX export of the model (model card), run with ONNX Runtime Web. About 80 MB, downloaded once. Sample photos: Unsplash via Wikimedia Commons, CC0 (Jeremy Bishop, Mars Williams, Nathan Shively, Daria Nepriakhina).

Byte-pair encoding: how a language model cuts text

Two tokenizers of 4,096 tokens, one trained on an English novel, one on a French one. Type anything; each colour is one token.

Trained on English
Trained on French

‹C3 A9›: bytes of a character the tokenizer never merged (é is 2 bytes). · stands for a space. Tokenizer card.