qad
Skill5.2k starsChanged 58 days agoApache-2.0View on GitHub
Run explicitly requested ModelOpt Quantization-Aware Distillation (QAD) on Slurm through Megatron Bridge to recover a measured BF16-to-PTQ accuracy gap. Use only when the user explicitly asks for QAD, including its topology, data preparation, Slurm launch, resume, checkpoint export, or recovery decisions.
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
- tools/launcher/CLAUDE.mdCLAUDE.md
- accessing-mlflowSkill
- benchmark-model-kernelsSkill
- commonSkill
- compare-resultsSkill
- day0-releaseSkill
- debugSkill
- deploymentSkill
- evaluationSkill
- launching-evalsSkill
- monitorSkill
- ptqSkill
- quant-recipe-searchSkill
- release-cherry-pickSkill
- run-agentxSkill
- speculative-decodingSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Before constructing commands, read:
- Very specific: line 26
Treat the example README and --help output as authoritative for mutable flags, commands, containers, and checkpoint formats.
- Very specific: line 56
Prepare the full capped dataset once: Use suitable user-provided data, or copy examples/megatron_bridge/data/nemotron-cascade-2-blend.yaml …
- Distinctive: line 62
Run and monitor QAD: Run one QAD training job at a time and fold startup validation into it.
- Very specific: line 86
Keep train_iters=1000 and leave exit_interval unset.
- Distinctive: line 102
After a duration exit, resume the latest QAD checkpoint in the same output directory with unchanged prepared data paths/cache, seed, …
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill 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
ModelOpt Quantization-Aware Distillation
QAD is expensive. Run it only when the user explicitly authorizes QAD for the target model or run. A Day-0, PTQ, evaluation, comparison, or recipe-search request alone is not authorization to start QAD.
Follow the supported workflow
Before constructing commands, read:
examples/megatron_bridge/README.md, especially PTQ, data preparation, QAD, export, and Slurm usageexamples/megatron_bridge/{quantize.py,distill.py}via--help- the common skill's
environment-setup.md,workspace-management.md, andslurm-setup.md; also itsremote-execution.mdfor remote Slurm
Treat the example README and --help output as authoritative for mutable flags,
commands, containers, and checkpoint formats. This skill supports Slurm only.
Execute in this order
- Confirm the gap. Reuse only validated, comparable BF16/PTQ results and the exact benchmark configuration from preceding evaluation or recipe search; run missing, invalid, or non-comparable baselines. Confirm the target benchmarks and their context-length needs. Stop if the PTQ gap to BF16 is already below 1%.
- Reproduce PTQ and verify compatibility. In the target runtime, require
AutoBridge.can_handle()for the target model and PTQ throughquantize.pyto succeed while preserving the exact preceding PTQ config or recipe: format, layer selection, calibration data/count, sequence length, and seed. A changed quantization setting is a new PTQ candidate and must be evaluated before QAD. In the master-rank.quant_summary.txt, require finite positiveamaxfor enabled static quantizers; acceptdynamic/format-definedNoneonly when the recipe intends it. Treat the summary as rank-local under model parallelism. Choose topology explicitly. Derive the smallest fitting node count and TP/PP/CP/EP from student and teacher architecture, the chosen sequence length, and available GPU memory. Prefer CP before TP for small long-context models; keep EP=1 for dense models and ETP=1 because the current
distill.pyworkflow does not support expert tensor parallelism. For MoE require:DP = world_size / (TP * PP * CP)EDP = world_size / (EP * PP)- integral DP/EDP,
num_experts % EP == 0, andGBS % (MBS * DP) == 0
- Prepare the full capped dataset once. Use suitable user-provided data, or
copy
examples/megatron_bridge/data/nemotron-cascade-2-blend.yamlas the default. Set the target tokenizer and workspace path, then materialize the randomly sampled subset before training. Pack the chosen sequence length; Megatron's99,1,0split creates the 1% validation holdout from the same data. - Run and monitor QAD. Run one QAD training job at a time and fold startup validation into it; do not submit separate GPU preflight jobs or split at recovery iterations. Let training continue while evaluating saved checkpoints, and cancel it when a stop condition below is met.
Default training policy
| Setting | Default |
| Sequence length | 32768; adjust for target benchmarks |
| Peak / minimum LR | 1e-5 / 1e-6 |
| LR schedule | cosine |
| Training cap | 1000 iterations |
| Global batch size | 512 |
| Dataset | nvidia/Nemotron-Cascade-2-SFT-Data by default |
| Materialized token budget | 17.3B at 32K; cover the full cap at the chosen length |
| Training validation | every 25 iterations; deterministic 1% holdout; 2 batches |
| Checkpoint interval | 50 iterations |
| Loss logging | every 10 iterations |
| Recovery benchmark | 150, then every 100 iterations while training runs |
| Slurm duration exit | 220 minutes for a 4-hour allocation |
Run policy
- Keep
train_iters=1000and leaveexit_intervalunset. - From initial step timing, submit only enough sequential jobs to reach checkpoint 150; never submit through iteration 1000 upfront. At each recovery checkpoint, submit to the next only after its targeted evaluation and any triggered full suite, and only if the BF16 gap remains at least 1% and recovery has neither plateaued nor regressed.
- Give all training jobs the same run-specific job name and
--dependency=singleton; record job IDs and, on any stop, cancel pending jobs before the active job. - Cancel on non-finite loss, repeated skipped iterations, or a sustained spike. At iteration 50, require the loss aggregate to be lower than at iteration 10.
- At each recovery checkpoint, first evaluate the one to three benchmarks with the largest PTQ drops. Run the remaining original PTQ suite at that checkpoint only after recovery beyond run noise.
- Cancel when the full-suite gap to BF16 is below 1%, benchmark recovery regresses beyond run noise, or benchmark recovery and loss both plateau.
- After a duration exit, resume the latest QAD checkpoint in the same output directory with unchanged prepared data paths/cache, seed, topology, optimizer, scheduler, iteration, and consumed-sample state; do not restart from PTQ.
- Report the PTQ recipe, data sample, Slurm topology, loss/state, checkpoints, and comparable BF16/PTQ/QAD results.
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.

