Artifact weights¶ class torch_lattice.artifact.weights.PackedWeight(weight, scales, biases)[source]¶ Bases: object Affine group-quantized artifact storage tensors. Parameters: weight (Tensor) scales (Tensor) biases (Tensor) weight: Tensor¶ scales: Tensor¶ biases: Tensor¶ torch_lattice.artifact.weights.dequantize_artifact_weight(tensor, *, bits, group_size, scale_dtype='f16')[source]¶ Round-trip a logical weight through artifact quantization. Return type: Tensor Parameters: tensor (Tensor) bits (int) group_size (int) scale_dtype (str) torch_lattice.artifact.weights.pack_quantized_weight(tensor, *, bits, group_size, scale_dtype)[source]¶ Pack a logical artifact weight using affine group quantization. Return type: PackedWeight Parameters: tensor (Tensor) bits (int) group_size (int) scale_dtype (str)