Kina.ai

Specification

ADR: StoryLM-0 host generation loop

Context

Section 19 leaves multi-step generation as a host driver: while cannot grow the cache axis, and a fused generate primitive would invent a token clock and a T_max write that Phase 0 does not define. AGENTS.md step 4 asks for that host loop after the one-step KV append.

gather, rank-4 attention, concat, and argmax are already specified. The missing piece is the driver that calls them in sequence.

Decision

Specify generation as the existing composition in 20-host-generation-loop.md: a host loop around static-S decode functions (embed → QKV → Section 19 append/attend → logits) plus Section 17 argmax. No new operator. Do not grow S inside while. Do not add scatter-into-T_max. This instance is greedy from one seed token for three steps.

Consequences