Skip to content
This repository was archived by the owner on Jun 2, 2026. It is now read-only.

Commit da11d11

Browse files
Don't check memory for remote models
1 parent d6d62bf commit da11d11

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sidekick/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ def is_resource_low(model_name: str):
321321
off_load = False
322322
else:
323323
n_gpus = torch.cuda.device_count()
324-
device_index = MODEL_DEVICE_MAP[model_name] if model_name and n_gpus > 1 else 0
324+
device_index = MODEL_DEVICE_MAP.get(model_name, 0) if model_name and "gpt-3.5" not in model_name or "gpt-4" not in model_name and n_gpus > 1 else 0
325325
logger.debug(f"Information on device: {device_index}")
326326
free_in_GB = int(torch.cuda.mem_get_info(device_index)[0] / 1024**3)
327327
total_memory = int(torch.cuda.get_device_properties(device_index).total_memory / 1024**3)

0 commit comments

Comments
 (0)