klyn.math.nn.quantization.DeviceQuantizedMatrix.DeviceQuantizedMatrix
constructor
public DeviceQuantizedMatrix(reader as SafetensorsReader, info as TensorInfo, device as Device, buffer as Byte[])
Description

Loads a published F32/F16/BF16 Safetensors matrix in its original encoding, without silently quantizing it. Shape and byte ranges come from the validated reader. The caller owns the reader; upload memory stays bounded.

Parameters
ParameterDescription
readerValidated shared reader. @param info Exact tensor descriptor.
deviceExecution selector. @param buffer Reusable upload storage.
Throws
  • ValueException for incompatible shapes, encodings or upload buffers.
Example

matrix = DeviceQuantizedMatrix(reader, info, Device.cpu, buffer)