klyn.math.nn.quantization.DeviceQuantizedMatrix.DeviceQuantizedMatrix
constructor
public DeviceQuantizedMatrix(path as Path, name as String, device as Device = Device.auto)
Description

Loads one Q8 tensor without retaining the open file.

Parameters
ParameterDescription
pathKlyn Q8 v1 shard.
nameTensor name.
deviceCPU/GPU selector; auto chooses a compatible GPU, otherwise CPU.
Throws
  • ValueException for invalid format or device; IOException for failed reads.
Example

matrix = DeviceQuantizedMatrix(Path("model.safetensors"), "lm_head.weight", Device.gpu[0])