$npx skillfedfor your agent

pnnx

pnnx is an open standard for PyTorch model interoperability.

With conditionsPyPI Artificial IntelligenceReleased May 2026227.5K downloads / moBSD-3Platform wheel

Decision gist · record as of 2026-08-14

platform wheels — pnnx-20260526-py3-none-macosx_10_9_universal2.macosx_10_9_x86_64.macosx_11_0_arm64.whl · pnnx-20260526-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl · pnnx-20260526-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
v20260526 · released 2026-05-26 · Python >=3.7 · 1 runtime deps: torch

Yes, if you need to export PyTorch models to PNNX format for deployment or cross-framework use. The package is actively maintained, has no security issues, and provides pre-built wheels for common platforms. Install friction is moderate due to the torch dependency, but that is expected for a PyTorch model tool. Not necessary if you only work within PyTorch's native ecosystem.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires torch to be installed; building from source requires C++14 compiler support and CMake >= 3.4.
  • Medium install friction due to torch dependency and platform-specific wheels.
  • The package is actively maintained with recent releases and no known vulnerabilities.

License · maintenance · safety

BSD-3 (permissive) — BSD-3 is permissive, allowing commercial and private use with minimal restrictions. You must include the license text in distributions but face no copyleft obligations.

last release 2026-05-26 (80 days) · last repo commit 2026-08-13 · 23,698 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 227,549 downloads/mo, #9,175 on PyPI

Verify before relying

pip install pnnx

import torch
import pnnx

net = torch.nn.Linear(10, 2)
x = torch.rand(1, 10)
opt_net = pnnx.export(net, "model.pt", x)
  • Whether pnnx2onnx and torchvision integration are enabled by default or require manual environment variable setup.
  • Performance characteristics and optimization level differences for typical model sizes.
  • Compatibility with dynamic shapes and practical limits of input_shapes2 resolution.
Same gist for agents: .md · .json

What it is and what it does

PNNX is a Python wrapper around an open standard for PyTorch model interoperability. It takes trained PyTorch models and exports them to PNNX format, which generates multiple output artifacts: a graph definition file, model weights, and Python inference code. The package can also convert existing TorchScript models to PNNX. The main use case is preparing PyTorch models for deployment or cross-framework use by optimizing the computation graph and making the model portable across different inference engines.

The package depends only on torch and provides two main functions: export (which traces a model and converts it to PNNX) and convert (which transforms an already-saved TorchScript model). It supports custom operators, module preservation, and multiple optimization levels. The fact sheet shows it is actively maintained, has no known vulnerabilities, and runs on modern Python versions across major platforms via pre-built wheels.

Use it for

  • Export a trained PyTorch model to PNNX format for deployment on inference engines.
  • Convert a PyTorch model to alternative formats via the PNNX intermediate representation.
  • Optimize a model graph for inference by applying graph-level optimizations during export.
  • Generate portable Python inference code alongside model weights for reproducible model loading.
  • Handle models with dynamic input shapes by specifying alternative input shapes during export.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need to export PyTorch models to PNNX format for deployment or cross-framework use.

The package is actively maintained, has no security issues, and provides pre-built wheels for common platforms. Install friction is moderate due to the torch dependency, but that is expected for a PyTorch model tool. Not necessary if you only work within PyTorch's native ecosystem.

Install

pnnx on PyPI

Before you install

Medium install friction due to torch dependency and platform-specific wheels. The package is actively maintained with recent releases and no known vulnerabilities. Supports Python 3.7 through 3.11 across macOS, Linux, and Windows.

Requires torch to be installed; building from source requires C++14 compiler support and CMake >= 3.4.

License in practice

BSD-3 is permissive, allowing commercial and private use with minimal restrictions. You must include the license text in distributions but face no copyleft obligations.

Quickstart

pip install pnnx

import torch
import pnnx

net = torch.nn.Linear(10, 2)
x = torch.rand(1, 10)
opt_net = pnnx.export(net, "model.pt", x)

Verify before relying

  • Whether pnnx2onnx and torchvision integration are enabled by default or require manual environment variable setup.
  • Performance characteristics and optimization level differences for typical model sizes.
  • Compatibility with dynamic shapes and practical limits of input_shapes2 resolution.

Package facts

LicenseBSD-3 permissive
Python supportSupports the current Python release >=3.7
Install frictionMedium. Platform-specific wheel
Runtime dependencies
1 package
torch
MaintenanceActively maintained 80 days since the last release
Last repo commit
First released
Downloads227,549 / month, #9,175 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: C++Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Evidence: pnnx-20260526-py3-none-macosx_10_9_universal2.macosx_10_9_x86_64.macosx_11_0_arm64.whl; pnnx-20260526-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; pnnx-20260526-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; pnnx-20260526-py3-none-win_amd64.whl

Tags

Capabilities
pytorch model exportneural network model conversionpnnx format exporttorch model optimizationmodel interoperability standardtorchscript model exportpytorch graph optimization
Topics
model-exportpytorch-toolsneural-network-optimization

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 › “pytorch model export”

  • pnnxExports and converts PyTorch neural network models to PNNX format, an…
  • litert-torchConverts PyTorch models to .tflite format for on-device deployment on…
  • executorchExecuTorch exports and runs PyTorch models on mobile, embedded, and…

Give your agent the search over MCP, or paste the wish link into any chat.

More Artificial Intelligence packages

litellm With conditions
PyPI · Artificial Intelligence · released Aug 2026

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.

MITcompiled wheel
682.8Mdownloads / mo
huggingface-hub Worth it
PyPI · Artificial Intelligence · released Aug 2026

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.

Apache-2.0pure Python · 3.10.0+
442.4Mdownloads / mo
langchain Worth it
PyPI · Python Modules · released Aug 2026

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.

MITpure Python
315.4Mdownloads / mo
hf-xet With conditions
PyPI · Artificial Intelligence · released Aug 2026

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.

Apache-2.0compiled wheel · 3.8+
258.4Mdownloads / mo
tokenizers Worth it
PyPI · Artificial Intelligence · released Apr 2026

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.

Apache-2.0compiled wheel · 3.10+
222.9Mdownloads / mo
transformers Worth it
PyPI · Artificial Intelligence · released Aug 2026

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.

permissive licensepure Python · 3.10.0+
186.6Mdownloads / mo

See also onnx2torch · litert-torch · onnx2tf · ncnn · torch-geometric · torchvision · netron · torch · timm