| ggml_cast_numeric | R Documentation |
Converts values numerically (truncating or rounding) rather than
reinterpreting the bits as ggml_cast does. Supports
F32<->I32, F32<->I16, F32<->I8, F16<->F32 and BF16<->F32.
ggml_cast_numeric(ctx, a, type)
ctx |
GGML context |
a |
Source tensor |
type |
Target type constant (e.g. |
Tensor of the requested type with a's shape
ggml_cast
ctx <- ggml_init(16 * 1024 * 1024)
a <- ggml_new_tensor_1d(ctx, GGML_TYPE_F32, 10)
i <- ggml_cast_numeric(ctx, a, GGML_TYPE_I32)
ggml_free(ctx)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.