def _adjust_qconfig_for_module_type(
        cls,
        mod_type: _Any,
        qconfig: _aoquant.QConfig,
        quantization_config: _ModuleLinearQuantizerConfig,
    ) -> _aoquant.QConfig:
        """
        Enforces Embedding layers to use float qparams, because that's preferred by prepare_qat_fx.
        Overwrites ch_axis for ConvTranspose layers if qscheme is not per_tensor
        """
        if mod_type in [
            _torch.nn.Embedding,
            _torch.nn.ConvTranspose1d,
            _torch.nn.ConvTranspose2d,
            _torch.nn.ConvTranspose3d,
        ]:
            weight = qconfig.weight()
            weight_dtype = weight.dtype
            if weight_dtype == _torch.float:
                return qconfig

            weight_per_channel = cls._get_default_quantization_options()["weight_per_channel"]
            weight_observer = type(weight.activation_post_process)

            if mod_type == _torch.nn.Embedding:
                ch_axis = None
                weight_qscheme = _torch.per_channel_affine_float_qparams
                # we do not want to quantize inputs to Embedding layer because they are integers
                activation_config = _NoopObserver.with_args(dtype=_torch.float)
            else:
                if hasattr(weight, "qscheme") and weight.qscheme not in [
                    _torch.per_tensor_affine,
                    _torch.per_tensor_symmetric,
                ]:
                    ch_axis = 1
                    weight_qscheme = weight.qscheme
                    # preserve activation config for ConvTranspose ops
                    activation_config = qconfig.activation
                    weight_per_channel = (
                        weight_per_channel
                        if quantization_config is None
                        else quantization_config.weight_per_channel
                    )
                else:
                    return qconfig

            return _aoquant.QConfig(
                activation=activation_config,
                weight=cls._create_fake_quantize_partial_from_kwargs(
                    True,
                    weight_observer,
                    weight_dtype,
                    weight_qscheme,
                    weight_per_channel=weight_per_channel,
                    quant_min=weight.quant_min,
                    quant_max=weight.quant_max,
                    ch_axis=ch_axis,
                    quantization_config=quantization_config,
                ),
            )
        return qconfig

        Enforces Embedding layers to use float qparams, because that's preferred by prepare_qat_fx.
        Overwrites ch_axis for ConvTranspose layers if qscheme is not per_tensor
        
coremltools/optimize/torch/quantization/_qconfig_mapping.py