| name | qad |
| description | 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. |
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 usage
examples/megatron_bridge/{quantize.py,distill.py} via --help
- the common skill's
environment-setup.md, workspace-management.md, and
slurm-setup.md; also its remote-execution.md for 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 through quantize.py
to 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 , require finite positive
for enabled static quantizers; accept /format-defined
only when the recipe intends it. Treat the summary as rank-local under model
parallelism.