def _interleave_repeat_scale_zp(
        weight: np.ndarray, scale: np.ndarray, zero_point: Optional[np.ndarray]
    ) -> Tuple[np.ndarray, Optional[np.ndarray]]:
        """
        The scale and zero-point both have shape [.., block_num, ..], which means each scale is
        for one block. As weight has shape [.., block_num*block_size, ..], we need to interleave
        repeat them, so they can be applied to all blocks at once.
        """
        scale_repeated = scale
        zero_point_repeated = zero_point
        for axis, weight_dim_size in enumerate(weight.shape):
            scale_dim_size = scale.shape[axis]
            if weight_dim_size != scale_dim_size and scale_dim_size != 1:
                # Only repeat axis where dim size is not 1, because 1 will be auto-broadcast by np.
                block_size = weight_dim_size // scale.shape[axis]
                scale_repeated = np.repeat(scale_repeated, block_size, axis=axis)
                if zero_point_repeated is not None:
                    zero_point_repeated = np.repeat(zero_point_repeated, block_size, axis=axis)
        return scale_repeated, zero_point_repeated

        The scale and zero-point both have shape [.., block_num, ..], which means each scale is
        for one block. As weight has shape [.., block_num*block_size, ..], we need to interleave
        repeat them, so they can be applied to all blocks at once.
        
coremltools/converters/mil/frontend/torch/converter.py