| ggml_view_4d | R Documentation |
Creates a 4D view of a tensor starting at a byte offset. The view shares memory with the source tensor. CRITICAL for KV-cache operations in transformers.
ggml_view_4d(ctx, a, ne0, ne1, ne2, ne3, nb1, nb2, nb3, offset = 0)
ctx |
GGML context |
a |
Source tensor |
ne0 |
Size of dimension 0 |
ne1 |
Size of dimension 1 |
ne2 |
Size of dimension 2 |
ne3 |
Size of dimension 3 |
nb1 |
Stride for dimension 1 (in bytes) |
nb2 |
Stride for dimension 2 (in bytes) |
nb3 |
Stride for dimension 3 (in bytes) |
offset |
Byte offset from the start of tensor data |
View tensor
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.