Token Arcade turns LLM structured output into a game, running Gemma 4 in-browser

nicodotdev · x · 2026-10-13

Developer nicodotdev turned LLM structured output into a playable game, Token Arcade: the LLM scores the next token, you pick one, and constraints decide if it's allowed — showing that 'most likely ≠ valid', where even a capital letter can cost you points. Challenges include heads-or-tails and building a tiny JSON creature one token at a time. It runs Google Gemma 4 locally in the browser via Transformers.js + WebGPU, downloading the model on first visit. A fun, hands-on lesson in constrained decoding.

Related event: Token Arcade turns LLM structured output into a browser game(4 posts)→

Original post →

More from coding & agent

coding & agent channel →