{"id":28622005,"url":"https://github.com/onnx/ir-py","last_synced_at":"2026-02-09T22:08:11.150Z","repository":{"id":293303534,"uuid":"983196139","full_name":"onnx/ir-py","owner":"onnx","description":"Efficient in-memory representation for ONNX, in Python","archived":false,"fork":false,"pushed_at":"2025-08-08T15:49:52.000Z","size":829,"stargazers_count":22,"open_issues_count":22,"forks_count":9,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-08-08T16:09:52.439Z","etag":null,"topics":["computation-graph","intermediate-representation","large-language-models","machine-learning","onnx"],"latest_commit_sha":null,"homepage":"http://onnx.ai/ir-py/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/onnx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-14T03:03:53.000Z","updated_at":"2025-08-08T15:49:56.000Z","dependencies_parsed_at":"2025-05-22T00:39:56.285Z","dependency_job_id":"3e4b3ef6-6f41-442b-8098-877d64c21dae","html_url":"https://github.com/onnx/ir-py","commit_stats":null,"previous_names":["onnx/onnx-ir","onnx/ir-py"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/onnx/ir-py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onnx%2Fir-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onnx%2Fir-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onnx%2Fir-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onnx%2Fir-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onnx","download_url":"https://codeload.github.com/onnx/ir-py/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onnx%2Fir-py/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269987123,"owners_count":24508176,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computation-graph","intermediate-representation","large-language-models","machine-learning","onnx"],"created_at":"2025-06-12T05:10:13.454Z","updated_at":"2026-01-07T01:11:52.327Z","avatar_url":"https://github.com/onnx.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003cimg src=\"docs/_static/logo-light.png\" alt=\"ONNX IR\" width=\"250\"/\u003e\n\n[![PyPI - Version](https://img.shields.io/pypi/v/onnx-ir.svg)](https://pypi.org/project/onnx-ir)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![codecov](https://codecov.io/gh/onnx/ir-py/graph/badge.svg?token=SPQ3G9T78Z)](https://codecov.io/gh/onnx/ir-py)\n[![PyPI Downloads](https://static.pepy.tech/badge/onnx-ir/month)](https://pepy.tech/projects/onnx-ir)\n\nAn in-memory IR that supports the full ONNX spec, designed for graph construction, analysis and transformation.\n\n## Getting Started\n\n[onnx-ir documentation](https://onnx.ai/ir-py/)\n\n### Installation\n\nVia pip:\n\n```\npip install onnx-ir\n```\n\nOr from source:\n\n```\npip install git+https://github.com/onnx/ir-py.git\n```\n\n## Features ✨\n\n- Full ONNX spec support: all valid models representable by ONNX protobuf, and a subset of invalid models (so you can load and fix them).\n- Low memory footprint: mmap'ed external tensors; unified interface for ONNX TensorProto, Numpy arrays and PyTorch Tensors etc. No tensor size limitation. Zero copies.\n- Straightforward access patterns: Access value information and traverse the graph topology at ease.\n- Robust mutation: Create as many iterators as you like on the graph while mutating it.\n- Speed: Performant graph manipulation, serialization/deserialization to Protobuf.\n- Pythonic and familiar APIs: Classes define Pythonic apis and still map to ONNX protobuf concepts in an intuitive way.\n- No protobuf dependency: The IR does not require protobuf once the model is converted to the IR representation, decoupling from the serialization format.\n\n## Concept Diagram\n\n![Concept Diagram](docs/resource/onnx-ir-entities.svg)\n\n## Code Organization 🗺️\n\n- [`_protocols.py`](src/onnx_ir/_protocols.py): Interfaces defined for all entities in the IR.\n- [`_core.py`](src/onnx_ir/_core.py): Implementation of the core entities in the IR, including `Model`, `Graph`, `Node`, `Value`, and others.\n- [`_enums.py`](src/onnx_ir/_enums.py): Definition of the type enums that correspond to the `DataType` and `AttributeType` in `onnx.proto`.\n- [`_name_authority.py`](src/onnx_ir/_name_authority.py): The authority for giving names to entities in the graph, used internally.\n- [`_linked_list.py`](src/onnx_ir/_linked_list.py): The data structure as the node container in the graph that supports robust iteration and mutation. Internal.\n- [`_metadata.py`](src/onnx_ir/_metadata.py): Metadata store for all entities in the IR.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonnx%2Fir-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonnx%2Fir-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonnx%2Fir-py/lists"}