def _replace_weight_fake_quant_for_embedding_layers(self, model: _fx.GraphModule):
        """
        Changes qscheme of embedding layers from float qparams to integer qparams.
        """
        for node in model.graph.nodes:
            if node.op == "call_module":
                layer = _find_target(model, node.target)
                if (
                    isinstance(layer, _torch.nn.Embedding)
                    and hasattr(layer, "weight_fake_quant")
                    and isinstance(layer.weight_fake_quant, _aoquant.FakeQuantize)
                ):
                    weight_dtype = layer.weight_fake_quant.dtype
                    delattr(layer, "weight_fake_quant")

                    observer_cls = type(layer.qconfig.weight().activation_post_process)

                    layer.weight_fake_quant = _aoquant.FakeQuantize(
                        observer=observer_cls,
                        dtype=weight_dtype,
                        qscheme=_QuantizationScheme.get_qscheme(
                            self._quantization_scheme, is_per_channel=True
                        ),
                        ch_axis=self._get_default_quantization_options()["weight_ch_axis"],
                    )
                elif (
                    isinstance(layer, _torch.nn.Embedding)
                    and hasattr(layer, "weight_fake_quant")
                    and isinstance(layer.weight_fake_quant, _LearnableFakeQuantize)
                ):
                    weight_dtype = layer.weight_fake_quant.dtype
                    weight_device = layer.weight_fake_quant.device
                    # Get the actual shape of weights from the layer itself
                    weight_shape = layer.weight.shape
                    weight_ch_axis = layer.weight_fake_quant.ch_axis
                    delattr(layer, "weight_fake_quant")

                    observer_cls = type(layer.qconfig.weight().activation_post_process)

                    layer.weight_fake_quant = _LearnableFakeQuantize(
                        observer=observer_cls,
                        dtype=weight_dtype,
                        qscheme=_QuantizationScheme.get_qscheme(
                            self._quantization_scheme, is_per_channel=True
                        ),
                    )

                    layer.weight_fake_quant.set_device(weight_device)
                    if weight_ch_axis != -1:
                        layer.weight_fake_quant.set_ch_axis(weight_ch_axis)
                        assert weight_shape is not None
                        layer.weight_fake_quant.set_param_shape(weight_shape)

        Changes qscheme of embedding layers from float qparams to integer qparams.
        
coremltools/optimize/torch/quantization/_configure.py