| ggml_ssm_scan_output | R Documentation |
ggml_ssm_scan returns the outputs and the final states in one
flat tensor. These helpers view either half with the right shape, so the
offset arithmetic lives in one place: ggml_ssm_scan_output() yields
the outputs shaped like x, and ggml_ssm_scan_state() the final
states shaped like the leading n_seqs rows of s.
ggml_ssm_scan_output(ctx, result, x)
ggml_ssm_scan_state(ctx, result, s, ids)
ctx |
GGML context |
result |
The tensor returned by |
x |
The |
s |
The |
ids |
The |
Both are graph views sharing memory with result; they add no
computation. x, s and ids must be the same tensors the
scan was built with, since their shapes are what the offsets are derived
from.
For ggml_ssm_scan_output(), a tensor shaped like x
For ggml_ssm_scan_state(), a tensor
[d_state, head_dim, n_head, n_seqs]
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_rwkv_wkv7_back(),
ggml_ssm_conv(),
ggml_ssm_conv_back(),
ggml_ssm_scan(),
ggml_ssm_scan_back()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.