| ggml_quantize_chunk | R Documentation |
Quantizes a chunk of floating-point data to a lower precision format.
ggml_quantize_chunk(type, src, nrows, n_per_row)
type |
Target GGML type (e.g., GGML_TYPE_Q4_0) |
src |
Source numeric vector (F32 data) |
nrows |
Number of rows |
n_per_row |
Number of elements per row |
Raw vector containing quantized data
# Quantize 256 floats to Q8_0 (block size 32)
data <- rnorm(256)
quantized <- ggml_quantize_chunk(GGML_TYPE_Q8_0, data, 1, 256)
ggml_quantize_free() # Clean up
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.