Compose the tiny language-model pieces into a bounded decoder that follows a learned transition table and exposes its generated sequence.
Required APIdef nanogpt_generate(tokens, transitions, steps):
return generated_tokensBehaviorThink through the mechanism first if you want the extra reasoning step. It never blocks the editor.
nanogpt_generate(['a'], {'a': [['b', 2], ['c', 1]], 'b': [['d', 1]]}, 2)the decoder chooses the strongest learned local transition
nanogpt_generate(['x'], {}, 2)generation remains bounded when the model is uncertain
2 hidden edge tests run after the visible contract passes.
Run Tests to see the contract verdicts here.