ggml_quantize_chunk: Quantize Data Chunk

View source: R/operations.R

ggml_quantize_chunkR Documentation

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)

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

Value

Raw vector containing quantized data

Examples


# 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


ggmlR documentation built on July 14, 2026, 1:08 a.m.