Skip to content

Releases

0.49.0rc0

0.49.0rc0 Pre-release
Pre-release

Choose a tag to compare

@sychen52 sychen52 released this 16 Nov 17:05
6f4cb4a

Install this pre-release version using:

pip install "nvidia-modelopt[all] @ https://github.com/NVIDIA/Model-Optimizer/releases/download/0.49.0rc0/nvidia_modelopt-0.49.0rc0-py3-none-any.whl"

ModelOpt 0.47.1 Release

Choose a tag to compare

@kevalmorabia97 kevalmorabia97 released this 06 Nov 20:22
7cb24aa

Bug Fixes

  • Fix NVFP4 fake quantization (e.g. NVFP4_DEFAULT_CFG) with Triton 3.9, as in the PyTorch 26.11 container, on GPUs with compute capability 8.9 or newer: it failed with NotImplementedError: Block pointers have been removed in favor of the tensor descriptor API.

0.47.1rc0

0.47.1rc0 Pre-release
Pre-release

Choose a tag to compare

@kevalmorabia97 kevalmorabia97 released this 05 Nov 13:43
7cb24aa

ModelOpt 0.48.0 Release

Choose a tag to compare

@kevalmorabia97 kevalmorabia97 released this 02 Nov 10:57
e2f328a

New Features

Sparsity

  • Add skip-softmax calibration through vLLM for FlashAttention and FlashInfer, requiring --validation_prompts_file and validating serving sparsity on calibration and held-out prompts before exporting prefill/decode fits and their validation scope as sparse_attention_config. Calibration uses single-sequence, unchunked eager execution; serving preserves the calibrated 128-token KV-tile granularity and 128-row prefill Q tiles, autotunes only its execution schedule, and uses a smaller Q tile for one-token decode.
  • Sparse-only vLLM installs now reject unsupported DCP, DBO/ubatching, speculative decoding, and FULL mixed-batch CUDA graphs; calibrated decode also rejects FULL decode graphs.

Quantization

  • Add metadata-only export specifications and non-mutating per-weight quantizer-state capture.
  • Add functional quantized-weight packing, topology-aligned state merge/select and transport APIs, and canonical Hugging Face quantization-config construction.
  • HF export records canonical activation schemes, group/block sizes and weight-only MXFP4 metadata; mixed-format exports retain unquantized-layer exclusions, and non-square FP8 block layouts are rejected.
  • Add Q8_0 weight-only quantization with 32-value GGML blocks, packed unified HF and Megatron export, and a built-in q8_0 PTQ recipe.
  • Add Hugging Face PTQ calibration and export support for Nemotron-H MTP modules, preserving calibrated expert input scales.
  • Add the models/nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-BF16/ptq/nvfp4-mse PTQ recipe, the PTQ stage for NVIDIA Nemotron 3.5 Super VL: weight-MSE calibrated NVFP4 routed and shared MoE experts, FP8 attention projections, Mamba in_proj/out_proj and lm_head, and an FP8 KV cache. The latent MoE, router, embeddings and the vision and audio encoders stay in BF16, and the MTP rules apply only to checkpoints that carry an MTP tail. It reproduces the released precision assignment, not the released weights: the published NVFP4 checkpoint adds quantization-aware distillation after this stage.
  • Backfill checkpoint aliases for three more published NVFP4 releases: moonshotai/Kimi-K2.7-Code, google/gemma-4-26B-A4B-it and google/diffusiongemma-26B-A4B-it. Each imports an existing general recipe wholesale rather than copying its body.
  • Backfill checkpoint aliases for nine more published NVFP4 releases, so each is reachable from its source model's hub path: zai-org/GLM-5.1 and GLM-5.2, MiniMaxAI/MiniMax-M2.5 and MiniMax-M3, deepseek-ai/DeepSeek-V3.1 and DeepSeek-V3.2, Qwen/Qwen3-235B-A22B-Instruct-2507 and -Thinking-2507, and Qwen/Qwen3.6-27B. Each imports an existing general or architecture recipe wholesale rather than copying its body.
  • Add composed Hugging Face AutoQuantize recipes that run fixed PTQ or weight AutoQuantize before
    a separate KV-cache AutoQuantize stage, with independent resumable checkpoints for the weight and
    KV searches. Uniform-weight plus layer-wise mixed-KV exports are marked unsupported for deployment
    until a runtime consumes that metadata combination.
  • Add IQ1_S and IQ2_XS weight-only quantization with GGML-compatible 256-value block encoders, built-in iq1_s / iq2_xs PTQ recipes, and unified HF and Megatron export of the packed blocks. Quantized weights must have a final dimension divisible by 256, and Megatron export requires tensor and pipeline parallel sizes of 1.
  • Add iq2_xxs weight-only quantization with a CUDA encoder and a general/ptq recipe, at 2.0625 bits per weight between iq1_s and iq2_xs. The same 256-value block constraint applies.
  • Add iq2_s weight-only quantization with a CUDA encoder and a general/ptq recipe, at 2.5625 bits per weight above iq2_xs. The same 256-value block constraint applies.
  • Add iq1_m weight-only quantization with a CUDA encoder and a general/ptq recipe, at 1.75 bits per weight between iq1_s and iq2_xxs. The same 256-value block constraint applies.
  • GPTQ (algorithm: {method: gptq}) now supports the GGML formats (iq1_s, iq1_m, iq2_xxs, iq2_xs, iq2_s, q8_0). Each GGML block is quantized as a whole and its error compensated in the later columns, and export writes exactly the codes GPTQ chose. block_size must be a multiple of the format's block size (256 for the IQ formats). The built-in iq1_s, iq1_m, iq2_xxs, iq2_xs and iq2_s recipes now quantize only the MLP/MoE weights and calibrate them with GPTQ, so they need calibration data.
  • The iq1_s, iq1_m, iq2_xxs, iq2_xs and iq2_s encoders accept an optional per-input-column importance that weights each value's squared error in the codebook search, as llama.cpp's imatrix does. GPTQ's new importance_weighted option passes them the square root of its Hessian diagonal, and the built-in IQ1 and IQ2 recipes enable it, so each block's search favours the columns its outputs depend on most.
  • A recipe can now delegate its whole body to another recipe with a top-level $import; any top-level key given alongside it overrides the imported one. metadata.recipe_type became optional along with it: a recipe states its kind with a # modelopt-schema: comment, with metadata.recipe_type, or by delegating to a recipe that does, and only a recipe that another file imports has to carry the schema comment. Whatever a recipe does state must be true: a schema comment and a recipe_type must agree, and so must a recipe and the recipe it delegates to. modelopt_recipes/models/ uses this for checkpoint entries that a portable recipe already reproduces: the entry aliases that recipe instead of copying it.
  • Backfill the recipes behind NVIDIA's already-published checkpoints under modelopt_recipes/models/, so a released checkpoint's quantization scheme is reachable from its own model-hub path rather than only from the general tier. For example, moonshotai/Kimi-K2.6 (published as nvidia/Kimi-K2.6-NVFP4) and Qwen/Qwen3.5-397B-A17B (published as nvidia/Qwen3.5-397B-A17B-NVFP4-V2) each alias a portable recipe wholesale -- the general expert-only NVFP4 recipe and the qwen3_5_moe architecture recipe respectively -- rather than copying its body; other checkpoints follow in separate changes.
  • Add layerwise.export_dir: layerwise calibration writes each decoder layer to its own quantized checkpoint shard as it finishes, so no separate export_hf_checkpoint() pass is needed and, with layerwise.checkpoint_dir, an interrupted run resumes without redoing finished layers. Calibration writes the layer shards; finalize() on the exporter left on the model adds the tail shard, the index and the config artifacts, and the checkpoint does not load until it runs. examples/hf_ptq does this for you. Supports FP8 and NVFP4 on single-process models, resident or offloaded, including multimodal models and models with MTP layers; other formats and placements raise NotImplementedError before calibration starts.
  • Add support for quantizing and calibrating enabled operators outside the transformer layers, such as lm_head, when using layerwise calibration.
  • Add an end-to-end BEVFormer ONNX PTQ example with temporal calibration data generation, INT8 and FP8 quantization, TensorRT engine building, and nuScenes accuracy evaluation. See examples/onnx_ptq/bevformer/README.md for details.
  • Add a reusable local-Hessian NVFP4 PTQ recipe and the quantization recipe used for nvidia/Qwen3.8-27B-NVFP4.
  • Add experimental dynamic FP8 fake quantization of GatedDeltaNet chunk-boundary states and WY activations for training through the standard quant_cfg interface. The fused GDN path requires fla-core==0.5.1 and chunk size 64; state emulation requires SM89 or newer.
  • Add fake quantization of the sparse-attention indexer key cache and query for DeepSeek-V4 (vLLM and Megatron-Core) and GLM-5.3-Flash (vLLM) through the new indexer_k_quantizer and indexer_q_quantizer. Enable them by importing the configs/ptq/units/indexer_k_nvfp4 and configs/ptq/units/indexer_q_nvfp4 units (NVFP4 with the global scale fixed to 1) into a recipe.
  • Add indexer_scorer_kwargs_quantizer to pass keyword arguments, such as the numerics options of a DeepGEMM build, to the DeepGEMM indexer scorer kernel of GLM-5.3-Flash per layer in vLLM fake-quant serving; see examples/vllm_serve/README.md.
  • Add the configs/ptq/units/kv_nvfp4_mla recipe unit for fake quantization of the MLA KV cache (DeepSeek-V3, GLM-5.3-Flash, ...) in vLLM fake-quant serving: NVFP4 for the latent and FP8 for the RoPE key. See examples/vllm_serve/README.md for an example recipe.
  • Add fake quantization of MoE expert-parallel communication to vLLM fake-quant serving through the new dispatch_quantizer and combine_quantizer on vLLM's routed experts, for MoE layers built on vLLM's fused-MoE layer and any all-to-all backend, and for the DeepGEMM Mega-MoE kernel of DeepSeek-V4 and Kimi-K3 (--moe-backend deep_gemm_mega_moe). Enable them by importing the configs/ptq/units/moe_dispatch_nvfp4 and configs/ptq/units/moe_combine_nvfp4 units into a recipe; see examples/vllm_serve/README.md.
  • vLLM fake-quant serving now runs on pre-quantized checkpoints such as FP8 when the recipe leaves those layers unquantized (for example a KV-cache-only recipe), and on MLA models with an FP8 KV cache; both previously failed during quantization.
  • KV_QUANT_CFG presets in vLLM fake-quant serving now quantize the MLA KV cache; on vLLM 0.16 and later they silently quantized nothing for MLA models.
  • vLLM fake-quant serving of NVFP4 and cast-mode KV-cache configs no longer needs --enforce-eager. examples/vllm_serve/vllm_serve_fakequant.py now sets VLLM_DISABLE_COMPILE_CACHE=1 for fake-quan...
Read more

0.48.0rc2

0.48.0rc2 Pre-release
Pre-release

Choose a tag to compare

@rohansjoshi rohansjoshi released this 28 Oct 23:16
e2f328a

Install this pre-release version using:

pip install "nvidia-modelopt[all] @ https://github.com/NVIDIA/Model-Optimizer/releases/download/0.48.0rc2/nvidia_modelopt-0.48.0rc2-py3-none-any.whl"

0.48.0rc1

0.48.0rc1 Pre-release
Pre-release

Choose a tag to compare

@rohansjoshi rohansjoshi released this 17 Oct 15:09
ff2450c

Install this pre-release version using:

pip install "nvidia-modelopt[all] @ https://github.com/NVIDIA/Model-Optimizer/releases/download/0.48.0rc1/nvidia_modelopt-0.48.0rc1-py3-none-any.whl"

0.48.0rc0

0.48.0rc0 Pre-release
Pre-release

Choose a tag to compare

@rohansjoshi rohansjoshi released this 08 Oct 20:40
e862bdf

Install this pre-release version using:

pip install "nvidia-modelopt[all] @ https://github.com/NVIDIA/Model-Optimizer/releases/download/0.48.0rc0/nvidia_modelopt-0.48.0rc0-py3-none-any.whl"

ModelOpt 0.47.0 Release

Choose a tag to compare

@chadvoegele chadvoegele released this 23 Sep 18:55
c10fb3b

New Features

Quantization

  • ONNX quantization with Autotune now benchmarks placements in the requested runtime precision and retains calibrated INT8/FP8 Q/DQ only when it meets the configured TensorRT speedup threshold (1.02x by default); otherwise it saves the high-precision no-Q/DQ model.

  • Add a Muse Glimmer AutoQuantize recipe that searches language-model MLP projections, self-attention projections, and lm_head over W4A16 NVFP4 Four-Over-Six, FP8, and BF16 fallback at 5.5 effective bits while leaving the vision tower unquantized.

  • Add examples/alpamayo/qad.py, which runs quantization-aware distillation on the quantized Alpamayo checkpoint produced by examples/alpamayo/quantize.py. It distills the quantized VLM against the original FP16 VLM with QADTrainer, supports FSDP2 for multi-GPU runs, and --export reassembles the trained VLM into a full AlpamayoR1 checkpoint that AlpamayoR1.from_pretrained can reload.

  • Add a calibration-free streaming Kimi-K3 converter and checkpoint-mirror recipe for NVFP4 routed experts with input_scale=1.0 and 128x128 block-FP8 KDA/MLA attention weights. The converter operates shard-by-shard on the source checkpoint's packed MXFP4 experts instead of loading the 2.8T model through the in-memory hf_ptq.py path.

  • Add end-to-end PETRv1 and PETRv2 ONNX PTQ examples covering calibration, INT8 and FP8 VoVNet backbone quantization, TensorRT deployment, and accuracy evaluation.

  • Add opt-in FP8 Vision Encoder recipes under the qwen3_vl and qwen3_5 model types. The vision-only recipe keeps the language model and KV cache in high precision; the joint recipe quantizes Vision Encoder and language-model Linears and uses FP8 KV-cache cast. Both quantize primary and deepstack merger Linears where present, while leaving patch embedding and vision-attention BMMs in high precision. Exported checkpoints require an inference runtime that supports quantized Vision Encoder Linears.

  • Add mtq.temporarily_fold_weights for repeated frozen-weight inference and mtq.preserve_quantizer_attributes_context for restoring temporary quantizer property and type changes. Temporary folding snapshots affected fake-quant weights on a configurable device and restores them with their quantizer state; retained pre-quant scales are inactive, while shared weights, shared quantizers, and SequentialQuantizer weights are unsupported.

  • Add the nvfp4_act_headroom calibration algorithm for NVFP4 activation global scales. Instead of setting the global scale from the largest per-block amax seen during calibration (plain max, which leaves no room above it so any larger activation saturates), it anchors the scale to a low percentile of the per-block amax distribution, leaving the rest of the FP8 block-scale range as headroom: amax = max(rho * anchor, upper), where anchor and upper are the per-block amaxes at anchor_percentile (default 1) and upper_percentile (default 99.99; set to 100 to never clip calibration data), and rho (default 16384) is the headroom factor. Applies only to NVFP4 dynamic-block input quantizers; SequentialQuantizer activation quantizers raise. Weight scales are an orthogonal axis selected by a nested weight_scale_algorithm (max by default, or mse / local_hessian), so one recipe can combine a weight calibration with this activation policy in a single pass. Ships modelopt_recipes/general/ptq/nvfp4_act_headroom-kv_fp8_cast.yaml, which mirrors nvfp4_default-kv_fp8_cast with only the calibration algorithm swapped and exports a standard NVFP4 checkpoint.

  • Add PTQ support for Step-3.7 (stepfun-ai/Step-3.7-Flash), whose routed experts were previously left unquantized. Quantize with the new huggingface/step3p7/ptq/nvfp4_experts_only-kv_fp8_cast or huggingface/step3p7/ptq/nvfp4_mlp_only-kv_fp8 recipes rather than the general ones, which select experts by module names Step does not use.

Megatron Framework (M-LM / M-Bridge)

  • Add clamp_kv_cache_scales to export_mcore_gpt_to_hf. Set it to False when exporting a QAT Megatron-Core model to preserve its learned FP8 KV-cache scales; the default retains the existing minimum scale of 1.0.
  • Add SFT-masked data support to examples/megatron_bridge/distill.py: --sft --sft_dataset_root <dir> distills on raw prompt-completion JSONL ({"input", "output"} records) with the loss masked to the response tokens, using Megatron-Bridge's FinetuningDatasetConfig and the model's own HuggingFace tokenizer instead of the pretraining GPTDataset and NullTokenizer.
  • Add per-expert weight quantization for Transformer Engine TEGroupedLinear (fused MoE experts): each expert now has its own weight_quantizer (a GroupedQuantizer holding one TensorQuantizer per expert) with an independent amax, instead of a single shared amax across all experts. Applies to mtq.quantize calibration, HF / Megatron export, and QAD.
  • Add opt-in torch.compile execution for Transformer Engine grouped-linear per-expert weight quantizers while preserving their native checkpoint amax shapes. Set MODELOPT_TEGROUPED_COMPILE_WEIGHT_LOOP=1 before quantized-module conversion; the default path remains eager.
  • Add HuggingFace unified export of quantized Qwen3-VL and Qwen3.5-VL checkpoints (PTQ or QAD) via examples/megatron_bridge/export_quantized_megatron_to_hf.py, Qwen3.5-VL additionally covering GatedDeltaNet linear-attention layers and MoE shared experts. Only the language model is quantized; the vision tower is copied from the source HuggingFace checkpoint.
  • Megatron-Bridge scripts now choose the MoE expert layout automatically from the model config: the faster fused TEGroupedMLP (grouped GEMM) unless the architecture cannot export it to HuggingFace, in which case SequentialMLP keeps the checkpoint exportable and --no_moe_grouped_gemm forces it explicitly. For the affected architectures this changes MoE activation scales from one shared scale to per-expert.

Misc

  • Add modelopt.torch.utils.mlflow.MlflowRunLogger for recording a script run on an MLflow tracking server: the invocation, the ModelOpt version, the run log (captured by teeing stdout/stderr) and any caller-supplied artifacts, with configuration as searchable params. mlflow is an optional dependency, imported only when tracking is enabled.
  • Add --mlflow <tracking-uri> to examples/hf_ptq/hf_ptq.py (MLflow's own MLFLOW_TRACKING_URI is honoured too). A tracked run records the invocation, the resolved recipe ($imports expanded), the run log and the quantization summaries, with every command-line argument as a searchable param; failed runs are recorded with their traceback. The experiment defaults to $USER/hf_ptq/<checkpoint basename>-<recipe name or --qformat> and can be overridden with --mlflow_experiment / --mlflow_run_name.
  • Add --mlflow <tracking-uri> to examples/vllm_serve/vllm_serve_fakequant.py (MLflow's own MLFLOW_TRACKING_URI is honoured too), so a fake-quant serve records what it quantized and an evaluation of that endpoint can be traced back to a recipe. A tracked run uploads the launcher command, the resolved RECIPE_PATH (or the merged QUANT_CFG/KV_QUANT_CFG when presets are used), the worker log and the quantizer summary; the experiment defaults to $USER/vllm_serve_fakequant/<model basename>-<recipe name or quantization config> and can be overridden with --mlflow-experiment / --mlflow-run-name.

Backward Breaking Changes

  • Migrate the FAR3D ONNX PTQ example to the shared evaluator and ModelOpt containers and quantize_vovnet.py. Only the encoder supports INT8 and FP8; decoder calibration, quantization, and related CLI flags are removed, and the decoder remains in its exported mixed FP16/FP32 precision.
  • Image-text calibration with --calib_with_images now forwards multimodal batches through the complete VLM for all VLM families, so existing non-Nemotron commands may produce different language-model activation ranges and output scales. Recipe-based VLM PTQ also targets the complete VLM: vision modules stay in high precision by default and are quantized only when a model-specific recipe enables them, so custom recipes must explicitly exclude vision modules when required.
  • Move the checkpoint-mirror recipe tier from huggingface/models/<org>/<checkpoint>/ to the top-level models/<org>/<model_id>/, keyed by each recipe's canonical Hugging Face Hub id — so the Step 3.5 Flash recipe moves to models/stepfun-ai/Step-3.5-Flash/ptq/ and the NVIDIA Nemotron recipes gain the NVIDIA- prefix (e.g. models/nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-BF16/ptq/nvfp4-mse). Update any saved --recipe paths for these checkpoint recipes accordingly; the per-model_type recipes under huggingface/ are unchanged.
  • Move the Mistral Medium 3.5 checkpoint-mirror recipe from huggingface/models/nvidia/Mistral-Medium-3.5-128B-NVFP4/ptq/nvfp4-max-calib to models/mistralai/Mistral-Medium-3.5-128B/ptq/nvfp4-max-calib, keying it by the canonical Hugging Face base model. Update any saved --recipe paths to the new location.
  • Remove the --auto_quantize_bits, --auto_quantize_method, --auto_quantize_score_size, --auto_quantize_cost_model and --auto_quantize_active_moe_expert_ratio flags from examples/hf_ptq (deprecated in 0.46). Use an AutoQuantize --recipe from modelopt_recipes/general/auto_quantize/ instead. Those recipes now also splice in the shared base cost_excluded_layers unit, which the removed CLI applied unconditionally, so a VL model keeps its vision tower and MTP layers out of the effective-bits denominator. On a VL model this changes the per-layer cost weights, so an existing --auto_quantize_checkpoint from an earlier release is rejected with "Use a different checkpoint path"; delete or repoint it to re-run the search.
  • Remove the examples/llm_ptq symlink and the examples/vlm_ptq forwarder (both deprecated in 0.46). Use `e...
Read more

0.47.0rc2

0.47.0rc2 Pre-release
Pre-release

Choose a tag to compare

@chadvoegele chadvoegele released this 22 Sep 22:01
06ad021

Install this pre-release version using:

pip install "nvidia-modelopt[all] @ https://github.com/NVIDIA/Model-Optimizer/releases/download/0.47.0rc2/nvidia_modelopt-0.47.0rc2-py3-none-any.whl"

0.47.0rc1

0.47.0rc1 Pre-release
Pre-release

Choose a tag to compare

@chadvoegele chadvoegele released this 09 Sep 23:36
8c3bb9c