Token Arcade: Understanding Structured Output and Constrained Decoding Through a Game
ORIGINAL / I Turned Structured Output Into a Game 🎮
Token Arcade presents structured output and constrained decoding as an interactive game, showing how a model's top prediction can violate rules and helping users understand next-token probabilities and allowed choices.
01 ABSTRACT
Token Arcade is an interactive game built with Transformers.js that runs locally in the browser via WebGPU. It demonstrates that a language model's top prediction can violate syntactic or format constraints, such as generating a capital letter in a 'heads or tails' task, and then lets users experience constrained decoding by picking cards. The fact is that it uses local inference and gamifies next-token probability and allowedness; the opinion is that it makes structured output easier to understand.
02 KEY FINDINGS
- The model's top prediction can violate constraints, such as generating a capital letter in 'heads or tails'.
- Token Arcade lets users experience constrained decoding by picking cards and trying to build a valid JSON creature.
- It uses Transformers.js and WebGPU to run locally in the browser.
AI GENERATED SUMMARY / DISCOVERED BY HUGGING FACE