Skip to main content

OnnxSlim Logo OnnxSlim Logo

DeepWiki

OnnxSlim can help you slim your onnx model, with less operators, but same accuracy, better inference speed.

Installation

Using Prebuilt

pip install onnxslim

Install From Source

pip install git+https://github.com/inisis/OnnxSlim@main

Install From Local

git clone https://github.com/inisis/OnnxSlim && cd OnnxSlim/
pip install .

How to use

Bash

onnxslim your_onnx_model slimmed_onnx_model

Inscript

import onnx
import onnxslim

model = onnx.load("model.onnx")
slimmed_model = onnxslim.slim(model)

if slimmed_model:
    onnx.save(slimmed_model, "slimmed_model.onnx")

For more usage, see onnxslim -h or refer to our examples

Projects using OnnxSlim

NVIDIA/TensorRT-Model-Optimizer alibaba/MNN
ultralytics/ultralytics Mozilla/smart_autofill
microsoft/olive-recipes quic/cloud-ai-sdk
open-edge-platform/geti NVIDIA-TAO/tao-pytorch
alibaba/MNN-LLM huggingface/transformers.js
huggingface/optimum PaddlePaddle/PaddleOCR
ModelScope/FunASR CVCUDA/CV-CUDA
THU-MIG/yolov10 sunsmarterjie/yolov12
unslothai/unsloth
nndeploy/nndeploy deepghs/imgutils
amd/Quark TexasInstruments/edgeai-tidl-tools
Infineon/deepcraft-model-zoo-for-aurix meta-pytorch/executorch-examples

References

Contributors

Contact

Discord: https://discord.gg/nRw2Fd3VUS QQ Group: 873569894

Metadata

Release files for onnxslim 0.1.99

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for onnxslim 0.1.99
File Size Uploaded Provenance Actions
onnxslim-0.1.99.tar.gz 616.1 kB Without provenance Details for onnxslim-0.1.99.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for onnxslim 0.1.99
File Interpreter ABI Platform Actions
onnxslim-0.1.99-py3-none-any.whl Python 3 none any Details for onnxslim-0.1.99-py3-none-any.whl

Total release size: 864.6 kB

Release files / onnxslim-0.1.99.tar.gz

Download URL onnxslim-0.1.99.tar.gz
Size 616.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d662d6a6c384b64fe7464527a5865020c4335f8619a4a1272512ca0cc266867c
BLAKE2b-256 checksum
How to use checksums
feac8610e7274fe6bf26b6269f91de5a2acd03bfa2133153e691fc93f71a6f64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / onnxslim-0.1.99-py3-none-any.whl

Download URL onnxslim-0.1.99-py3-none-any.whl
Size 248.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6c6a3ddbbb7c5426f8f9c38ed1917bb4ab6335919c7d973328ba520faca469e4
BLAKE2b-256 checksum
How to use checksums
76d1063874f0c02d3c00a169bce3ccf24a4f42ffbc4263d4b1593499c39f7a4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Security for onnxslim 0.1.99

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.99 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page