def _convert_float_to_float16(self, model, use_symbolic_shape_infer=True, **kwargs):
        """Convert a model to half (default) or mixed precision.

            To use mixed precision, user need specify which graph inputs, outputs, operator type
            or list of nodes shall keep in float32.

            By default, we use symbolic shape inference to get shape and type information.
            If not, ONNX shape inference will be used.

            Note that symbolic/ONNX shape inference might fail, and the conversion might not proceed
            without shape and type information.

        Args:
            model (ModelProto): ONNX model to be converted to half or mixed precision.
            use_symbolic_shape_infer (bool, optional): use symbolic shape inference instead of onnx shape inference.
                                                   Defaults to True.
            kwargs: other parameters for float_to_float16 conversion. See below for details.
            keep_io_types (Union[bool, List[str]], optional): boolean or a list of float32 input/output names.
                                                              If True, model inputs/outputs should be left as float32.
                                                              Defaults to True.
            op_block_list (List[str], optional): List of operator types to leave as float32.
                                                 Defaults to None, which will use `float16.DEFAULT_OP_BLOCK_LIST`.
            node_block_list (List[str], optional): List of node names to leave as float32. Defaults to None.
            force_fp16_initializers(bool): force converting all float initializers to float16.
                                           Default to false.
            min_positive_val (float, optional): minimal positive value. Defaults to 1e-7.
            max_finite_val (float, optional): maximal finite value. Defaults to 1e4.

        """
        from onnxruntime.transformers.float16 import convert_float_to_float16
        from onnxruntime.transformers.shape_infer_helper import SymbolicShapeInferenceHelper

        if "keep_io_types" not in kwargs:
            kwargs["keep_io_types"] = True

        if use_symbolic_shape_infer:
            # Use symbolic shape inference since custom operators (like Gelu, SkipLayerNormalization etc)
            # are not recognized by onnx shape inference.
            shape_infer_helper = SymbolicShapeInferenceHelper(model, verbose=0)
            try:
                model_with_shape = shape_infer_helper.infer_shapes(model, auto_merge=True, guess_output_rank=False)

                # auto_merge might cause issue (see https://github.com/microsoft/onnxruntime/issues/15521)
                # we only merge tensor data type but not shape information back to the original onnx model.
                # Note that float16 conversion need data type but not shape information.
                if model_with_shape is not None:
                    name_vi = {}
                    for vi in model_with_shape.graph.value_info:
                        vi_copy = ValueInfoProto()
                        vi_copy.CopyFrom(vi)
                        if hasattr(vi_copy.type, "tensor_type") and hasattr(vi_copy.type.tensor_type, "shape"):
                            vi_copy.type.tensor_type.ClearField("shape")
                        name_vi[vi.name] = vi_copy

                    for vi in model.graph.value_info:
                        if vi.name in name_vi:
                            del name_vi[vi.name]
                    for vi in name_vi.values():
                        model.graph.value_info.append(vi)
            except Exception:
                logger.warning(
                    "Failed to run symbolic shape inference. Please file an issue"
                    " in https://github.com/microsoft/onnxruntime."
                )

        parameters = {"disable_shape_infer": use_symbolic_shape_infer}
        parameters.update(
            {
                key: kwargs[key]
                for key in [
                    "keep_io_types",
                    "min_positive_val",
                    "max_finite_val",
                    "op_block_list",
                    "node_block_list",
                    "force_fp16_initializers",
                ]
                if key in kwargs
            }
        )

        return convert_float_to_float16(model, **parameters)
Convert a model to half (default) or mixed precision.

            To use mixed precision, user need specify which graph inputs, outputs, operator type
            or list of nodes shall keep in float32.

            By default, we use symbolic shape inference to get shape and type information.
            If not, ONNX shape inference will be used.

            Note that symbolic/ONNX shape inference might fail, and the conversion might not proceed
            without shape and type information.

        Args:
            model (ModelProto): ONNX model to be converted to half or mixed precision.
            use_symbolic_shape_infer (bool, optional): use symbolic shape inference instead of onnx shape inference.
                                                   Defaults to True.
            kwargs: other parameters for float_to_float16 conversion. See below for details.
            keep_io_types (Union[bool, List[str]], optional): boolean or a list of float32 input/output names.
                                                              If True, model inputs/outputs should be left as float32.
                                                              Defaults to True.
            op_block_list (List[str], optional): List of operator types to leave as float32.
                                                 Defaults to None, which will use `float16.DEFAULT_OP_BLOCK_LIST`.
            node_block_list (List[str], optional): List of node names to leave as float32. Defaults to None.
            force_fp16_initializers(bool): force converting all float initializers to float16.
                                           Default to false.
            min_positive_val (float, optional): minimal positive value. Defaults to 1e-7.
            max_finite_val (float, optional): maximal finite value. Defaults to 1e4.

        
olive/passes/onnx/mixed_precision.py