A tool for parsing, editing, optimizing, and profiling ONNX models.
Maintained. Last release 7 months ago, commits in 2 of the last 26 weeks. Weaker on commit activity and release cadence.
pip install onnx-tool📄 简体中文 | ✨ New Project: AI-Enhancement-Filter (powered by onnx-tool)
onnx-tool
A comprehensive toolkit for analyzing, optimizing, and transforming ONNX models with advanced capabilities for LLMs, diffusion models, and computer vision architectures.
- LLM Optimization: Build and profile large language models with KV cache analysis (example)
- Graph Transformation:
- Advanced Profiling:
- Rapid shape inference
- MACs/parameter statistics with sparsity awareness
- Compute Graph Engine: Runtime shape computation with minimal overhead (details)
- Memory Compression:
- Activation memory optimization (up to 95% reduction)
- Weight quantization (FP16, INT8/INT4 with per-tensor/channel/block schemes)
- Quantization & Sparsity: Full support for quantized and sparse model analysis
🤖 Supported Model Architectures
| Domain | Models |
|---|---|
| NLP | BERT, T5, GPT, LLaMa, MPT (TransformerModel) |
| Diffusion | Stable Diffusion (TextEncoder, VAE, UNet) |
| CV |