| ggml_flash_attn_back | R Documentation |
Backward pass for Flash Attention. Used during training to compute gradients through attention.
ggml_flash_attn_back(ctx, q, k, v, d, masked = TRUE)
ctx |
GGML context |
q |
Query tensor (same as forward pass) |
k |
Key tensor (same as forward pass) |
v |
Value tensor (same as forward pass) |
d |
Gradient tensor from upstream (same shape as forward output) |
masked |
Logical: whether causal masking was used in forward pass |
Gradient tensor
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.