A verify forward's hidden-layer capture. The graph calls it once per
decoder layer, in layer order, with that layer's residual output, then once
with index layerCount (the decoder's layer count) and the post-final-norm
output, all before the forward returns. hidden [sequences, tokens per
sequence, hidden-width] is borrowed and possibly unevaluated: it is valid
only during the call. The callback copies the layers it keeps (for example
with ops.contiguous) and owns and disposes those copies.
A verify forward's hidden-layer capture. The graph calls it once per decoder layer, in layer order, with that layer's residual output, then once with index
layerCount(the decoder's layer count) and the post-final-norm output, all before the forward returns.hidden[sequences, tokens per sequence, hidden-width] is borrowed and possibly unevaluated: it is valid only during the call. The callback copies the layers it keeps (for example withops.contiguous) and owns and disposes those copies.