Context
AGENTS.md step 4 asks for functional SGD before AdamW. Section 11
locked SGD as w - broadcast(lr) * g. Section 15 applies that
rule to every decoder weight. Common LLM training uses AdamW
(moments, bias correction, decoupled weight decay).
A new adamw primitive would invent fusion, mutability, and a
step clock that the numbered specs do not define. Tensor-literal
payloads are discarded, so constants must be host tensors.
Decision
Specify AdamW as the existing composition in
16-functional-adamw.md:
PyTorch AdamW algebra, host-provided scalars including one
and host-computed β**t, result (w', m', v'). No new operator.
Do not differentiate through the update. Do not add argmax or
sampling in this slice.
Consequences
adamw_step.kinaand a.sonumeric check land without compiler-pass changes.- Visitors can see a typed AdamW step; they still cannot train a model end-to-end in Kina.
- Decoder-wide AdamW is
25-storylm0-decoder-adamw.md. Mean NLL remains follow-on work.