Re-enable the 80 char line width limit (#3305)
This commit is contained in:
@@ -93,14 +93,13 @@ class ModelRunner:
|
||||
scheduler_config=self.scheduler_config)
|
||||
|
||||
self.model_memory_usage = m.consumed_memory
|
||||
logger.info(
|
||||
f"Loading model weights took {self.model_memory_usage / float(2**30):.4f} GB"
|
||||
)
|
||||
logger.info(f"Loading model weights took "
|
||||
f"{self.model_memory_usage / float(2**30):.4f} GB")
|
||||
|
||||
if self.lora_config:
|
||||
assert hasattr(
|
||||
self.model, "supported_lora_modules"
|
||||
) and self.model.supported_lora_modules, "Model does not support LoRA"
|
||||
assert hasattr(self.model, "supported_lora_modules"
|
||||
) and self.model.supported_lora_modules, (
|
||||
"Model does not support LoRA")
|
||||
assert hasattr(
|
||||
self.model,
|
||||
"embedding_modules"), "Model does not have embedding_modules"
|
||||
|
||||
@@ -79,7 +79,8 @@ class Worker:
|
||||
cpu_swap_space: int = 0,
|
||||
cache_dtype: str = "float16",
|
||||
) -> Tuple[int, int]:
|
||||
"""Simply returns max_num_seqs as num_gpu_blocks, 0 as num_cpu_blocks."""
|
||||
"""Simply returns max_num_seqs as num_gpu_blocks, 0 as
|
||||
num_cpu_blocks."""
|
||||
num_gpu_blocks = self.scheduler_config.max_num_seqs
|
||||
num_cpu_blocks = 0
|
||||
return num_gpu_blocks, num_cpu_blocks
|
||||
@@ -177,7 +178,8 @@ def _init_distributed_environment(
|
||||
"distributed_init_method must be set if torch.distributed "
|
||||
"is not already initialized")
|
||||
else:
|
||||
distributed_backend = distributed_backend if distributed_backend else "nccl"
|
||||
distributed_backend = (distributed_backend
|
||||
if distributed_backend else "nccl")
|
||||
torch.distributed.init_process_group(
|
||||
backend=distributed_backend,
|
||||
world_size=parallel_config.world_size,
|
||||
|
||||
Reference in New Issue
Block a user