← Back to Leaderboard
MNVIDIA

NVIDIA/Model-Optimizer

Python model optimization library that exports compressed checkpoints for inference

Engineering Health (Methodology)
A+ · 97/100
Maintenance Activity
● Updated today
Latest Release
0.48.0
Commercial License Check
Apache-2.0 · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption22/25
Release Cadence20/20
License Clarity20/20
DockerGPU
Total Stars
★ 5,720
24h Growth
+1
7d Growth
+41
Forks
851

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

NVIDIA/Model-Optimizer Star History (2024-05-07 - 2026-12-04) ALL-TIME STAR HISTORY (2024-05 – 2026-12) +5.7k in 941d · avg +6/day 6k 3k 0 2024-05-07: ★ 12024-07-06: ★ 2752024-09-07: ★ 3942024-11-09: ★ 5092025-01-11: ★ 6302025-03-15: ★ 7542025-05-17: ★ 8902025-07-19: ★ 1,0182025-09-20: ★ 1,3332025-11-22: ★ 1,5302026-01-24: ★ 1,8502026-03-28: ★ 2,2112026-05-30: ★ 2,7542026-08-01: ★ 3,3252026-10-03: ★ 5,1652026-12-04: ★ 5,720 ★ 5.7k 2024-05 2025-08 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

ModelOpt is a Python model-preparation library, not an inference server. It takes a supported Hugging Face, PyTorch, or ONNX model, applies optimization techniques through composable Python APIs, and exports artifacts for downstream inference. Megatron-Bridge, Megatron-LM, and Hugging Face Accelerate integrate with workflows that require training; serving remains the responsibility of the target runtime.

The source tree separates modelopt/, modelopt_recipes/, examples/, and tests/. The nvidia-modelopt package uses setuptools.build_meta, with setuptools>=80 and setuptools-scm>=8 as build requirements. The documented agent plugins expose repository skills to development tools; they are distinct from the Python optimization and export interfaces.

Key Capabilities & Differentiators

Post-training quantization (PTQ) provides a path to smaller checkpoints without retraining. Quantization-aware training (QAT) and quantization-aware distillation add training when PTQ alone misses quality targets. Pruning removes weights or parameters, distillation transfers behavior from a teacher to a smaller model, and speculative-decoding workflows train draft modules to predict additional tokens. Neural architecture search and sparsity are also part of the library's scope.

PTQ examples cover Hugging Face LLMs and VLMs, diffusers models, and ONNX workflows. The unified Hugging Face export API covers both transformers and diffusers. Inference targets include TensorRT-LLM, TensorRT, vLLM, and SGLang, but these lists are not a cross-product: validate the combination of model, optimization technique, export format, and backend. A smaller artifact does not, by itself, establish a latency or throughput gain.

Trade-offs & Limitations

Use ModelOpt when checkpoint preparation needs to be reproducible independently of serving: for example, when controlling calibration, deciding whether PTQ quality warrants QAT, or preparing artifacts for more than one supported inference engine. If a compatible pre-quantized checkpoint or a runtime's native quantization workflow already meets requirements, that route avoids maintaining a separate optimization environment. Native serving and ModelOpt are complementary, not interchangeable.

Composability increases the number of combinations to qualify. Training-assisted methods add compute and data requirements, and sparsity yields a serving speedup only when the target runtime can exploit it. Compare task quality, peak memory, latency, and throughput on the intended GPU and runtime before promoting a checkpoint. Apache-2.0 covers the library code; review NVIDIA images, third-party packages, and model-weight terms separately.

Hardware & Deployment Guide

Install the stable PyPI package nvidia-modelopt[all], use pip install -e .[dev] from a source checkout for development, or use a versioned NVIDIA PyTorch, NeMo, or TensorRT-LLM container with ModelOpt preinstalled. Optimization can run in a self-managed environment; the exported artifact is served separately. Size GPU capacity for calibration or training independently of inference, and benchmark serving at representative input sizes and concurrency.

The 0.49.0rc0 and 0.49.0rc1 builds are prereleases. Release 0.47.1 fixed an NVFP4 fake-quantization failure with Triton 3.9 on GPUs with compute capability 8.9 or newer. Pin and test ModelOpt alongside the base image, GPU software stack, and target runtime. The pre-1.0 deprecation policy provides one release, roughly one month, for migration, so even a minor upgrade warrants an export-and-load regression test.

Pipeline boundary: Python optimization APIs and checkpoint export are separate from serving.
Input coverage: Hugging Face, PyTorch, and ONNX are supported through technique-specific workflows.
Quantization workflow: PTQ offers a no-retraining starting point; QAT and quantization-aware distillation add a training path for quality recovery.
Training integrations: Megatron-Bridge, Megatron-LM, and Hugging Face Accelerate support training-dependent workflows.
Export coverage: One Hugging Face export API covers transformers and diffusers; downstream targets include TensorRT-LLM, TensorRT, vLLM, and SGLang.
Version sensitivity: Release 0.47.1 fixed an NVFP4 fake-quantization failure with Triton 3.9 on GPUs with compute capability 8.9 or newer.
Best For

ML platform teams that need repeatable model optimization, quality checks, and checkpoint export for a known GPU inference stack.

Skip If

You need an inference server, or a compatible pre-quantized checkpoint or engine-native workflow already meets your quality and performance targets.

Reviewed on 2026-12-04 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

DockerGPU
pip install -U nvidia-modelopt[all]

Comparison vs. Top LLMs & Inference Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
Model-Optimizer ★5.7k+41PythonApache-2.0Python model optimization library that exports compressed checkpoints for infere
minimind75.5k+3.2kPythonApache-2.0Native PyTorch dense and MoE models for end-to-end LLM training on local GPUs
autoresearch101k+342Python—Single-GPU nanochat harness for agent-led, five-minute training experiments
LlamaFactory76.4k+86PythonApache-2.0A unified Python framework for LLM and VLM fine-tuning with pluggable inference

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/NVIDIA/Model-Optimizer.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

NVIDIA/Model-Optimizer Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about Model-Optimizer

Where does ModelOpt fit in an existing serving stack?

ModelOpt fits between model preparation and serving. Apply a supported optimization recipe through its Python APIs, export the resulting artifact, and load it into a compatible inference runtime. For Hugging Face models, the unified export API covers transformers and diffusers. Check the support matrix for the exact model, technique, format, and runtime before automating the pipeline.

How much GPU memory should I budget?

There is no single VRAM requirement. Size the optimization job and the inference deployment separately: calibration or training can have a different memory peak from serving the exported checkpoint. Measure optimization on the intended GPU stack, then test inference with production-representative input sizes and concurrency. Checkpoint size alone does not establish either peak.

Can we self-host ModelOpt and ship the resulting model commercially?

The ModelOpt code is Apache-2.0 licensed and can be run in a self-managed Python or container environment. Review the terms for the NVIDIA container image, third-party dependencies, downstream runtime, and model weights separately. The library's license does not grant redistribution rights for those artifacts.

When is ModelOpt worth adding instead of using a ready-made checkpoint or runtime-native quantization?

Start with a compatible pre-quantized checkpoint or the inference runtime's own quantization path if it meets your quality and performance targets. Choose ModelOpt when you need to control calibration or training-assisted quality recovery, compare optimization techniques, or produce checkpoints for multiple supported runtimes. Each export still needs its own compatibility and performance tests.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining NVIDIA/Model-Optimizer? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature NVIDIA/Model-Optimizer on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare