polygraphy
Polygraphy: A Deep Learning Inference Prototyping and Debugging Toolkit
Decision gist · record as of 2026-08-14
Yes. Polygraphy is actively maintained, has no install friction, carries a permissive license, and solves a real problem for anyone working with multiple deep learning inference backends. The modular dependency design means you only pay for what you use. No known vulnerabilities. Install it if you need to prototype, compare, or debug deep learning inference across frameworks.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.6 or later.
- Most functionality requires optional backend-specific dependencies (TensorRT, ONNX-Runtime, etc.) which can be auto-installed via POLYGRAPHY_AUTOINSTALL_DEPS=1 environment variable or installed manually from backend requirements.txt files.
- Low friction installation as a pure Python wheel with no runtime dependencies.
License · maintenance · safety
Apache 2.0 (permissive) — Apache 2.0 is permissive; you can use this in commercial or proprietary projects without restriction, though you must include a copy of the license and state any modifications.
last release 2026-08-07 (7 days) · last repo commit 2026-08-04 · 13,250 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 227,487 downloads/mo, #9,178 on PyPI
Alternatives
Verify before relying
pip install polygraphy
import polygraphy
from polygraphy.backend.trt import TrtRunner
from polygraphy.backend.onnx import OnnxrtRunner
# Compare inference across backends
trt_runner = TrtRunner(engine_path)
onnx_runner = OnnxrtRunner(model_path)
results = {"trt": trt_runner.infer(inputs), "onnx": onnx_runner.infer(inputs)}- Whether the toolkit's CLI commands (convert, inspect, surgeon, debug) are fully functional without manually installing backend dependencies
- Performance overhead of the auto-install mechanism when POLYGRAPHY_AUTOINSTALL_DEPS is enabled
- Compatibility with specific versions of TensorRT, ONNX-Runtime, and other backends beyond the minimum requirements
What it is and what it does
Polygraphy is NVIDIA's toolkit for prototyping and debugging deep learning model inference. It provides both a Python API and command-line interface that let you run models across multiple inference backends (TensorRT, ONNX-Runtime, and others), compare their outputs to detect discrepancies, and convert models between formats with optional quantization. The toolkit also includes utilities to inspect model structure, extract and modify ONNX subgraphs, and isolate problematic TensorRT tactics.
The package has no hard Python dependencies, but functionality is modular: each backend (TensorRT, ONNX, etc.) has its own optional requirements. You can either install dependencies manually per backend or enable automatic installation at runtime via environment variable. This design lets you keep a minimal footprint if you only use a subset of backends, or get everything installed on-demand if you prefer convenience.
Use it for
- Compare inference results across TensorRT and ONNX-Runtime to verify model conversion correctness
- Convert trained models to TensorRT engines with post-training quantization for deployment optimization
- Debug why a model produces different outputs on different inference backends
- Inspect and extract subgraphs from ONNX models for testing or modification
- Isolate which TensorRT tactic is causing numerical instability in a model
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Polygraphy is actively maintained, has no install friction, carries a permissive license, and solves a real problem for anyone working with multiple deep learning inference backends. The modular dependency design means you only pay for what you use. No known vulnerabilities. Install it if you need to prototype, compare, or debug deep learning inference across frameworks.
Install
polygraphy on PyPI
Before you install
Low friction installation as a pure Python wheel with no runtime dependencies. Actively maintained with a release within the past week and 13250 GitHub stars. Optional dependencies are installed on-demand via environment variable configuration.
Requires Python 3.6 or later. Most functionality requires optional backend-specific dependencies (TensorRT, ONNX-Runtime, etc.) which can be auto-installed via POLYGRAPHY_AUTOINSTALL_DEPS=1 environment variable or installed manually from backend requirements.txt files.
License in practice
Apache 2.0 is permissive; you can use this in commercial or proprietary projects without restriction, though you must include a copy of the license and state any modifications.
Quickstart
pip install polygraphy
import polygraphy
from polygraphy.backend.trt import TrtRunner
from polygraphy.backend.onnx import OnnxrtRunner
# Compare inference across backends
trt_runner = TrtRunner(engine_path)
onnx_runner = OnnxrtRunner(model_path)
results = {"trt": trt_runner.infer(inputs), "onnx": onnx_runner.infer(inputs)}
Verify before relying
- Whether the toolkit's CLI commands (convert, inspect, surgeon, debug) are fully functional without manually installing backend dependencies
- Performance overhead of the auto-install mechanism when POLYGRAPHY_AUTOINSTALL_DEPS is enabled
- Compatibility with specific versions of TensorRT, ONNX-Runtime, and other backends beyond the minimum requirements
Package facts
| License | Apache 2.0 permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 7 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 227,487 / month, #9,178 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersProgramming Language :: Python :: 3 |
Evidence: polygraphy-0.53.4-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “tensorrt inference debugging”
- polygraphyPolygraphy is a toolkit for running inference across multiple deep…
- tensorrt-cu13-libsProvides NVIDIA TensorRT libraries for GPU-accelerated deep learning…
- tensorrt-cu13-bindingsProvides Python bindings for NVIDIA TensorRT 11.2.1.2 compiled for…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also sit4onnx · inference-models · tensorrt · openvino · onnx-tool · nvidia-modelopt · tensorrt-cu13-libs · onnxslim · ssi4onnx · tensorrt-cu13