ggml_rwkv_wkv7_back: Backward Pass of the RWKV-7 WKV Recurrence

View source: R/operations.R

ggml_rwkv_wkv7_backR Documentation

Backward Pass of the RWKV-7 WKV Recurrence

Description

Gradients of ggml_rwkv_wkv7 with respect to all seven of its inputs, packed in forward source order: [d_r | d_w | d_k | d_v | d_a | d_b | d_state].

Usage

ggml_rwkv_wkv7_back(ctx, r, w, k, v, a, b, state, grad)

Arguments

ctx

GGML context

r, w, k, v, a, b, state

The tensors passed to the forward recurrence

grad

Gradient w.r.t. the packed forward result

Value

A flat tensor holding the seven gradients, concatenated

See Also

ggml_rwkv_wkv7

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_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.