Scope the README's refused calibrations to the weight search

The KV-cache search calibrates its K/V proxies itself and takes their amax
over the ranks, so it admits max with distributed_sync off: the README now
says a weight search refuses the calibrations refused above. A resume also
needs the same transformers release, since one before 5.16 loads the sharded
weights as plain tensors, which a checkpoint records otherwise.

Signed-off-by: Shengliang Xu <shengliangx@nvidia.com>
This commit is contained in:
Shengliang Xu
2026-12-02 02:04:19 +00:00
parent 759bac9f6b
commit 97d639d506
+1 -1
View File
@@ -767,7 +767,7 @@ Two environment variables override the automatic distribution plan:
On more than one rank, `max` and `mse` calibration have run on GPUs; `gptq`, `smoothquant`, `awq_clip` and `nvfp4_act_headroom` are supported but not yet run on GPUs; `awq_lite`, `awq_full`, `svdquant`, `local_hessian` and `imatrix`, and `max` or `mse` with `distributed_sync` off, are refused before quantizing; and an LSQ recipe runs with a warning, since nothing has checked its learnable scales across ranks yet.
[AutoQuantize recipes](#autoquantize), KV-cache searches included, run expert-parallel too, and on a model replicated on every rank: each rank scores its own share of the calibration data, the scores are summed over the ranks, and every rank picks the same format per layer. A candidate that rewrites the weights (GPTQ or imatrix calibration) cannot search the routed experts an expert-parallel load shards over the ranks. Before loading the model, hf_ptq cannot tell which weights a candidate rewrites, so it refuses any such candidate there, also one confined to dense layers: run GPTQ with `MODELOPT_EP_DEGREE=1 MODELOPT_FSDP_SIZE=1` if the whole model fits on each GPU, as FSDP2 shards the weights into DTensors too, and imatrix, or a model that does not fit, in a single process. A search on several ranks also refuses the calibrations refused above, such as `awq_lite`, which keep their calibration on each rank, and a weight search an activation quantizer using a static bias; on an expert-parallel load, both searches refuse routed experts' inputs with a static bias, or with scales kept per token or in static blocks, whose shape routing changes. [Finalizing saved scores and format shards](#scoring-and-finalizing-autoquantize-in-separate-runs) need a single process, and a launch of several ranks refuses them before loading the model. With `--auto_quantize_checkpoint`, each rank saves and restores a file of its own, named with its rank: resume with the same world size, `MODELOPT_EP_DEGREE` and `MODELOPT_FSDP_SIZE`. The KV-cache search's files hold the K/V scales and scores every rank shares, and each rank checks the quantizers before them against its own model, so `--kv_auto_quantize_checkpoint` needs the same world size, and the same `MODELOPT_EP_DEGREE` once a weight search or quantization before it has quantized the experts.
[AutoQuantize recipes](#autoquantize), KV-cache searches included, run expert-parallel too, and on a model replicated on every rank: each rank scores its own share of the calibration data, the scores are summed over the ranks, and every rank picks the same format per layer. A candidate that rewrites the weights (GPTQ or imatrix calibration) cannot search the routed experts an expert-parallel load shards over the ranks. Before loading the model, hf_ptq cannot tell which weights a candidate rewrites, so it refuses any such candidate there, also one confined to dense layers: run GPTQ with `MODELOPT_EP_DEGREE=1 MODELOPT_FSDP_SIZE=1` if the whole model fits on each GPU, as FSDP2 shards the weights into DTensors too, and imatrix, or a model that does not fit, in a single process. A weight search on several ranks also refuses the calibrations refused above, such as `awq_lite`, which keep their calibration on each rank, and an activation quantizer using a static bias; on an expert-parallel load, both searches refuse routed experts' inputs with a static bias, or with scales kept per token or in static blocks, whose shape routing changes. [Finalizing saved scores and format shards](#scoring-and-finalizing-autoquantize-in-separate-runs) need a single process, and a launch of several ranks refuses them before loading the model. With `--auto_quantize_checkpoint`, each rank saves and restores a file of its own, named with its rank: resume with the same world size, `MODELOPT_EP_DEGREE`, `MODELOPT_FSDP_SIZE` and transformers release. The KV-cache search's files hold the K/V scales and scores every rank shares, and each rank checks the quantizers before them against its own model, so `--kv_auto_quantize_checkpoint` needs the same world size, and the same `MODELOPT_EP_DEGREE` once a weight search or quantization before it has quantized the experts.
A run that cannot shard the model the way the plan asks fails before loading, rather than loading the whole model on every rank. `--use_fsdp2` skips expert parallelism and uses the [FSDP2 path](#multi-node-post-training-quantization-with-fsdp2) instead. Expert parallelism refuses GPT-OSS and Llama-4: their experts are stored transposed, which the expert-parallel export cannot write yet. `--use_fsdp2` refuses their released checkpoints too (GPT-OSS's carry an MXFP4 `quantization_config`, and Llama-4's are multimodal), so quantize those in a single process (without `torchrun`), which spreads the model over the node's GPUs.