| ggml_rwkv_output | R Documentation |
ggml_rwkv_wkv6, ggml_rwkv_wkv7 and
ggml_gated_linear_attn all return one
[S * H, n_tokens + S * n_seqs] tensor holding the per-token outputs
followed by the final state. These helpers view either half, so the column
arithmetic lives in one place rather than at every call site.
ggml_rwkv_output(ctx, result, k)
ggml_rwkv_state(ctx, result, k, state)
ctx |
GGML context |
result |
The tensor returned by one of the RWKV / GLA ops |
k |
The |
state |
The |
Both are graph views sharing memory with result and add no
computation. k must be the same tensor the op was built with, since
S, H and n_tokens are read from it.
For ggml_rwkv_output(), a tensor [S * H, n_tokens]
For ggml_rwkv_state(), a tensor [S * H, S * n_seqs]
Other state-space:
ggml_gated_linear_attn(),
ggml_gated_linear_attn_back(),
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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.