| ggml_set_i32 | R Documentation |
Sets integer data in an I32 tensor. Used for indices (ggml_get_rows) and position tensors (ggml_rope).
ggml_set_i32(tensor, data)
tensor |
Tensor of type GGML_TYPE_I32 |
data |
Integer vector |
NULL (invisible)
ctx <- ggml_init(1024 * 1024)
pos <- ggml_new_tensor_1d(ctx, GGML_TYPE_I32, 10)
ggml_set_i32(pos, 0:9)
ggml_get_i32(pos)
ggml_free(ctx)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.