[CI] Fix Nemotron nightly mixed precision checkpoints test (#27284)
Co-authored-by: Brayden Zhong <brayden.zhong@radixark.ai>
This commit is contained in:
co-authored by
Brayden Zhong
parent
3b62286fca
commit
d381ec7997
@@ -1419,14 +1419,16 @@ class ModelRunner(ModelRunnerKVCacheMixin):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# TODO: Make sure all models have `quant_config` attribute, and all online quantization methods register which layers they actually quantize.
|
# TODO: Make sure all models have `quant_config` attribute, and all online quantization methods register which layers they actually quantize.
|
||||||
if (
|
# TODO: Move this online-quantization reporting out of ModelRunner.
|
||||||
hasattr(self.model, "quant_config")
|
quantized_layers = getattr(
|
||||||
and hasattr(self.model.quant_config, "quantized_layers")
|
getattr(self.model, "quant_config", None), "quantized_layers", None
|
||||||
and self.server_args.quantization is not None
|
|
||||||
):
|
|
||||||
layer_types, quantized_layers_count = (
|
|
||||||
self.model.quant_config.quantized_layers
|
|
||||||
)
|
)
|
||||||
|
if (
|
||||||
|
self.server_args.quantization is not None
|
||||||
|
and isinstance(quantized_layers, tuple)
|
||||||
|
and len(quantized_layers) == 2
|
||||||
|
):
|
||||||
|
layer_types, quantized_layers_count = quantized_layers
|
||||||
logger.info(
|
logger.info(
|
||||||
f"Online {self.server_args.quantization} quantization: quantized {quantized_layers_count} layers of types: {layer_types}"
|
f"Online {self.server_args.quantization} quantization: quantized {quantized_layers_count} layers of types: {layer_types}"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user