Model-Optimizer / launcher
CLAUDE.md5.2k starsChanged 58 days agoApache-2.0View on GitHub
The launcher submits ModelOpt quantization, training, and evaluation jobs to Slurm clusters or runs them locally with Docker. The --yaml format maps top-level keys to launch() function arguments: Key conventions: 65 unit tests in tests/. Run standalone without installing modelopt: From the launcher directory: Tests cover: core dataclasses, factory registry, global_vars interpolation, YAML formats, Docker/Slurm executor construction (mocked), environment merging, metadata writing, and end-to-end Docker launch via subprocess.
- Installs packages
Trending
More talk lately.about the whole repository
Who's talking about NVIDIA/Model-Optimizer
- @github-trending.bsky.social“📦 NVIDIA / Model-Optimizer ⭐ 3,886 (+22) 🗒 Python A unified library of SOTA model optimization techniques …”Bluesky · Sep 25, 2026 · 5 likes
- onnxsim/onnxsim“Maintaining status of this project”GitHub · Jan 6, 2026 · 5 reactions
- vllm-project/vllm“Add LM head quantization support for ModelOpt”GitHub · May 8, 2026 · 4 reactions
- vllm-project/vllm“[Quantization] Add ModelOpt FP8/NVFP4 weight-only embedding methods”GitHub · May 15, 2026 · 2 reactions
- @chrisshort.net“to optimize inference speed. #devopsish”Bluesky · Sep 27, 2026 · 1 likes
The biggest 5 of 26 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 26
Talked about on GitHub and Bluesky (26 times).
On GitHub · 22
- Jan 6, 2026Maintaining status of this project — onnxsim/onnxsim5 reactions · 4 comments
- May 8, 2026Add LM head quantization support for ModelOpt — vllm-project/vllm4 reactions · 7 comments
- May 15, 2026[Quantization] Add ModelOpt FP8/NVFP4 weight-only embedding methods — vllm-project/vllm2 reactions · 2 comments
- Apr 12, 2026Add support for ModelOpt MXFP8 non-gated MoE with ReLU2 — vllm-project/vllm1 reaction · 3 comments
- Apr 2, 2026[Bugfix] Fix NVFP4+MTP crash: force unquantized mtp.fc for Qwen3.5 — vllm-project/vllm1 reaction
17 more on GitHub
- Feb 8, 2026[ModelOpt MXFP8] — sgl-project/sglang1 reaction · 5 comments
- Jan 21, 2026ORT inference fails after upgrading model's opset from 20 to 21 — microsoft/onnxruntime1 reaction · 5 comments
- Oct 4, 2026codex-plugins.github.nvidia.model-optimizer: init at 0.47.0 — sudosubin/agents.nix0 reactions
- Oct 4, 2026codex-marketplaces.github.nvidia.model-optimizer: init at 0.47.0 — sudosubin/agents.nix0 reactions
- Oct 2, 2026build(deps-dev): bump nvidia-modelopt from 0.44.0 to 0.47.0 — ydwhhh/gspo0 reactions
- Sep 30, 2026build(deps-dev): bump nvidia-modelopt from 0.44.0 to 0.47.0 — verl-project/verl0 reactions
- Sep 27, 2026Github trending [NVIDIA/Model-Optimizer] 一站式模型量化优化加速 — web1992/github-trending0 reactions
- Sep 25, 2026Github trending [NVIDIA/Model-Optimizer] 模型推理加速优化库 — web1992/github-trending0 reactions
- Sep 15, 2026Bump nvidia-modelopt from 0.44.0 to 0.46.1 — HuipengHuang/opd-rl0 reactions
- Sep 9, 2026build(deps-dev): bump nvidia-modelopt from 0.44.0 to 0.46.0 — HuipengHuang/verl-baseline0 reactions
- Sep 9, 2026[None][docs] retarget ModelOpt examples llm_ptq paths to hf_ptq — NVIDIA/TensorRT-LLM0 reactions · 1 comment
- Aug 26, 2026refactor(modelopt): delegate real-quant export to ModelOpt — NVIDIA-NeMo/Megatron-Bridge0 reactions · 5 comments
- Jul 21, 2026[tests] migrate model-level ModelOpt quantization tests to model tests — huggingface/diffusers0 reactions · 1 comment
- Jun 5, 2026[Add] NVIDIA Model Optimizer (NVIDIA/Model-Optimizer) — PyTorchKR/landscape0 reactions
- May 21, 2026two ptq method — lix19937/tensorrt-insight0 reactions
- Feb 16, 2026Quantization fails with GPT-OSS model — NVIDIA-NeMo/Megatron-Bridge0 reactions · 4 comments
- Jan 18, 2026NVFP4支持 — Wan-Video/Wan2.20 reactions
On Bluesky · 4
- Sep 25, 2026📦 NVIDIA / Model-Optimizer ⭐ 3,886 (+22) 🗒 Python A unified library of SOTA model optimization techniques like quantization,… — @github-trending.bsky.social5 likes and reposts
- Sep 27, 2026to optimize inference speed. #devopsish — @chrisshort.net1 likes and repost
- Sep 26, 2026今日のGitHubトレンド NVIDIA/Model-Optimizer NVIDIA Model Optimizerは、量子化やプルーニング、蒸留などの手法を用いてモデルを高速化するためのライブラリです。 Hugging… — @dailygithubtrends.bsky.social1 likes and repost
- Sep 25, 20265. NVIDIA Model-Optimizer Library for Deployment LINK 6. World Action Agent for Robot Manipulation via VLMs LINK — @hackobar.bsky.social0 likes and reposts · 1 reply
In this repository19 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- tools/debugger/CLAUDE.mdCLAUDE.md
- accessing-mlflowSkill
- benchmark-model-kernelsSkill
- commonSkill
- compare-resultsSkill
- day0-releaseSkill
- debugSkill
- deploymentSkill
- evaluationSkill
- launching-evalsSkill
- monitorSkill
- ptqSkill
- qadSkill
- quant-recipe-searchSkill
- release-cherry-pickSkill
- run-agentxSkill
- speculative-decodingSkill
The file
We split this CLAUDE.md into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 89
Create examples/<Org>/<Model>/megatron_lm_ptq.yaml following the format above
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md — ModelOpt Launcher
Overview
The launcher submits ModelOpt quantization, training, and evaluation jobs to Slurm clusters or runs them locally with Docker.
Key Files
| File | Role |
launch.py | Public entrypoint — accepts --yaml or pipeline=@ |
core.py | Shared dataclasses, executor builders, run loop, version reporting |
slurm_config.py | SlurmConfig dataclass and env-var-driven slurm_factory |
common/ | Shell scripts and query.py packaged to the cluster |
modules/Megatron-LM/ | Git submodule |
modules/Model-Optimizer | Symlink to ../.. (auto-created by launch.py if missing) |
Common Commands
# Run locally with Docker
uv run launch.py --yaml examples/Qwen/Qwen3-8B/megatron_lm_ptq.yaml hf_local=/mnt/hf-local --yes
# Run on Slurm (set env vars first)
uv run launch.py --yaml examples/Qwen/Qwen3-8B/megatron_lm_ptq.yaml --yes
# Dry run — preview resolved config
uv run launch.py --yaml examples/Qwen/Qwen3-8B/megatron_lm_ptq.yaml --dryrun --yes -v
# Dump resolved config
uv run launch.py --yaml examples/Qwen/Qwen3-8B/megatron_lm_ptq.yaml --to-yaml resolved.yaml
# Run unit tests
uv pip install pytest
uv run python3 -m pytest tests/ -vYAML Config Format
The --yaml format maps top-level keys to launch() function arguments:
job_name: Qwen3-8B_NVFP4_DEFAULT_CFG
pipeline:
global_vars:
hf_local: /hf-local/
task_0:
script: common/megatron_lm/quantize/quantize.sh
args:
- --calib-dataset-path-or-name <<global_vars.hf_local>>abisee/cnn_dailymail
environment:
- MLM_MODEL_CFG: Qwen/Qwen3-8B
- HF_MODEL_CKPT: <<global_vars.hf_local>>Qwen/Qwen3-8B
- TP: 4
slurm_config:
_factory_: "slurm_factory"
nodes: 1
ntasks_per_node: 4
gpus_per_node: 4Key conventions:
- Scripts go in
common/(notservices/) <<global_vars.X>>interpolation for shared values across tasks_factory_: "slurm_factory"— resolved viaregister_factory()incore.py- Environment is list-of-single-key-dicts:
- KEY: value - CLI overrides:
pipeline.task_0.slurm_config.nodes=2
Architecture
launch.py → imports core.py + slurm_config.py
↓
core.run_jobs()
↓
build_docker_executor() or build_slurm_executor()
↓
nemo_run.Experiment → Docker or Slurmset_slurm_config_type(SlurmConfig)— patchesSandboxTaskannotation at import timeregister_factory("slurm_factory", slurm_factory)— enables YAML_factory_resolutionreport_versions(base_dir)— prints git commit/branch for launcher + submodulesget_default_env(title)— returns(slurm_env, local_env)dicts
Adding a New Model Config
- Create
examples/<Org>/<Model>/megatron_lm_ptq.yamlfollowing the format above - Set
MLM_MODEL_CFGto the HuggingFace repo ID - Set
QUANT_CFG(e.g.,NVFP4_DEFAULT_CFG,INT8_DEFAULT_CFG) - Set GPU/node counts based on model size
- Test:
uv run launch.py --yaml <path> --dryrun --yes -v
Testing
65 unit tests in tests/. Run standalone without installing modelopt:
From the launcher directory:
uv run python3 -m pytest tests/ -vTests cover: core dataclasses, factory registry, global_vars interpolation, YAML formats, Docker/Slurm executor construction (mocked), environment merging, metadata writing, and end-to-end Docker launch via subprocess.
Further Reading
- docs/configuration.md — YAML formats, overrides, hf_local
- docs/architecture.md — Shared core, factory system, typed tasks, mount mechanism
- docs/testing.md — Running tests locally and in CI
- docs/claude_code.md — Claude Code workflows
- docs/contributing.md — Adding models, typed tasks, bug reporting
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

