Model-Optimizer
AGENTS.md5.2k starsChanged 58 days agoApache-2.0View on GitHub
These instructions apply to AI-assisted work in this repository. - Start with README.md for project overview and install. - Use modelopt/ for source, tests/ for focused test coverage, and examples/ or docs/ for usage patterns. - Agent skills live under plugins/modelopt/skills/, the installable plugin's canonical skill tree. .agents/skills and .claude/skills expose those skills through relative symlinks. Shared agent config and scripts remain under .agents/. See .agents/README.md for the convention. - Coding guide: Code development and review require reading and following…
- Commits and pushes
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
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository19 other files it gives its agents.
- 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
- qadSkill
- quant-recipe-searchSkill
- release-cherry-pickSkill
- run-agentxSkill
- speculative-decodingSkill
The file
We split this AGENTS.md into the rules it gives an agent
12 rules. About 0 are common, 7 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 7
Start with README.md for project overview and install.
- Very specific: line 8
Use modelopt/ for source, tests/ for focused test coverage, and examples/ or docs/ for usage patterns.
- Very specific: line 24
Running tests: Follow the writing and running tests instructions.
- Distinctive: line 28
Running pre-commit: Follow the pre-commit hook instructions.
- Very specific: line 31
Signed commit: Use git commit -s -S -m "<message>" for commits so they follow the signing your work requirements.
- Very specific: line 36
After git commit, stop and wait for the user to say "push", "publish", "ship", or equivalent before running git push, gh pr create, or any …
- Distinctive: line 58
Propose the split before opening an oversized PR: When the work in flight is already over budget, offer a series of smaller PRs and, once …
- Distinctive: line 61
Split on structure first, features second: Look for a file, directory, or module boundary that carves the change into independent pieces.
- Distinctive: line 82
Keep it in draft, say in its description that it is not for merge, link it from each sub-PR, and list the sub-PRs in it.
- Distinctive: line 88
Before opening or marking a PR ready for review, read the submitting your code guidance.
- Very specific: line 90
Read .github/PULL_REQUEST_TEMPLATE.md and satisfy the checklist.
- Distinctive: line 109
Judge each comment on its merits before acting: Check it against the current code — reviewers comment on stale diffs, and bot findings …
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.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
Agent Instructions for ModelOpt
These instructions apply to AI-assisted work in this repository.
Repository orientation
- Start with
README.mdfor project overview and install. - Use
modelopt/for source,tests/for focused test coverage, andexamples/ordocs/for usage patterns. - Agent skills live under
plugins/modelopt/skills/, the installable plugin's canonical skill tree..agents/skillsand.claude/skillsexpose those skills through relative symlinks. Shared agent config and scripts remain under.agents/. See.agents/README.mdfor the convention.
Coding guidelines
- Coding guide: Code development and review require reading and following the coding standards in CONTRIBUTING.md; do not skip this step.
- Use relative paths from the repo root in commands and file references.
Iterative development
- Running tests: Follow the
writing and running tests
instructions. For fast initial iteration, choose focused tests for the
changed area from
tests/. - Running pre-commit: Follow the pre-commit hook instructions. Hooks may modify files; review and re-stage those changes before committing.
- Signed commit: Use
git commit -s -S -m "<message>"for commits so they follow the signing your work requirements. - Never
git pushwithout explicit approval in the current turn. Commit locally is fine; publishing to a remote is not. - After
git commit, stop and wait for the user to say "push", "publish", "ship", or equivalent before runninggit push,gh pr create, or any push-option flags like-o merge_request.create.
Updating skills
- Keep skill edits concise. Skills are loaded into agent context, so every line costs tokens on each use. Add only what changes agent behavior, and prefer tightening existing text over appending new text.
- Compress before opening the PR. Make a final pass over the skill diff: drop unnecessary explanations and examples, cut redundancy, and merge overlapping guidance.
Sizing and splitting PRs
- Keep each PR that goes up for review under ~500 added lines of source.
Large PRs stall in review; exceed the budget only when the change genuinely
cannot be split — a mechanical rename, generated files, or a self-contained
drop such as a new example or a new model/backend that has no working
intermediate state. Deletions, tests, and docs don't count; check the
insertions from
git diff --shortstat <base>...HEAD -- . ':!tests' ':!docs'before opening. - Propose the split before opening an oversized PR. When the work in flight is already over budget, offer a series of smaller PRs and, once the user agrees, do the split — don't open the big one and ask afterwards.
- Split on structure first, features second. Look for a file, directory, or module boundary that carves the change into independent pieces. Only when no such boundary exists, split by feature: land the enabling refactor or plumbing first, then one PR per behavior it unlocks.
- Keep the series acyclic and linearly ordered. A sub-PR may depend only on ones earlier in the series; if two pieces need each other, they belong in the same PR, or their shared part belongs in an earlier one. State the merge order in each description.
- Prefix titles with
[x/N]— e.g.[2/4] Add NVFP4 export path— so reviewers know it is one slice of a planned split, and link the sibling PRs. - Optional but strongly recommended: build and ship the series with
gh stack(thegithub/gh-stackextension).gh stack init <branch1 ... branchN>(bottom to top) turns the split branches into a linear stack,gh stack submitpushes them and opens the PRs in order with the stack cross-links added automatically — you still write each[x/N]title and description in its editor — andgh stack sync/gh stack rebasekeep the upper slices consistent as the lower ones merge. Pushing and wiring each PR by hand works too. - Every sub-PR stands on its own: it builds, it carries unit tests for the code it introduces, and CI passes on it without the later PRs.
- When a split makes the whole hard to follow, the full change may also go up as a draft PR — for reference only, never as a second review request. Keep it in draft, say in its description that it is not for merge, link it from each sub-PR, and list the sub-PRs in it. Rebase or close it as the series lands.
Contributing and PR readiness
- Before opening or marking a PR ready for review, read the submitting your code guidance.
- Read
.github/PULL_REQUEST_TEMPLATE.mdand satisfy the checklist. - PR description: fill the template sections — what changed and why, a usage snippet if it adds an API or flag, and what you actually ran under Testing. Root cause, benchmark numbers, and design rationale belong here. Don't restate the diff file by file.
- Only changelog-worthy changes get a
CHANGELOG.rstentry: new features, backward breaking changes, deprecations, and fixes for critical or known bugs from a previous release. Skip bugs introduced and fixed within the same unreleased cycle. - Keep each entry to one or two sentences written for external users: what
changed and what they need to do. No internal bug numbers (e.g. NVBug IDs),
root-cause analysis, or implementation detail — that belongs in the PR
description. File features under the matching
**New Features**sub-section used by recent releases (e.g.*Quantization*,*Speculative Decoding*,*Megatron Framework (M-LM / M-Bridge)*,*Misc*) rather than relabeling existing ones.
Responding to PR review feedback
- Judge each comment on its merits before acting. Check it against the current code — reviewers comment on stale diffs, and bot findings (CodeRabbit, Claude) are claims to verify, not instructions. Weight CODEOWNERS reviewers above bots; if a reviewer reaffirms after your pushback, that settles it.
- Pick one outcome per thread: address it in a commit, push back citing the code that shows the comment is wrong, or postpone it as out of scope. Report which threads got which when you ask for push approval.
- Reply in every thread the pushed commits addressed — a sentence on what changed and where. Those replies need no extra approval; pushback and postpone replies do, since no commit backs them. Never resolve threads: that is the reviewer's call.
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.

