Skip to main content

ClikaRT::QTensor

struct

Header: ClikaRT/compute/q_tensor.h

A quantized weight, viewed with its scheme. A value type over a refcounted payload handle; copying a QTensor never copies weight bytes.

Data members

payload

Tensor payload

The packed payload exactly as loaded (for a GGUF block scheme: UInt8 [rows, row_bytes], mmap-backed). The quantization metadata stays attached to the tensor itself (payload.is_quantized() is true).

Declared in ClikaRT/compute/q_tensor.h, line 71

scheme

std::string scheme

The scheme's name, e.g. "GGUF_Q8_0", "GGUF_Q4_K".

Declared in ClikaRT/compute/q_tensor.h, line 73

logical_shape

std::vector<std::int64_t> logical_shape

The element shape the payload encodes. A GGUF matrix arrives as [in_features, out_features] (the row-contiguous dim first).

Declared in ClikaRT/compute/q_tensor.h, line 76

global_scale

Tensor global_scale

The scheme's encode-time global scale when it carries one (NVFP4's alpha, the value the stored sub-scales were folded with; the consuming matmul applies the trailing ×(1/alpha)). Empty for every scheme without one. Rebuilding a payload through make_quantized (e.g. after concatenating siblings) must pass this through, or the re-made weight silently serves un-descaled.

Declared in ClikaRT/compute/q_tensor.h, line 83