Quantized convolution modules¶
Quantized convolution modules store packed affine int4/int8 weights and keep floating-point sparse activations. Coordinate semantics match the floating module with the same geometry.
Module summary¶
Module |
Floating source |
Coordinate support |
|---|---|---|
|
|
Forward or explicit target support. |
|
|
Input coordinate identity. |
|
|
Transposed relation support. |
|
|
Generated transpose-convolution support. |
- class mlx_lattice.nn.quantized_conv.QuantizedConv3d(in_channels, out_channels, *, kernel_size=3, stride=1, padding=0, dilation=1, bias=True, group_size=None, bits=4)[source]¶
Bases:
_QuantizedConvBaseAffine weight-quantized sparse 3D convolution module.
Weights are stored as packed int4/int8 affine
QuantizedWeightmetadata. Activations remain floating point. Coordinate semantics matchmlx_lattice.nn.Conv3d.- Parameters:
- class mlx_lattice.nn.quantized_conv.QuantizedConvTranspose3d(in_channels, out_channels, *, kernel_size=2, stride=2, padding=0, dilation=1, bias=True, group_size=None, bits=4)[source]¶
Bases:
_QuantizedConvBaseAffine weight-quantized sparse transpose-convolution module.
Activations remain floating point and weight storage is packed affine int4/int8. Coordinate generation matches
ConvTranspose3d.- Parameters:
- classmethod from_conv(source, group_size=None, bits=4)[source]¶
- Return type:
- Parameters:
source (ConvTranspose3d)
group_size (int | None)
bits (int)
- class mlx_lattice.nn.quantized_conv.QuantizedGenerativeConvTranspose3d(in_channels, out_channels, *, kernel_size=2, stride=2, bias=True, group_size=None, bits=4)[source]¶
Bases:
_QuantizedConvBaseAffine weight-quantized generative transpose-convolution module.
The module stores packed affine weights and delegates coordinate generation to the generative transpose-convolution relation.
- Parameters:
- classmethod from_conv(source, group_size=None, bits=4)[source]¶
- Return type:
- Parameters:
source (GenerativeConvTranspose3d)
group_size (int | None)
bits (int)
- class mlx_lattice.nn.quantized_conv.QuantizedSubmConv3d(in_channels, out_channels, *, kernel_size=3, dilation=1, bias=True, group_size=None, bits=4)[source]¶
Bases:
_QuantizedConvBaseAffine weight-quantized submanifold convolution module.
Coordinate identity is preserved exactly as in
SubmConv3d.- Parameters:
- classmethod from_conv(source, group_size=None, bits=4)[source]¶
- Return type:
- Parameters:
source (SubmConv3d)
group_size (int | None)
bits (int)