| ggml_ssm_conv_back | R Documentation |
Gradients of ggml_ssm_conv with respect to both of its inputs,
given grad, the gradient of the loss with respect to the convolution's
output.
ggml_ssm_conv_back(ctx, sx, c, grad)
ctx |
GGML context |
sx |
The |
c |
The |
grad |
Gradient w.r.t. the output, shaped like it: |
Training reaches this automatically through the backward graph – an
ggml_ssm_conv node is differentiable, unlike the other
state-space and RWKV ops. It is exported so the gradient can be checked
directly against a numeric one.
A flat tensor holding d_sx followed by d_c
Both gradients come back in one flat tensor, [d_sx | d_c]: the first
ggml_nelements(sx) elements are the gradient with respect to
sx, the remaining ggml_nelements(c) the gradient with respect
to c. A single op returns a single tensor, and packing them keeps the
convolution from being run once per input.
ggml_ssm_conv
Other state-space:
ggml_gated_linear_attn(),
ggml_gated_linear_attn_back(),
ggml_rwkv_output(),
ggml_rwkv_wkv6(),
ggml_rwkv_wkv6_back(),
ggml_rwkv_wkv7(),
ggml_rwkv_wkv7_back(),
ggml_ssm_conv(),
ggml_ssm_scan(),
ggml_ssm_scan_back(),
ggml_ssm_scan_output()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.