diff --git a/config/scaling.yaml b/config/scaling.yaml index d9d3dbf9..fcd7d3da 100644 --- a/config/scaling.yaml +++ b/config/scaling.yaml @@ -285,9 +285,7 @@ lightning-gpus: 48: 11056.25 MiB 112: 16776.25 MiB 128: 15858 MiB - 240: 28942.25 MiB - 504: 54100.25 MiB - 624: 65386.25 MiB + 256: 77822 MiB optimized: 16 llama: {} llava-gpus: diff --git a/milabench/sizer.py b/milabench/sizer.py index 327e7d4b..00d6d2b6 100644 --- a/milabench/sizer.py +++ b/milabench/sizer.py @@ -53,8 +53,7 @@ def to_octet(value: str) -> float: class Sizer: """Automatically scale the batch size to match GPU spec""" - def __init__(self, options=SizerOptions(), scaling_config=None): - self.options = options + def __init__(self, scaling_config=None): self.path = scaling_config if scaling_config is None: @@ -62,6 +61,10 @@ def __init__(self, options=SizerOptions(), scaling_config=None): with open(scaling_config, "r") as sconf: self.scaling_config = yaml.safe_load(sconf) + + @property + def options(self): + return SizerOptions() def benchscaling(self, benchmark): # key @@ -165,6 +168,10 @@ def find_batch_size(self, benchmark, event): return -1 def argv(self, benchmark, capacity, argv): + newargv = self._argv(benchmark, capacity, argv) + return newargv + + def _argv(self, benchmark, capacity, argv): """Find the batch size and override it with a new value""" config = self.benchscaling(benchmark)