Chenjie Luo 19ce447d62 [skill] evaluation: mandate 8 SciCode runs and report the mean (#2327)
### What does this PR do?

Type of change: documentation

SciCode's repeat count was pinned to `num_repeats: 1` in #1945, which
dropped its
effective sample count from the original `8` (set when the recipe was
written in
#1561) to `1`. #2254 later documented that a single run cannot gate on —
scored
single-shot at `temperature 1.0`, a paired comparison moved **3.92 pp
and changed
sign** once repeated, and the day-0 skill's own table records a
DeepSeek-V4-Pro
drop reading 2.96 pp (`REGRESSION`) at 1 run versus **-0.96 pp**
(`PASS`) at 8.
But #2254 left the remedy as a judgment call — *"pool until the standard
error is
below the threshold, or report the task `INDETERMINATE`"* — so a one-run
SciCode
number was still reportable.

This restores the original avg-of-8 statistics as a hard requirement,
without
reintroducing the in-run repeats that #1945 removed for a reason
(repeating
inside one run multiplies exposure to code-execution sandbox errors).
The task
keeps `num_repeats: 1` per run; the repeat budget of 8 is spent as **8
independent submissions, reported as their mean** — 8 per side for a
comparison,
`INDETERMINATE` below 8.

Changes:

- **`recipes/tasks/aa/scicode.md`** — mandatory *8 runs* section: how to
submit
the 8 inside a multi-task AA config, fresh-run requirement (no `run.sub`
replay off a warm cache), duplicate-score check, per-run validation
before
  averaging, and mean + `stdev/sqrt(8)` + run-count reporting.
- **`compare-results` / `day0-release`** — 8 runs per side is a floor,
not a
  variance-dependent choice.
- **`references/quantization-benchmarks.md`** — the repeat-count table
still
  listed SciCode at `num_repeats: 8`, stale since #1945.
- **`evaluation/SKILL.md`** — AA rule points at the 8 submissions; the
walltime
section distinguishes them from the forbidden practice of splitting a
heavy
  task across configs to dodge the 4h cap.
- **`evaluation/tests/evals.json`** — behavioral eval case for the rule.

### Usage

```bash
# Full AA suite (= SciCode run 1), then SciCode alone for runs 2-8.
nel run --config <cfg>.yaml
for _ in $(seq 7); do nel run --config <cfg>.yaml -t ns_scicode; done
# Report the mean of scicode_pass_at_1_avg-of-1_subtask_accuracy over the 8 runs,
# plus stdev/sqrt(8) and the run count.
```

### Testing

- `pre-commit run --files <changed files>` — all hooks pass
(`markdownlint-cli2`,
  `check json`, symlink sync), no hook-applied modifications.
- `json.load` on `evaluation/tests/evals.json` parses; 4 cases, existing
three
  unchanged (append-only diff, original formatting preserved).
- Cross-checked every remaining SciCode reference in the plugin
  (`grep -rn -i scicode plugins/modelopt/`) so no doc still claims
  `num_repeats: 8` or a variance-dependent pool size.

**Ran the protocol end-to-end** on Qwen3.8-27B-FP8 (gcp-nrt, 8xB200,
`temperature 1.0`),
8 independent `nel run` submissions, all `COMPLETED`, each scoring the
full 80 problems /
338 subtasks. MLflow experiment 2017:

| passed/338 | 168 | 167 | 166 | 164 | 163 | 161 | 157 | 155 |
|---|---|---|---|---|---|---|---|---|
| score | 49.70 | 49.41 | 49.11 | 48.52 | 48.22 | 47.63 | 46.45 | 45.86
|

**Result 48.11, stdev 1.39, stderr 0.49.** Pooled 1301/2704 subtasks
reproduces 48.1139 exactly.

This is the evidence for the change: **the spread is 3.85 pp and the
worst single run sits
2.26 pp from the mean**, so against a 1% gate any one of these eight,
reported alone, would
have been defensible and wrong. Previously this PR rested on the
variance figures inherited
from #2254; it now rests on a measured pool.

Also validated by that campaign: an agent given only "run a full SciCode
eval, follow the
evaluation skill" — with no mention of the protocol — read the recipe,
submitted 8 runs and
reported the mean with a standard error. And the corrected score key is
what made the numbers
harvestable at all; the `avg-of-1` name returns nothing.

Two operational findings from the run, one of which is folded into the
recipe:

- An MLflow export job timed out (`nel-export-ns_scicode.0`, elapsed
`00:30:11` against a
`00:30:00` limit) because all 8 exports hit the CPU partition at once
and each reinstalls
the launcher. Caused by the fan-out this PR mandates, so the recipe now
warns about it and
  says to re-submit `export.sbatch` rather than treat the run as lost.
- Out of scope, filed for separate fix: `.claude/agents` is a 0-byte
read-only placeholder,
so the `monitor` skill's instruction to create a session registry under
it fails with
  `Not a directory`.

### Before your PR is "*Ready for review*"

- Is this change backward compatible?: ✅
- If you copied code from any other sources or added a new PIP
dependency, did you follow guidance in `CONTRIBUTING.md`: N/A
- Did you write any new necessary tests?: ✅ — added
`scicode-eight-run-average` to `evaluation/tests/evals.json`
- Did you update
[Changelog](https://github.com/NVIDIA/Model-Optimizer/blob/main/CHANGELOG.rst)?:
N/A — agent-skill guidance, not a user-facing library change
- Did you get Claude approval on this PR?: ❌ — not yet run

### Additional Information

Restores the sampling behavior of #1561 while keeping the sandbox-load
fix from
#1945 and honoring the variance evidence from #2254.

Note: `origin/feature/puzzletron_v2` still carries the pre-#1945 version
of this
file (`num_repeats: 8`, single submission) and rewrites it to source the
repeat
count from `examples/llm_eval/task_contracts.yaml`. If that branch lands
it will
need to be reconciled with this protocol.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Documentation**
- Clarified SciCode evaluation requirements: eight independent, valid
runs per comparison side with one repeat each.
- Standardized score reporting using per-run metrics, mean, standard
error, and run count.
- Added provenance checks and replacement runs for invalid or replayed
results, including timeout recovery.
  - Fewer than eight valid runs are reported as **INDETERMINATE**.
- Updated benchmarking guidance to distinguish separate submissions from
repeated runs.

- **Tests**
- Added coverage for eight-run averaging, validation, replacement runs,
and **INDETERMINATE** outcomes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Chenjie Luo <chenjiel@nvidia.com>
2026-09-04 19:08:53 +00:00
…
…

Banner image

NVIDIA Model Optimizer

Documentation version license

Documentation | Roadmap | Announcement Blogs


NVIDIA Model Optimizer (referred to as Model Optimizer, or ModelOpt) is a library comprising state-of-the-art model optimization techniques including quantization, pruning, Neural Architecture Search (NAS), distillation, speculative decoding and sparsity to accelerate models.

[Input] Model Optimizer currently supports inputs of a Hugging Face, PyTorch or ONNX model.

[Optimize] Model Optimizer provides Python APIs for users to easily compose the above model optimization techniques and export an optimized quantized checkpoint. Model Optimizer is also integrated with NVIDIA Megatron-Bridge, Megatron-LM and Hugging Face Accelerate for training required inference optimization techniques.

[Export for deployment] Seamlessly integrated within the NVIDIA AI software ecosystem, the quantized checkpoint generated from Model Optimizer is ready for deployment in downstream inference frameworks like SGLang, TensorRT-LLM, TensorRT, or vLLM. The unified Hugging Face export API now supports both transformers and diffusers models.

Latest News

Previous News

Install

To install stable release packages for Model Optimizer with pip from PyPI:

pip install -U nvidia-modelopt[all]

Model Optimizer will download and install additional third-party open source software projects. Review the license terms of these open source projects before use.

To install from source in editable mode with all development dependencies or to use the latest features, run:

# Clone the Model Optimizer repository
git clone git@github.com:NVIDIA/Model-Optimizer.git
cd Model-Optimizer

pip install -e .[dev]

You can also directly use NVIDIA container images, which have Model Optimizer pre-installed:

  • nvcr.io/nvidia/pytorch:<version>-py3
  • nvcr.io/nvidia/nemo:<version>
  • nvcr.io/nvidia/tensorrt-llm/release:<version>

Before pulling and using the container images, please review their respective license terms. Make sure to upgrade Model Optimizer to the latest version as described above. Visit our installation guide for more fine-grained control on installed dependencies or for alternative docker images and environment variables to setup.

Techniques

Technique Description Examples Docs
Post Training Quantization Compress model size by 2x-4x, speeding up inference while preserving model quality! [HF LLMs / VLMs] [Megatron-Bridge LLMs / VLMs] [Diffusers] [ONNX] [Windows] [docs]
Quantization Aware Training / Distillation Refine accuracy of quantized models even further with a few training steps! [Hugging Face] [Megatron-Bridge] [docs]
Pruning Reduce your model parameters or memory footprint and accelerate inference by removing unnecessary weights! [General] [Megatron-Bridge]
Distillation Reduce deployment model size by teaching small models to behave like larger models! [Hugging Face] [Megatron-Bridge] [Megatron-LM] [docs]
Speculative Decoding Train draft modules to predict extra tokens during inference! [Hugging Face] [Megatron-LM] [docs]
Sparsity Efficiently compress your model by storing only its non-zero parameter values and their locations [Hugging Face] [docs]

Pre-Quantized Checkpoints

Resources

Model Support Matrix

Model Type Support Matrix
LLM / VLM Quantization View Support Matrix
Diffusers Quantization View Support Matrix
ONNX Quantization View Support Matrix
Windows Quantization View Support Matrix
Quantization Aware Training View Support Matrix
Pruning View Support Matrix
Distillation View Support Matrix
Speculative Decoding View Support Matrix

Deprecation Policy

Model Optimizer follows a structured approach to managing deprecated features:

  • Communication: Deprecation notices are documented in the Changelog. Deprecated items include source code statements indicating deprecation timing, with runtime warnings issued upon use.
  • Migration Period: Since Model Optimizer is still pre-1.0, we provide a 1-release (~1-month) migration period after deprecation. During this window, deprecated features continue functioning while issuing warnings.
  • Scope: The policy addresses both complete deprecations (entire APIs removed) and partial ones (specific parameters removed while methods remain).
  • Removal: Following the migration period, deprecated elements are removed in alignment with semantic versioning standards, potentially including breaking changes in minor version updates while Model Optimizer remains in 0.x.

Citation

If you use NVIDIA Model Optimizer in your research, please cite it as follows:

@misc{nvidia-modelopt,
  author       = {{NVIDIA Corporation}},
  title        = {{NVIDIA Model Optimizer}},
  howpublished = {\url{https://github.com/NVIDIA/Model-Optimizer}},
  year         = {2024--2026},
  note         = {GitHub repository}
}

Contributing

Model Optimizer is now open source! We welcome any feedback, feature requests and PRs. Please read our Contributing guidelines for details on how to contribute to this project.

AI Agents

ModelOpt's agent skills can be installed from this repository and used in any workspace.

Claude Code

claude plugin marketplace add https://github.com/NVIDIA/Model-Optimizer.git
claude plugin install modelopt@modelopt

Codex

codex plugin marketplace add https://github.com/NVIDIA/Model-Optimizer.git

Then open /plugins, select the modelopt marketplace, and install modelopt. Contributors can also use the skills directly from a checkout. See the agent tooling notes.

Top Contributors

Contributors

Happy optimizing!

S
Description
GitHub Trending: NVIDIA/Model-Optimizer
Readme Multiple Licenses
1.2 GiB
Languages
Python 97.3%
Shell 1.3%
Cuda 0.8%
Jinja 0.3%
C++ 0.2%