Learn R Programming

ggmlR (version 0.8.4)

ggml_gated_linear_attn_back: Backward Pass of Gated Linear Attention

Description

Gradients of ggml_gated_linear_attn, packed in forward source order: [d_k | d_v | d_q | d_g | d_state].

Usage

ggml_gated_linear_attn_back(ctx, k, v, q, g, state, grad, scale)

Value

A flat tensor holding the five gradients, concatenated

Arguments

ctx

GGML context

k, v, q, g, state

The tensors passed to the forward op

grad

Gradient w.r.t. the packed forward result

scale

The scale the forward op was built with

See Also

ggml_gated_linear_attn

Other state-space: ggml_gated_linear_attn(), ggml_rwkv_output(), ggml_rwkv_wkv6(), ggml_rwkv_wkv6_back(), 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()