klyn.math.nn.quantization.GpuQuantizedMatrix.GpuQuantizedMatrix
constructor
public GpuQuantizedMatrix(reader as SafetensorsReader, name as String, device as Device, buffer as Byte[] = null)
Description

Loads through a shared descriptor reader, owned and closed by the caller. The reader is seeked and must not be shared concurrently.

Parameters
ParameterDescription
readerValidated open shard.
nameTensor name.
deviceGPU selector.
bufferOptional bounded upload block shared by a checkpoint loader.
Throws
  • ValueException for incompatible metadata, shape or device.
Example

matrix = GpuQuantizedMatrix(reader, "projection.weight", Device.gpu[0])