Learn R Programming

ggmlR (version 0.6.1)

ggml_quantize_chunk: Quantize Data Chunk

Description

Quantizes a chunk of floating-point data to a lower precision format.

Usage

ggml_quantize_chunk(type, src, nrows, n_per_row)

Value

Raw vector containing quantized data

Arguments

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

Examples

Run this code
# \donttest{
# 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
# }

Run the code above in your browser using DataLab