ltx23_nf4_dequantize

Dequantize NF4 data to a float tensor

Description

Dequantize NF4 data to a float tensor

Usage

ltx23_nf4_dequantize(packed, absmax, shape, dtype = torch::torch_bfloat16(),
                     chunk_elements = 8388608L, out = NULL)

Arguments

  • packed: uint8 tensor of packed index pairs.
  • absmax: float32 tensor of per-block scales.
  • shape: Integer vector. Original tensor shape.
  • dtype: Target torch dtype.
  • chunk_elements: Integer. Elements dequantized per slice (bounds the int64 index temporary).
  • out: Optional preallocated tensor of shape to write into (avoids allocating a fresh weight tensor per call).

Value

Tensor of shape in dtype on the input’s device.