Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
183 commits
Select commit Hold shift + click to select a range
dd49a46
[6294905] Fix --quant_cfg CLI parsing type in transformer trainer (#1…
kinjalpatel27 Jun 11, 2026
cb5be1f
launcher: move gemma-4-E4B-it yaml to google/ subdir (#1689)
ChenhanYu Jun 11, 2026
cfc823d
[Tests]: Precommit Check for Spec-Dec Recipes (#1527)
h-guo18 Jun 12, 2026
8a973ce
[nvbug 6294744] Exclude Qwen visual modules from NVFP4 quantization (…
meenchen Jun 12, 2026
cc17f2c
deployment skill: add SGLang cookbook cross-check (analog of recipes.…
Edwardf0t1 Jun 12, 2026
60b1af5
Fix GPT-OSS MXFP4->NVFP4 PTQ load, export, and cast (nvbug 6295279, 6…
cjluo-nv Jun 12, 2026
28c9601
Exclude multimodal vision branch from quantization by default (NVBug …
Edwardf0t1 Jun 12, 2026
2201ede
Fix Qwen AutoQuant disabled layer test (#1698)
meenchen Jun 12, 2026
ddc0a8e
[6287717][ONNX][Quantization] Preserve trt.plugins custom-op value_in…
gcunhase Jun 12, 2026
d26c8af
Fix DeepSeek V3 ptq.py inference-repo path resolution (nvbug 6311147)…
cjluo-nv Jun 12, 2026
2640551
feat: Layerwise calibration: nested config + QDQ-from-prev-layer flag…
Fridah-nv Jun 12, 2026
9f37fe1
feat(tools/mcp): MCP server for ModelOpt launcher (OMNIML-5123) (#1701)
ChenhanYu Jun 13, 2026
463229a
docs(tools/mcp): scope policy — environment tooling, not workflow pol…
ChenhanYu Jun 14, 2026
c4f39bd
feat(tools/mcp): add dry_run flag to submit_job (#1718)
ChenhanYu Jun 14, 2026
9f6e8fd
Fix nested use_cache disabling for calibration (#1704)
meenchen Jun 15, 2026
6d9a812
[chore]: weekly bump of uv.lock on main (2026-06-15) (#1727)
github-actions[bot] Jun 15, 2026
95d4e12
fix(puzzletron): use prebuilt KD dataset to avoid 136GB download (#1726)
TheSabari07 Jun 15, 2026
4be7c7f
fix memory leak issue during puzzletron scoring, #1681 (#1729)
Separius Jun 15, 2026
6968fe7
feat(tools/mcp): resolve launcher dir via env override + cwd walk-up …
ChenhanYu Jun 15, 2026
d7df14d
[tools/debugger] Enforce a single relay owner across hosts (#1735)
cjluo-nv Jun 15, 2026
55a2101
Update Nemotron-3 Pruning, Distillation and PTQ results based on new …
kevalmorabia97 Jun 15, 2026
0f61c98
Add missing CODEOWNER fields
kevalmorabia97 Jun 15, 2026
c661366
launcher: Nemotron-120B specdec_bench — kill stale _cells/ reference …
ChenhanYu Jun 15, 2026
601401b
[OMNIML-5025] cell_t0_d7 (#1738)
ChenhanYu Jun 15, 2026
fa94e6e
[6309094] updated readme to clarify simple_qat_train.py usecase (#1742)
kinjalpatel27 Jun 15, 2026
e004d8d
DFlash speculative decoding for MiniMax-M2.7 (FSDP2): auto mask-token…
yeyu-nvidia Jun 15, 2026
e6790ef
[Examples]: GPT-oss, Qwen3Moe streaming specdec example (#1692)
h-guo18 Jun 15, 2026
bcd8dd4
Add fused Triton kernel for local-Hessian NVFP4 weight-scale search (…
Fridah-nv Jun 16, 2026
a21197c
Remove unsafe torch.load from examples/diffusers/fastgen (#1740)
kevalmorabia97 Jun 16, 2026
1e461dd
[NVBug 6287315] Fix unified HF export for Llama4 MoE models (#1744)
shengliangxu Jun 16, 2026
d1fd121
Re-organize Changelog for 0.45 (#1737)
kevalmorabia97 Jun 16, 2026
1cccf66
support new logic of common state dict (#1669)
dimapihtar Jun 16, 2026
f8b0754
Fix gemma w4a8_awq recipe crashing export on multimodal checkpoints (…
Edwardf0t1 Jun 16, 2026
7545aef
Mitigate CVE-2026-4372 transformers `kernels` RCE exposure (#1746)
kevalmorabia97 Jun 16, 2026
07ce8e5
ci: speed up Claude PR review to cut timeouts (#1753)
kevalmorabia97 Jun 16, 2026
7f23d0f
Fix Mamba conv1d compatibility [OMNIML-5199] (#1750)
jenchen13 Jun 16, 2026
1067816
Add W4A16 NVFP4-MSE Qwen3.5 dense/MoE PTQ recipes (#1620)
cjluo-nv Jun 16, 2026
ba4340a
chore: stop tracking .claude/scheduled_tasks.lock (#1758)
yeyu-nvidia Jun 16, 2026
977d34d
[Fix](nvbug6304585): specdec README online base-model example should …
h-guo18 Jun 16, 2026
6c32c37
refactor(examples): consolidate vlm_ptq into llm_ptq (#1705)
Edwardf0t1 Jun 17, 2026
50cfa7b
fix(qad): report KD as default eval loss (#1754)
realAsma Jun 17, 2026
769ea5f
Pass USE_CUDA to compilation of cuda-ext to avoid failure on Windows …
vishalpandya1990 Jun 17, 2026
e012529
launcher: add Qwen3-8B/specdec_bench_dflash_vllm.yaml parent (OMNIML-…
ChenhanYu Jun 18, 2026
93dd08f
[OMNIML-4760] synth_support (#1696)
ChenhanYu Jun 19, 2026
fa1d13f
launcher: add Nemotron-3-Super-120B-A12B-BF16 MTP vLLM specdec bench …
ChenhanYu Jun 19, 2026
12ae5fb
[OMNIML-5233] hf_synth.yaml: relative-leaf output_dir contract (#1773)
ChenhanYu Jun 19, 2026
9048d13
[Feat]:Support DPace (#1724)
h-guo18 Jun 20, 2026
d8eb5e5
fix(puzzletron): correct val_dataset_name from 'valid' to 'validation…
TheSabari07 Jun 22, 2026
48f8d89
Fix conversation loading logic in UltraChat dataset (#1680)
jzh26 Jun 22, 2026
9ad5962
[chore]: weekly bump of uv.lock on main (2026-06-22) (#1785)
github-actions[bot] Jun 22, 2026
87f1a4f
Add Minitron hidden_size pruning support for GatedDeltaNet, MLA, and …
kevalmorabia97 Jun 22, 2026
2a88b60
launcher: package as modelopt_launcher; mcp: call console script dire…
ChenhanYu Jun 22, 2026
985ad43
launcher: make Slurm memory and user defaults configurable (#1791)
ChenhanYu Jun 22, 2026
d0ac6d7
[nvbug 6289151, nvbug 6301817] Fix exported Step layer type and RoPE …
meenchen Jun 22, 2026
090b1c5
fastgen DMD2: make the Qwen-Image example self-contained on stock nem…
jingyu-ml Jun 22, 2026
c6f8f07
Add support for dLLM encoder-decoder models (DiffusionGemma) [tied-we…
juhi10071998 Jun 23, 2026
f83a23c
Deprecate examples/llm_autodeploy (#1796)
Fridah-nv Jun 23, 2026
c458ad3
[2/2] Remove examples/diffusers/eval image-quality evaluation example…
jingyu-ml Jun 23, 2026
dbca668
Skip ComfyUI safetensors post-processing unless opted in (fix sharded…
jingyu-ml Jun 23, 2026
c3b913b
Fix real quant backend import cycle (#1801)
mxinO Jun 23, 2026
b6bf6b7
Update Roadmap Issue link
kevalmorabia97 Jun 23, 2026
28b5e26
Fix torch import error to remove circular dependency & move Nemotron …
jenchen13 Jun 23, 2026
c81210f
[OMNIML-5003] Support non-gated fused MoE experts (NemotronH) in HF P…
jenchen13 Jun 23, 2026
37dbbda
Fix ModelOpt MCP Slurm launcher submit (#1799)
ChenhanYu Jun 23, 2026
1766d55
[6281412] docs: update TensorRT-Edge-LLM CLI commands in torch_onnx e…
ajrasane Jun 23, 2026
e2c7da7
remove deprecated get_default_load_sharded_strategy (#1629)
dimapihtar Jun 24, 2026
e2c4d08
[OMNIML-4922] Four over Six PTQ & Updating Nemotron Ultra Example (#1…
jenchen13 Jun 24, 2026
aa2a6a1
Add context-parallel (CP) and data-parallel (DP) support to Megatron …
kevalmorabia97 Jun 24, 2026
d0c01a4
Add p quantization to our triton fa kernel (#1757)
sychen52 Jun 24, 2026
2f516a7
[6058907] Fix ShapeInferenceError in ONNX int8+fp16 quantization of w…
ajrasane Jun 24, 2026
7c5741b
Fix launcher Slurm mounts in installed MCP mode (#1811)
ChenhanYu Jun 24, 2026
9cfd7dd
Align eval skill AA benchmarks to golden NeMo configs + harden skill …
cjluo-nv Jun 24, 2026
bf8bc0c
Move nvfp4_quant.py from gemm to common (#1817)
sychen52 Jun 24, 2026
4093664
launcher: move NVIDIA-Nemotron-3-Super-120B YAML from Nemotron-h/ to …
ChenhanYu Jun 24, 2026
e19f793
Safetensor metadata mismatch fix in Mcore export (#1422)
jinhangchoi Jun 25, 2026
64f355e
docs(deployment skill): drop wrong "release predates arch" cu130 fall…
Edwardf0t1 Jun 25, 2026
1c6bdb3
Fix reduce_amax NotImplementedError on FP8 weights (NVBug 6360175) (#…
cjluo-nv Jun 25, 2026
66c7b46
fix(recipes): exclude Llama-4 vision branch from default PTQ quantiza…
Edwardf0t1 Jun 25, 2026
5177447
using validation keyword both in puzzletron configs and in dataset pr…
grzegorz-k-karch Jun 25, 2026
6cc5226
feat(recipes): add nvfp4_mlp_only-novit-kv_fp8 (exclude VL vision tow…
Edwardf0t1 Jun 26, 2026
138564f
Add AA-Omniscience eval recipe; harden judge/run conventions in the e…
cjluo-nv Jun 26, 2026
55d6e75
Account for CE loss for MTP heads in Megatron KD (#1805)
AAnoosheh Jun 26, 2026
33bfa8b
CI/Dev env bump (#1818)
kevalmorabia97 Jun 26, 2026
4b04e73
Fix prequant layernorm export without scales (#1838)
realAsma Jun 27, 2026
d5962c4
Remove deprecated examples/llm_autodeploy (#1797)
Fridah-nv Jun 27, 2026
7e5bd88
fix(quantization): detect fused MoE experts without act_fn (MiniMax-M…
Edwardf0t1 Jun 27, 2026
3003589
[Chore]: Add license for Dflash code (#1837)
h-guo18 Jun 27, 2026
c248dd5
[Feat]: Domino support (#1710)
h-guo18 Jun 27, 2026
f335459
refactor(examples): rename llm_ptq → hf_ptq (symlink for back-compat)…
Edwardf0t1 Jun 27, 2026
c5e7167
chore: gate dev-docs behind python>=3.12 marker to fix uv.lock bump
kevalmorabia97 Jun 29, 2026
248cbf2
OMNIML-5128 Capture Docker experiment id (#1840)
ChenhanYu Jun 29, 2026
72651b2
Fix Nemotron-H PTQ failure on Transformers 5.x with --trust_remote_co…
Fridah-nv Jun 29, 2026
6e2efd7
Fix lm_eval_hf freezing issue on multi-gpu slurm interactive node (#1…
danielkorzekwa Jun 30, 2026
2f6b51b
Add a citation file (#1864)
danielkorzekwa Jun 30, 2026
43c2034
Update specdec_bench codeowner group
kevalmorabia97 Jun 30, 2026
d70c48c
Fix HF PTQ empty-init dtype kwargs (#1857)
realAsma Jun 30, 2026
2fc352b
Add VLM pruning and PTQ with image-text calibration (Megatron-Bridge)…
kevalmorabia97 Jun 30, 2026
838b205
Improve lm_eval readme to clarify how accelerate launch works (#1867)
danielkorzekwa Jun 30, 2026
84fc1f9
docs(deployment): add AIPerf throughput/latency benchmarking referenc…
Edwardf0t1 Jul 1, 2026
af92313
fix(export): list unquantized MoE routers in exclude_modules (NVBug 5…
Edwardf0t1 Jul 1, 2026
a05850b
Add nel-next (0.3.x) agentic AA benchmark support to eval skill (#1861)
cjluo-nv Jul 1, 2026
1b03381
(Deps) Pin docs and test dependencies to avoid breaking CI on new pac…
kevalmorabia97 Jul 1, 2026
973cb09
Refine DeciLM dtype handling in HF PTQ (#1869)
realAsma Jul 1, 2026
fbbc598
[6078291][OMNIML-3716] Add ViT FP8 + Torch-TRT example, wire softmax_…
ajrasane Jul 1, 2026
ed8a9ab
fix(skills): unblock recurring day0 eval/deploy failures (judge 401, …
Edwardf0t1 Jul 1, 2026
892d27a
Fix expert-only MSE recipe matching for NemotronH (#1877)
meenchen Jul 1, 2026
9038b71
Autoquant and GPTQ in support in Megatron-Core [OMNIML-3151] (#1562)
jenchen13 Jul 2, 2026
4b9225b
launcher: fix host=None when _factory_ is dropped by nemo_run --yaml …
ChenhanYu Jul 2, 2026
b0ee953
[6382837][ONNX][Quantization] Validate empty QuantizeLinear inputs in…
gcunhase Jul 3, 2026
75b5803
Create a user guide: ModelOpt for Researchers: Fast Experimentation W…
danielkorzekwa Jul 3, 2026
ecc1e4f
ci: scope bump_uv_lock change detection to uv.lock (#1892)
arham766 Jul 5, 2026
0c40c37
ci: give non-PR code quality runs distinct concurrency groups (#1894)
arham766 Jul 5, 2026
d1c8ea9
ci: gate example and GPU tests on changes to their own runner and cac…
arham766 Jul 5, 2026
b96a785
Add AutoQuantize recipe support (#1856)
juhi10071998 Jul 5, 2026
795c589
CI: CUDA build/test hygiene + fix Puzzletron Nemotron test failures (…
kevalmorabia97 Jul 6, 2026
e0124bd
[chore]: weekly bump of uv.lock on main (2026-07-06) (#1930)
github-actions[bot] Jul 6, 2026
43fee0c
feat(export): quant-aware reverse weight conversion for unified HF ex…
Edwardf0t1 Jul 6, 2026
32925cd
Add TensorQuantizer rotate-back mode (#1879)
realAsma Jul 6, 2026
bc5bc1a
[Feat]: Add Final Norm for vLLM Hidden Extractor (#1846)
h-guo18 Jul 7, 2026
d290839
[Feat]: Support Dspark (#1849)
h-guo18 Jul 7, 2026
6b4ad85
Qwen-Image diffusers PTQ: FP8 / NVFP4 / NVFP4-SVDQuant HF checkpoints…
jingyu-ml Jul 8, 2026
0185726
fix: make MCP Slurm wait poll remote job state (#1900)
ChenhanYu Jul 8, 2026
adeca90
example(megatron_lm): Llama-3.2-1B-Instruct Megatron QAD launcher exa…
ChenhanYu Jul 8, 2026
b012e4c
fix: mcore_param_count for GatedDeltaNet, MLA, and latent-MoE layers …
kevalmorabia97 Jul 8, 2026
2d4e472
fix: handle TE 2.16+ GroupedLinear new signature args (#1937)
AAnoosheh Jul 8, 2026
66633d8
Minor fix constant amax repr (#1935)
mxinO Jul 9, 2026
f7bd18e
Add deployment test cases, fix deployment-related issues, and remove …
nvSiruiW Jul 9, 2026
e96d7a2
[Chore]Dspark license (#1948)
h-guo18 Jul 9, 2026
42458de
ci: fix torch_trt on torch 2.13; default unit tests to torch 2.13; ad…
kevalmorabia97 Jul 9, 2026
aeb1ab4
[6385268][ONNX][Autocast] Fix BF16 autocast for FP16 initializers (#1…
gcunhase Jul 9, 2026
e911c3b
Puzzletron tutorial fixes for runtime optimization (#1803)
grzegorz-k-karch Jul 9, 2026
9c40c34
Clarify end-to-end test expectations (#1952)
realAsma Jul 9, 2026
0593df0
[6241485] Add support for ONNX Q/DQ node placement for DLA (#1661)
gcunhase Jul 9, 2026
089c06e
fix(skills): Update Agent Skills Based on Observed Failures Modes in …
chadvoegele Jul 9, 2026
d69d5aa
[Examples]: Kimi-K2.6/K2.7-Code Dflash/Dspark (#1934)
h-guo18 Jul 10, 2026
aa18386
feat(quant): add constant_amax to pin activation input_scale (NVFP4 e…
Edwardf0t1 Jul 10, 2026
d641b4a
Add LSQ (Learned Scale Quantization) support and recipes (#1884)
realAsma Jul 11, 2026
7ed19b2
[Feat]: SWA (sliding-window attention) support for DFlash drafter tra…
h-guo18 Jul 11, 2026
429373b
[chore]: weekly bump of uv.lock on main (2026-07-13) (#1968)
github-actions[bot] Jul 13, 2026
4d19ca1
Create a tool for data blend preparation to enable fast experimentati…
danielkorzekwa Jul 13, 2026
7b8da80
docs(recipes): sync ptq.md with shipped recipes and enforce via unit …
cjluo-nv Jul 14, 2026
92296ae
fix(mmlu): expert-DP batch sharding for MoE + Nano-30B-A3B PTQ exampl…
ChenhanYu Jul 14, 2026
dca6ecd
Registry-based module dispatch for unified_export_hf.py (#1939)
sychen52 Jul 14, 2026
f479e78
fix(export): correct unified_export_megatron at EP > 1 and DP > 1 (#1…
yueshen2016 Jul 14, 2026
95ee9c4
Add recipe used for Qwen3.5 397B NVFP4 V2 checkpoint (#1868)
sugunav14 Jul 15, 2026
85bc559
Add nvfp4 attention support for vLLM serving (#1898)
kaix-nv Jul 16, 2026
3a2f616
feat(quant): skip max-calib forward when no activation needs data (#1…
Edwardf0t1 Jul 16, 2026
cba8a5c
Add: support input_shape_profile for trt-rtx ep (#1782)
haoxiz-nvidia Jul 16, 2026
21d0069
MBridge VLM distillation / QAD support (#1938)
kevalmorabia97 Jul 16, 2026
bd1864d
[6403893][ONNX][AutoCast] Fix false-success TRT parse for large Model…
galagam Jul 16, 2026
c9dbb5e
Fix per-tensor FP8 weight dequantization (#1962)
chadvoegele Jul 17, 2026
d142f7e
[6385267][ONNX][Autocast] Preserve graph-output Cast producers (#1943)
gcunhase Jul 17, 2026
9392dfe
Remove Puzzletron bypass distillation (#1987)
Separius Jul 17, 2026
5d0e9b2
Fix MBridge VLM distill/qad tests using PP until 26.08 (#1994)
kevalmorabia97 Jul 20, 2026
2e8722d
[chore]: weekly bump of uv.lock on main (2026-07-20) (#1995)
github-actions[bot] Jul 20, 2026
8ae7407
[6421642][ONNX][Quantization] Fix NVFP4 exporter node ordering (#1985)
gcunhase Jul 20, 2026
7d5d3f9
MiniMax-M3 mixed MXFP8-base + NVFP4-experts PTQ export (#1806)
chadvoegele Jul 20, 2026
8813b70
Remove deprecated examples/llm_qad Megatron-LM QAD example (#2003)
kevalmorabia97 Jul 21, 2026
14a180d
Link puzzletronv2 in CHANGELOG.rst (#2007)
Separius Jul 22, 2026
f10d518
launcher: bump TRT-LLM to 1.3.0rc20, pin vLLM to v0.22.0, fix max_seq…
noeyy-mino Jul 22, 2026
309f0ea
[OMNIML-5477, OMNIML-5119] Add module-specific AutoQuant search space…
meenchen Jul 22, 2026
0baad64
feat: Layerwise calibration memory optimizations (non-mutating skip +…
Fridah-nv Jul 22, 2026
3c9137d
Fix deepspeed test for 0.19.3
kevalmorabia97 Jul 23, 2026
01c708e
Add HybridModel MBridge support for nemo:26.08 (#2005)
kevalmorabia97 Jul 23, 2026
d39f385
Save hf checkpoint at every valitation iteration during distillation.…
danielkorzekwa Jul 23, 2026
3edd137
docs: add Nemotron 3 Ultra NVFP4 blog to Latest News (#1956)
shljessie Jul 23, 2026
d984de3
[6008361][ONNX][Quantization] Clarify autotune guidance (#1989)
gcunhase Jul 23, 2026
effbd7b
Reorganize 0.46 Changelog (#2014)
kevalmorabia97 Jul 24, 2026
d143276
Support efficient TEGroupedMLP (moe_grouped_gemm=True) for Minitron P…
kevalmorabia97 Jul 24, 2026
6105fe8
[Examples]: MiniMax-M3 DSpark (#1965)
h-guo18 Jul 26, 2026
33d05b0
FSDP2 calibration with hf_ptq.py [1/2] (#1563)
sugunav14 Jul 26, 2026
87c9f8c
Update documentation guide for ONNX INT4 PTQ on Windows cuda13 host (…
vishalpandya1990 Jul 28, 2026
ca0b615
Scripts and a skill to do per-layer benchmark using flashinfer (#1980)
sychen52 Jul 29, 2026
a3ac475
tools/mcp: pin mcp<2 to fix unit CI collection (#2026)
Fridah-nv Jul 29, 2026
c2070cf
ci: skip docs preview deploy for fork PRs (#2029)
h-guo18 Jul 29, 2026
ddd2fb9
[6425069][ONNX][Autocast] Fix autocast metadata propagation (#1983)
gcunhase Jul 29, 2026
943c0b2
docs(puzzletron): install lm-eval in container setup (#2020)
rishiskhare Jul 29, 2026
e55fa02
[6058841] Fix inconsistent tensor types on control-flow (If/Loop/Scan…
ajrasane Jul 29, 2026
c94405e
add Qwen3-VL support for DFlash training (#1975)
skierat Jul 30, 2026
c062b3f
Add sidecar GPU/CPU memory+utilization monitor for HF PTQ (#2000)
Fridah-nv Jul 30, 2026
4c3d364
fix(export): [NVBug 6525534] preserve nested VLM namespaces (#2032)
meenchen Jul 30, 2026
f7ea04a
Merge branch 'main' into gkarch/puzzletron_v2_sync_20260730
grzegorz-k-karch Jul 30, 2026
2e30dc9
Merge branch 'feature/puzzletron_v2' into gkarch/puzzletron_v2_sync_2…
grzegorz-k-karch Jul 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
136 changes: 136 additions & 0 deletions .agents/scripts/nel-next.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
#!/usr/bin/env bash
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# nel-next.sh — run NeMo Evaluator "next" (nel 0.3.x) via uvx, isolated from 0.2.6.
#
# A few AA benchmarks (Terminal-Bench 2.x, SWE-bench) run on `nemo-evaluator`
# 0.3.x + `harbor` extra — a different package/CLI/config-schema from the eval
# skill's default `nemo-evaluator-launcher` 0.2.6 (CLI `nel eval run X.yaml`,
# overrides `-O a.b.c=v`, schema services/benchmarks/cluster/output). Installing
# it into the 0.2.6 env would clobber `nel`, so this runs 0.3.x in a throwaway
# `uvx` environment (uv resolves + caches + reuses it) and forwards to its `nel`.
#
# Usage (source .env FIRST so the config's ${VAR}s resolve; this never reads secrets):
# .agents/scripts/nel-next.sh --setup-only|--which|--version
# .agents/scripts/nel-next.sh eval run <config.yaml> [--dry-run|--submit] [-O k=v ...]
# .agents/scripts/nel-next.sh eval {status|logs|report|merge|resume|stop} -r <run_id>
# .agents/scripts/nel-next.sh mlflow-push -r <run_id> -c <config.yaml> [-- -o k=v ...]
# Post-run: SLURM doesn't auto-export. Pulls the merged bundle(s) + pushes to MLflow
# using the config's export_config.mlflow (resolves ${MLFLOW_TRACKING_URI}, forces
# emit_traces=false to avoid the per-sample hang). Run after `source .env`.
#
# Install source (env overrides): NEL_NEXT_SPEC (PyPI default, "nemo-evaluator[harbor,export]==0.3.*"
# — [export] pulls mlflow for mlflow-push; pin an exact 0.3.x here for reproducibility), or
# NEL_NEXT_ORIGIN [+ NEL_NEXT_REF] for the internal git build. uv caches the resolved env and
# refreshes it when the spec changes.
set -euo pipefail

# [harbor] = agentic/sandbox deps; [export] pulls mlflow for `mlflow-push`.
NEL_NEXT_SPEC="${NEL_NEXT_SPEC:-nemo-evaluator[harbor,export]==0.3.*}"
NEL_NEXT_ORIGIN="${NEL_NEXT_ORIGIN:-}"
NEL_NEXT_REF="${NEL_NEXT_REF:-}"

if [[ -n "$NEL_NEXT_ORIGIN" ]]; then
INSTALL_SPEC="nemo-evaluator[harbor,export] @ ${NEL_NEXT_ORIGIN}${NEL_NEXT_REF:+@${NEL_NEXT_REF}}"
else
INSTALL_SPEC="$NEL_NEXT_SPEC"
fi

_log() { printf '\033[2m %s\033[0m\n' "$*" >&2; }
# Run a command (nel, python, …) from the uvx-managed 0.3.x environment.
_uvx() { uvx --python 3.12 --from "$INSTALL_SPEC" "$@"; }

# Post-run MLflow push. SLURM runs don't auto-export; this stages each merged
# benchmark bundle's eval-*.json from the cluster (the dev box doesn't mount the
# run dir) and exports it to MLflow with traces off (avoids the per-sample hang).
_mlflow_push() {
local rid="" cfg=""; local -a extra=()
while [[ $# -gt 0 ]]; do
case "$1" in
-r|--run-id) rid="$2"; shift 2 ;;
-c|--config) cfg="$2"; shift 2 ;;
--) shift; extra+=("$@"); break ;;
*) extra+=("$1"); shift ;;
esac
done
[[ -n "$rid" && -n "$cfg" ]] || { echo "usage: nel-next.sh mlflow-push -r <run_id> -c <config.yaml> [-- -o k=v ...]" >&2; return 2; }
[[ -f "$cfg" ]] || { echo "ERROR: config not found: $cfg" >&2; return 2; }

# Derive cluster + mlflow settings from the config (literals; no env interpolation needed).
local cfgvars
cfgvars="$(_uvx python - "$cfg" <<'PY'
import os, sys, yaml, json, shlex
c = yaml.safe_load(open(sys.argv[1])) or {}
cl = c.get("cluster", {}) or {}
out = c.get("output", {}) or {}
ml = ((out.get("export_config", {}) or {}).get("mlflow", {})) or {}
# Resolve ${MLFLOW_TRACKING_URI} (set by modelopttools:eval-config, sourced from .env).
turi = os.path.expandvars(ml.get("tracking_uri") or "")
# Fall back to the canonical host if unset/unresolved or the broken mlflow-nemo-evaluator
# alias (its 308 redirect strips /api/... -> REST 405).
if (not turi) or turi.startswith("${") or ("mlflow-nemo-evaluator" in turi):
turi = os.getenv("MLFLOW_TRACKING_URI") or "https://mlflow.frontier-evals.nvidia.com/"
def emit(k, v): print(f"{k}={shlex.quote(str(v))}")
emit("MLP_HOST", cl.get("hostname", "")); emit("MLP_USER", cl.get("username", ""))
emit("MLP_OUTDIR", out.get("dir", "")); emit("MLP_TURI", turi)
emit("MLP_EXP", ml.get("experiment_name", "") or ""); emit("MLP_DESC", ml.get("description", "") or "")
emit("MLP_TAGS", json.dumps(ml.get("tags") or {}))
PY
)" || { echo "ERROR: failed to parse $cfg" >&2; return 1; }
local MLP_HOST MLP_USER MLP_OUTDIR MLP_TURI MLP_EXP MLP_DESC MLP_TAGS
eval "$cfgvars"
[[ -n "$MLP_HOST" && -n "$MLP_OUTDIR" ]] || { echo "ERROR: cluster.hostname / output.dir missing in $cfg" >&2; return 1; }

local sshdest="${MLP_USER:+$MLP_USER@}$MLP_HOST" run="$MLP_OUTDIR/$rid"
_log "Locating merged bundles under $run on $sshdest …"
local -a benchdirs
mapfile -t benchdirs < <(ssh -o BatchMode=yes "$sshdest" \
"find '$run' -mindepth 2 -maxdepth 2 -name 'eval-*.json' -not -path '*/shard_*' -printf '%h\n' 2>/dev/null | sort -u")
[[ ${#benchdirs[@]} -gt 0 ]] || { echo "ERROR: no merged eval-*.json under $run — run 'nel-next.sh eval merge -r $rid' first" >&2; return 1; }

local staged; staged="$(mktemp -d "${TMPDIR:-/tmp}/nel-mlflow-push.XXXXXX")"
trap 'rm -rf "$staged"' RETURN
local -a localbundles=(); local b name
for b in "${benchdirs[@]}"; do
name="$(basename "$b")"; mkdir -p "$staged/$name"
rsync -rt --no-perms --no-group -e "ssh -o BatchMode=yes" "$sshdest:$b/eval-*.json" "$staged/$name/" >&2
localbundles+=("$staged/$name"); _log "staged bundle: $name"
done

local -a oargs=(-o "tracking_uri=$MLP_TURI" -o emit_traces=false)
[[ -n "$MLP_EXP" ]] && oargs+=(-o "experiment_name=$MLP_EXP")
[[ -n "$MLP_DESC" ]] && oargs+=(-o "description=$MLP_DESC")
[[ "$MLP_TAGS" != "{}" ]] && oargs+=(-o "tags=$MLP_TAGS")
_log "Exporting ${#localbundles[@]} bundle(s) to MLflow: $MLP_TURI"
MLFLOW_TRACKING_URI="$MLP_TURI" _uvx nel export "${localbundles[@]}" --dest mlflow "${oargs[@]}" "${extra[@]}"
}

# --help needs no environment; handle it before requiring uvx.
case "${1:-}" in
-h|--help) awk '/^# nel-next\.sh/{p=1} /^set /{p=0} p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;;
esac

command -v uvx >/dev/null 2>&1 || { echo "ERROR: 'uvx' not found (curl -LsSf https://astral.sh/uv/install.sh | sh)" >&2; exit 1; }

case "${1:-}" in
--setup-only) _uvx nel --version >/dev/null 2>&1 && _log "nel-next ready — ${INSTALL_SPEC}"; exit 0 ;;
--which) echo "uvx --python 3.12 --from \"${INSTALL_SPEC}\" nel"; exit 0 ;;
--version) _uvx python -c 'import nemo_evaluator; print(nemo_evaluator.__version__)'; exit 0 ;;
mlflow-push) _mlflow_push "${@:2}"; exit $? ;;
"") echo "ERROR: no args. Try: nel-next.sh eval run <config.yaml> [--dry-run] (or --help)" >&2; exit 2 ;;
esac

exec uvx --python 3.12 --from "$INSTALL_SPEC" nel "$@"
145 changes: 145 additions & 0 deletions .agents/skills/benchmark-model-kernels/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
---
name: benchmark-model-kernels
description: >-
Inspect Hugging Face decoder layers on meta tensors and plan or run per-rank
BF16, FP8, and NVFP4 GEMM or fused-MoE microbenchmarks with the bundled
scripts and a local FlashInfer checkout. Use when choosing a model, GPU, TP,
EP, or M/token-concurrency sweep; deriving common fused QKV and gate/up
shapes without loading checkpoint weights; or using FlashInfer benchmark
utilities. Do not use for end-to-end server throughput or request latency.
---

# Benchmark Model Kernels

Plan a single-GPU microbenchmark for the per-rank shapes of an intended
deployment. The scripts never load checkpoint weights, launch distributed
workers, or measure collectives, serving throughput, or request latency.

## Interview, one decision per message

Ask exactly one unresolved decision per message with two or three concrete
options, state the default, and wait for the answer. Recommend an option only
when it is substantively better. Skip decisions already answered. Follow this
order:

1. **Model** — a local directory, a `config.json`, or a Hub ID (equivalent; no
default). The script builds the model on meta tensors from configuration
only. Do not enable `--trust-remote-code` without explicit approval; pin
`--revision <commit>` when it is needed.
2. **TP and EP** — accept both directly, or derive them from the intended
deployment's GPU model and count and confirm. Defaults: `TP=1`, `EP=1`.
Derive parallelism from the intended deployment, never from the GPU that
runs the microbenchmark. The script validates every sharding rule
(divisibility, GQA replication, expert partitioning) and errors loudly.
3. **M sweep** — balanced default (recommended): `1 8 64 512`; decode-focused:
`1 4 16 32`; throughput-focused: `64 256 1024 4096`. M is roughly the
tokens scheduled per step (decode: active sequences), not endpoint
concurrency. With EP, an MoE row models one rank's share of the global
batch: a global batch of B tokens corresponds to the column M = B/EP, so
do not compare different EP values at the same M.
4. **Shape preview** — always run this before anything else; no FlashInfer or
GPU needed:

```bash
python .agents/skills/benchmark-model-kernels/scripts/benchmark_model.py <model> \
--tp <tp> --ep <ep> --ms <m1> <m2> ... --print_only
```

Review the printed shapes and the MoE tuple with the user.
`# unsupported:` lines mean the list is partial and the script exits
nonzero — handle those via **Manual supplements** below.
5. **FlashInfer checkout and GPU** — the full benchmark needs a FlashInfer
*source checkout* containing `benchmarks/flashinfer_benchmark.py`; the
installed wheel alone is not enough. Prefer a clean checkout matching the
installed `flashinfer` version; ask before cloning or installing anything.
On the benchmark machine, check `nvidia-smi` and package versions, verify
the target GPU is idle (concurrent work on the same GPU skews timings),
and verify CUPTI timing with a tiny `bench_gpu_time(..., enable_cupti=True)`
probe — a warning that falls back to CUDA events is a failure (the
`cupti-python`/`nvidia-cuda-cupti` packages must match PyTorch's CUDA
major). Ask for a GPU index only when several are visible. Pick a fresh
workdir and state it.
6. **Full benchmark**:

```bash
CUDA_VISIBLE_DEVICES=<gpu-index> \
python .agents/skills/benchmark-model-kernels/scripts/benchmark_model.py <model> \
--tp <tp> --ep <ep> --ms <m1> <m2> ... \
--flashinfer_repo <flashinfer-repo> --workdir <workdir>
```

Run a short plumbing check first (append
`--dry_run_iters 1 --num_iters 3 --no_autotune`, throwaway workdir),
especially after changing FlashInfer versions or shape logic; never present
it as a performance result. Then run with defaults. The first fused-MoE
build or autotune can take several minutes; its cache is reused.

## Rules the scripts own

Do not restate, re-derive, or override these — the code enforces them:

- `benchmark_model.py` derives `--nks` (as `N,K,module-name` triples) and
all `--moe_*` arguments; overrides are rejected.
- Row labels are logical shapes; the runner applies vLLM's physical padding.
Report both shapes whenever they differ.
- A failed case writes FlashInfer's error message (or a pointer to
`driver.log`) into its `combined_results.csv` cell, and the command exits
nonzero after the table is written. Never present a partial table as a
successful benchmark; read `driver.log` before rerunning anything.

## Known backend and driver limits

- `mm_fp4` TensorRT-LLM needs `N % 128 == 0` (shuffled weight layout): its
cell reports no result row, or on stock 0.6.x drivers an empty assertion
that fails every `mm_fp4` backend for that shape.
- `mm_fp8` (trtllm_low_latency) needs `K % 128 == 0`.
- MoE rows cover FlashInfer's CUTLASS fused MoE, the trtllm-gen NVFP4 and
per-tensor FP8 MoE, and the CuteDSL NVFP4 MoE. The CuteDSL MoE row appears
only for Swiglu models (the kernel supports nothing else); the `cutedsl` and
`trtllm` backends require recent GPUs and report per-case errors elsewhere.
- Gated NVFP4 CUTLASS MoE with `2F % 128 != 0` per rank fails — vLLM raises
instead of padding — often as a `CUDA error: misaligned address`. Prefer EP
over TP for the experts to keep the per-rank width legal.
- Do not benchmark a padded shape to dodge these limits and call it
vLLM-equivalent; report the limit instead.

## Manual supplements

For each `# unsupported:` layout from the preview: inspect that module's
forward path and the intended runtime's TP/EP sharding, derive the per-rank
shape (never guess sharding from a weight shape alone), and benchmark only the
missing shape:

```bash
CUDA_VISIBLE_DEVICES=<gpu-index> \
python .agents/skills/benchmark-model-kernels/scripts/benchmark_via_builtin.py \
--flashinfer_repo <flashinfer-repo> --ms <m1> <m2> ... \
--nks <n>,<k>,<name> --workdir <workdir>
```

Label these rows as manual supplements; this is not a substitute for running
`benchmark_model.py` first. Shell-quote user-supplied paths.

## Report

Report the command, GPU, versions, TP/EP, M values, shapes (logical and
physical where they differ), warnings, and the artifacts: `testlist.txt`,
`driver.log` (full driver output), `builtin_results.csv` (milliseconds,
success-only), and `combined_results.csv` (long form, microseconds: columns `module_name,
M, N, K, backend, with_quant, runtime` in `GEMM` and `MoE` sections; modules
fused into one GEMM are joined with `|` in `module_name`, while distinct
same-shape modules appear as duplicated rows sharing one measurement; MoE
rows keep the `H= F= E= top_k=` parameter line and leave N/K empty). In quantization-recipe terms:
`bf16` rows are the unquantized W16A16 baseline, `fp8` rows are per-tensor
W8A8, and `nvfp4` rows are W4A4. Plain quantized rows time the kernel with
pre-quantized activations; `*_with_quant` rows add a separately measured
activation-quantization time in the scale-factor layout that backend
consumes, except the NVFP4 CUTLASS MoE row, which is a single fused
measurement. MoE routing is synthetic: uniform expert
distribution everywhere (real skewed routing is slower), and the trtllm-gen
rows, which route in-kernel, use a fixed `renormalize` method regardless of
the model's routing scheme. CUTLASS and CuteDSL MoE rows receive precomputed
expert indices and exclude routing-selection cost entirely. No row includes
the router GEMM itself. These are kernel times
only — never describe them as end-to-end latency or throughput; they omit
weights, layer frequency, communication, KV cache, and scheduling.
Loading
Loading