klyn.math.nn.quantization.DeviceQuantizedMatrix.DeviceQuantizedMatrix
constructor
public DeviceQuantizedMatrix(notnull values as NDArray<Float>, device as Device = Device.auto)
Description

Copies a computed F32 matrix into owned resident storage in bounded blocks. Used for reconstructed EMA codebooks, never silently quantizes values.

Parameters
ParameterDescription
valuesNonempty rank-two matrix. @param device Execution selector.
Throws
  • ValueException for invalid shape/device or non-finite values.
Example

matrix = DeviceQuantizedMatrix(codebook, Device.cpu)