@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 15d76f74e2
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 7, 17:45 UTC

Revert "[Misc] Enable weights loading tracking for quantized models" (#35309)

Lucas Wilkinson committed Feb 25, 2026 at 12:20 UTC 15d76f74e2fdb12a95ea00f0ca283acf6219a2b7
1 file changed +4 -15
vllm/model_executor/model_loader/default_loader.py
+4 -15
@@ -14,7 +14,6 @@ from transformers.utils import SAFE_WEIGHTS_INDEX_NAME
14 from vllm.config import ModelConfig
15 from vllm.config.load import LoadConfig
16 from vllm.logger import init_logger
17 -from vllm.model_executor.layers.quantization.kv_cache import BaseKVCacheMethod
17 from vllm.model_executor.layers.quantization.torchao import torchao_version_at_least
18 from vllm.model_executor.model_loader.base_loader import BaseModelLoader
19 from vllm.model_executor.model_loader.weight_utils import (
@@ -287,6 +286,7 @@ class DefaultModelLoader(BaseModelLoader):
286 ):
287 self.load_config.safetensors_load_strategy = "torchao"
288
289 + weights_to_load = {name for name, _ in model.named_parameters()}
290 loaded_weights = model.load_weights(self.get_all_weights(model_config, model))
291
292 self.counter_after_loading_weights = time.perf_counter()
@@ -295,20 +295,9 @@ class DefaultModelLoader(BaseModelLoader):
295 self.counter_after_loading_weights - self.counter_before_loading_weights,
296 scope="local",
297 )
298 - self.track_weights_loading(model, loaded_weights)
299 -
300 - def track_weights_loading(
301 - self, model: nn.Module, loaded_weights: set[str] | None
302 - ) -> None:
303 - weights_to_load = {name for name, _ in model.named_parameters()}
304 - if loaded_weights is not None:
305 - for name, module in model.named_modules():
306 - quant_method = getattr(module, "quant_method", None)
307 - # ignore kv_cache scale, which can be missing in checkpoints
308 - if isinstance(quant_method, BaseKVCacheMethod):
309 - for param_name, _ in module.named_parameters():
310 - full_name = f"{name}.{param_name}" if name else param_name
311 - loaded_weights.add(full_name)
298 + # We only enable strict check for non-quantized models
299 + # that have loaded weights tracking currently.
300 + if model_config.quantization is None and loaded_weights is not None:
301 weights_not_loaded = weights_to_load - loaded_weights
302 if weights_not_loaded:
303 raise ValueError(