ggml_gated_linear_attn_back: Backward Pass of Gated Linear Attention

View source: R/operations.R

ggml_gated_linear_attn_backR Documentation

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)

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

Value

A flat tensor holding the five gradients, concatenated

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()


ggmlR documentation built on Oct. 23, 2026, 1:07 a.m.