Backward pass for Flash Attention. Used during training to compute gradients through attention.
ggml_flash_attn_back(ctx, q, k, v, d, masked = TRUE)Gradient tensor
GGML context
Query tensor (same as forward pass)
Key tensor (same as forward pass)
Value tensor (same as forward pass)
Gradient tensor from upstream (same shape as forward output)
Logical: whether causal masking was used in forward pass