[Misc] Capture and log the time of loading weights (#13666)
This commit is contained in:
@@ -1109,11 +1109,14 @@ class GPUModelRunnerBase(ModelRunnerBase[TModelInputForGPU]):
|
||||
def load_model(self) -> None:
|
||||
logger.info("Starting to load model %s...", self.model_config.model)
|
||||
with DeviceMemoryProfiler(self.device) as m:
|
||||
time_before_load = time.perf_counter()
|
||||
self.model = get_model(vllm_config=self.vllm_config)
|
||||
time_after_load = time.perf_counter()
|
||||
|
||||
self.model_memory_usage = m.consumed_memory
|
||||
logger.info("Loading model weights took %.4f GB",
|
||||
self.model_memory_usage / float(2**30))
|
||||
logger.info("Loading model weights took %.4f GB and %.6f seconds",
|
||||
self.model_memory_usage / float(2**30),
|
||||
time_after_load - time_before_load)
|
||||
|
||||
if self.lora_config:
|
||||
assert supports_lora(
|
||||
|
||||
Reference in New Issue
Block a user