quantByteSize

fun quantByteSize(elementCount: ULong, quantType: GGMLQuantizationType): ULong(source)

Compute the total byte size for a quantized tensor.

Return

Number of bytes required to store the tensor

Parameters

elementCount

Total number of logical elements

quantType

The quantization format

Throws

if the element count is not block-aligned