Kina.ai

Specification

ADR: StoryLM-0 mean NLL

Context

Section 15 seeds ones on per-token NLL, so cotangents are those of the sum. Status docs and Section 15 open issue 1 ask for mean NLL. A reduce_mean VJP is not written. Changing the reverseMode seed would leave the primal as a [B, T] vector.

The restricted pass already implements keepdims reduce_sum (broadcast the incoming cotangent). Host scalars are the existing way to inject 1 / (B · T).

Decision

Specify mean NLL as the existing composition in 26-storylm0-mean-nll.md: keepdims reduce_sum over T then B, times host inv_n. No new operator. Do not add a reduce_mean VJP. Do not replace the Section 24 / 25 train loops.

Consequences