gigl.common.utils.feature_quantization.torch_ops#

Torch feature dequantization helpers for dataloader collation.

Quantization lives in numpy_ops.py because preprocessing works with CPU arrays in an environment without torch. Dequantization runs in the dataloader collate path, where packed feature data is already represented as torch tensors.

Functions#

dequantize_torch_tensor(packed_features, metadata)

Reconstruct approximate float features from packed uint8 codes.

Module Contents#

gigl.common.utils.feature_quantization.torch_ops.dequantize_torch_tensor(packed_features, metadata)[source]#

Reconstruct approximate float features from packed uint8 codes.

Parameters:
Return type:

jaxtyping.Float32[torch.Tensor, … {metadata.quantized_feature_dim}]