Gradients of ggml_rwkv_wkv6 with respect to all six of its
inputs, given grad, the gradient of the loss with respect to the
recurrence's packed forward result.
ggml_rwkv_wkv6_back(ctx, k, v, r, tf, td, state, grad)A flat tensor holding the six gradients, concatenated
GGML context
The tensors passed to the forward recurrence
Gradient w.r.t. the packed forward result
All six gradients come back in one flat tensor, in the order the forward op
takes its inputs: [d_k | d_v | d_r | d_tf | d_td | d_state].
Training reaches this automatically through the backward graph; it is exported so the gradient can be checked against a numeric one.
ggml_rwkv_wkv6
Other state-space:
ggml_gated_linear_attn(),
ggml_gated_linear_attn_back(),
ggml_rwkv_output(),
ggml_rwkv_wkv6(),
ggml_rwkv_wkv7(),
ggml_rwkv_wkv7_back(),
ggml_ssm_conv(),
ggml_ssm_conv_back(),
ggml_ssm_scan(),
ggml_ssm_scan_back(),
ggml_ssm_scan_output()