SmolLM2-135M runs in the browser. Every number comes from its published weights. The model processes tokens from left to right. The same forward pass scores input sentences and generates new text. Learning is a separate series: a one-layer model trains on sentences you can add to, and each panel is a step of the backward pass.
Weights total 269 MB. The browser downloads them once from the Hugging Face hub and caches them locally. Typed text never leaves the browser. The page requests only the Google Fonts stylesheet, the jsDelivr tokenizer script and the Hugging Face model weights.
Embedding words…
Once per visit the model decodes the 49,152-token vocabulary and centers the embedding table. Arithmetic results can then match against every vocabulary entry. This step takes several seconds.
Computed live in this page from published model weights using transformers.js for tokenization.