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
ad_reduce_sum.kinaandstorylm0_mean_nll_step.kinaland without an AD-pass change.- Visitors can see a
[1, 1]mean loss and mean-scaled SGD. They still cannot treat Sections 24 / 25 as mean training. reduce_meanAD and a real corpus remain follow-on work.- The trained 32-token fixture is specified in
27-storylm0-trained-fixture.md.