Skip to content

Commit

Permalink
Update matrix run
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Oct 30, 2024
1 parent edb8c11 commit 3331e88
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
4 changes: 1 addition & 3 deletions config/scaling.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
11 changes: 9 additions & 2 deletions milabench/sizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,18 @@ 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:
scaling_config = default_scaling_config

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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 3331e88

Please sign in to comment.