Kina.ai

Specification

ADR: StoryLM-0 seeded categorical sampling

Context

AGENTS.md step 4 asks for deterministic argmax, then seeded sampling, then KV-cache. Section 17 locked greedy index selection. Randomness is a Phase 2 effect. A sample primitive would invent an in-graph PRNG that Phase 0 does not define. Top-k / top-p need sort, which is also unspecified.

Tensor-literal payloads are discarded, so uniforms and temperature must be host tensors.

Decision

Specify categorical sampling as the existing composition in 18-seeded-sampling.md: host-provided Uniform(0, 1) noise, host temperature, Gumbel-max (-log(-log(u))), then Section 17 argmax. No new operator. The seed lives on the host. Do not add top-k, top-p, or a Random effect in this slice.

Consequences