{"library":"onnxconverter-common","title":"ONNX Converter and Optimization Tools","description":"The `onnxconverter-common` package provides common functions and utilities for use in converters from various AI frameworks to ONNX. It also enables different converters to work together, such as converting a scikit-learn pipeline embedding an XGBoost model. It is actively maintained by Microsoft with frequent releases, often tied to ONNX and ONNX Runtime updates, focusing on compatibility and optimization.","language":"python","status":"active","last_verified":"Fri May 15","install":{"commands":["pip install onnxconverter-common"],"cli":null},"imports":["from onnxconverter_common import float16\nmodel_fp16 = float16.convert_float_to_float16(model)","from onnxconverter_common import onnx_ops"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import onnx\nfrom onnxconverter_common import float16\nimport os\n\n# Create a dummy ONNX model for demonstration\n# In a real scenario, you would load your model: model = onnx.load(\"path/to/model.onnx\")\n\n# Example: A simple Add operation\nnodes = [onnx.helper.make_node(\"Add\", [\"input1\", \"input2\"], [\"output\"]) ]\ngraph = onnx.helper.make_graph(\n    nodes,\n    \"simple-graph\",\n    [\n        onnx.helper.make_tensor_value_info(\"input1\", onnx.TensorProto.FLOAT, [None, 2]),\n        onnx.helper.make_tensor_value_info(\"input2\", onnx.TensorProto.FLOAT, [None, 2]),\n    ],\n    [\n        onnx.helper.make_tensor_value_info(\"output\", onnx.TensorProto.FLOAT, [None, 2]),\n    ],\n)\nmodel_fp32 = onnx.helper.make_model(graph, producer_name=\"onnx-example\")\n\n# Convert the model to float16\nmodel_fp16 = float16.convert_float_to_float16(model_fp32)\n\n# Save the converted model\noutput_path = \"dummy_model_fp16.onnx\"\nonnx.save(model_fp16, output_path)\nprint(f\"FP32 model converted to FP16 and saved to {output_path}\")\n\n# Clean up the dummy file\nos.remove(output_path)","lang":"python","description":"This quickstart demonstrates how to use `onnxconverter-common` to convert an ONNX model from float32 to float16 precision. This is a common optimization to reduce model size and potentially improve inference performance on compatible hardware. It creates a dummy ONNX model, converts it, and saves the result.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-15","installed_version":"1.16.0","pypi_latest":"1.16.0","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":50,"avg_install_s":6.9,"avg_import_s":0.6,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"onnxconverter-common","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"onnxconverter-common","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":7,"import_time_s":0.38,"mem_mb":14.6,"disk_size":"192M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"onnxconverter-common","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"onnxconverter-common","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":6.5,"import_time_s":0.65,"mem_mb":16.2,"disk_size":"201M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"onnxconverter-common","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"onnxconverter-common","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":6.6,"import_time_s":0.91,"mem_mb":17.4,"disk_size":"189M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"onnxconverter-common","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"onnxconverter-common","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":6.5,"import_time_s":0.51,"mem_mb":14.6,"disk_size":"189M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"onnxconverter-common","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"onnxconverter-common","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":8,"import_time_s":0.55,"mem_mb":15.3,"disk_size":"202M"}]}}