Model Optimizer
/

Announcements

  • Announcements

Getting Started

  • Overview
  • Installation
    • Installation for Linux
    • Installation for Windows
      • Install ModelOpt-Windows as a Standalone Toolkit
      • Install ModelOpt on Windows on Arm
      • Install ModelOpt-Windows with Olive
  • Quick Start: PTQ - PyTorch
  • Quick Start: PTQ - ONNX
  • Quick Start: PTQ - PyTorch to ONNX
  • Quick Start: PTQ - Windows
  • Quick Start: QAT and QAD
  • Quick Start: Pruning
  • Quick Start: Distillation
  • Quick Start: Speculative Decoding
  • Quick Start: Sparsity

Guides

  • Support Matrix
  • Quantization
    • Basic Concepts
    • Best practices to choose the right quantization methods
    • PyTorch Quantization
    • Quantization Configuration (quant_cfg)
    • Guides to quantize a customized model from Hugging Face for TensorRT-LLM deployment
    • Compress quantized models
    • ONNX Quantization - Linux (Beta)
    • ONNX Quantization - Windows
  • Quantization-Aware Training and Distillation
  • Saving & Restoring
  • Pruning
  • Distillation
  • Speculative Decoding
  • Sparsity
  • NAS
  • AutoCast (ONNX)
  • Autotune (ONNX)
  • Recipes
  • ModelOpt Config System

Deployment

  • TensorRT-LLM
  • Onnxruntime
  • Unified HuggingFace Checkpoint

Examples

  • All GitHub Examples

Reference

  • Changelog
  • modelopt API
    • cache
    • deploy
      • llm
        • generate
    • onnx
      • autocast
        • convert
        • graphsanitizer
        • logging_config
        • nodeclassifier
        • precisionconverter
        • referencerunner
        • utils
      • export
      • graph_surgery
      • llm_export_utils
        • export_utils
        • quantization_utils
        • surgeon_utils
      • logging_config
      • op_types
      • quantization
        • autotune
        • calib_utils
        • extensions
        • fp8
        • graph_indexing
        • graph_rewrites
        • graph_selection
        • gs_patching
        • int4
        • int8
        • operators
        • ort_calibration
        • ort_calibration_per_node
        • ort_patches
        • ort_quantization
        • ort_session
        • ort_utils
        • partitioning
        • precision_utils
        • qdq_graph
        • qdq_utils
        • quant_utils
        • modelopt.onnx.quantization.quantize
      • trt_utils
      • utils
    • torch
      • distill
        • config
        • distillation
        • distillation_model
        • layerwise_distillation_model
        • loss_balancers
        • losses
        • mode
        • plugins
        • registry
      • export
        • convert_hf_config
        • diffusers_utils
        • hf_export_handlers
        • layer_utils
        • layerwise_export
        • model_utils
        • moe_utils
        • plugins
        • quant_aware_conversion
        • quant_format
        • quant_utils
        • quantized_weight_export
        • registry
        • shard_cast_utils
        • transformer_engine
        • trtllm
        • unified_export_hf
        • unified_export_hf_streaming
        • unified_export_megatron
      • fastgen
        • config
        • discriminators
        • ema
        • factory
        • flow_matching
        • loader
        • losses
        • methods
        • pipeline
        • plugins
        • utils
      • kernels
        • common
        • quantization
        • sparsity
      • models
      • nas
        • algorithms
        • autonas
        • conversion
        • hparams
        • modules
        • patch
        • plugins
        • registry
        • search_space
        • traced_hp
        • utils
      • opt
        • config
        • config_loader
        • conversion
        • dynamic
        • hparam
        • mode
        • plugins
        • searcher
        • utils
      • peft
        • config
        • conversion
        • convert
        • custom
        • lora
        • mode
      • prune
        • fastnas
        • importance_hooks
        • plugins
        • pruning
      • puzzletron
        • activation_scoring
        • anymodel
        • block_config
        • build_library_and_stats
        • dataset
        • entrypoint
        • mip
        • plugins
        • pruning
        • puzzletron_nas_plugin
        • replacement_library
        • scoring
        • sewing_kit
        • subblock_stats
        • tools
        • utils
      • quantization
        • algorithms
        • backends
        • calib
        • modelopt.torch.quantization.compress
        • config
        • conversion
        • export_onnx
        • extensions
        • ggml
        • kv_cache_auto_quant
        • linear_attention
        • lora
        • mode
        • model_calib
        • model_quant
        • nn
        • plugins
        • qtensor
        • tensor_quant
        • utils
      • sparsity
        • attention_sparsity
        • weight_sparsity
      • speculative
        • config
        • dflash
        • eagle
        • external
        • medusa
        • mode
        • plugins
        • speculative_decoding
        • utils
      • trace
        • analyzer
        • modules
        • symbols
        • tracer
      • utils
        • cpp_extension
        • dataset_utils
        • distributed
        • graph
        • import_utils
        • list
        • logging
        • loss_mask
        • memory_monitor
        • mlflow
        • moe
        • nemotron_vlm_dataset_utils
        • network
        • perf
        • plugins
        • random
        • regex
        • robust_json
        • serialization
        • speech_dataset_utils
        • tensor
        • vlm_dataset_utils

Support

  • Contact us
  • FAQs
  1. Model Optimizer /
  2. modelopt API

modelopt API#

modelopt.cache

Per-user cache directory shared by all ModelOpt packages.

modelopt.deploy

Model Optimizer's deployment package.

modelopt.onnx

Model optimization subpackage for onnx.

modelopt.torch

Model optimization and deployment subpackage for torch.

Previous
Changelog
Next
cache

2023-2025, NVIDIA Corporation

Made with Sphinx and Shibuya theme.