← All lessons
Data
6 lessons you click through step by step
- How hash tables workHash a key into a bucket, chain the collisions, and watch the table double when it fills up
- How tokenizers workTrain byte-pair merges on a tiny corpus, then see why some text costs more tokens
- How floating point worksRead the sign, exponent and mantissa bits of a real double, then see why 0.1 + 0.2 isn't 0.3
- How UTF-8 worksTurn code points into 1 to 4 bytes, then see why a string's length depends on who counts
- How base64 worksTurn every 3 bytes into 4 characters, pad the rest, and keep tokens safe in a URL
- How gzip compression worksSqueeze repeated text into back-references and watch bytes drop