We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d68d2d commit a204b47Copy full SHA for a204b47
vllm/model_executor/model_loader/loader.py
@@ -1330,11 +1330,14 @@ def load_model(self, vllm_config: VllmConfig) -> nn.Module:
1330
local_model_path, gguf_weights_map):
1331
model_config.hf_config.update({"tie_word_embeddings": True})
1332
1333
+ target_device = torch.device(device_config.device)
1334
with set_default_torch_dtype(model_config.dtype):
- with torch.device(device_config.device):
1335
+ with target_device:
1336
model = _initialize_model(vllm_config=vllm_config)
1337
model.load_weights(
1338
self._get_weights_iterator(local_model_path, gguf_weights_map))
1339
+
1340
+ _process_weights_after_loading(model, model_config, target_device)
1341
return model
1342
1343
0 commit comments