From c14896f0d437b845e9da199e9013d8187b412051 Mon Sep 17 00:00:00 2001 From: Mark Kurtz Date: Mon, 4 Aug 2025 16:05:17 +0000 Subject: [PATCH 1/2] Prototype implementation for non-linear sweeps --- src/guidellm/benchmark/profile.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/guidellm/benchmark/profile.py b/src/guidellm/benchmark/profile.py index 642cb7a8..6a2c8715 100644 --- a/src/guidellm/benchmark/profile.py +++ b/src/guidellm/benchmark/profile.py @@ -277,6 +277,10 @@ class SweepProfile(AsyncProfile): ) rate: float = -1 rate_type: Literal["constant", "poisson"] = "constant" + max_rate_adjustment: float = Field( + default=1.1, + description="Multiplier to over-estimate the measured throughput.", + ) @property def strategy_types(self) -> list[StrategyType]: @@ -297,8 +301,10 @@ def next_strategy(self) -> Optional[SchedulingStrategy]: ) min_rate = self.measured_rates[0] - max_rate = self.measured_rates[1] - rates = np.linspace(min_rate, max_rate, self.sweep_size - 1)[1:] + max_rate = self.measured_rates[1] * self.max_rate_adjustment + + halving_fractions = 0.5 ** np.arrange(self.sweep_size - 1) + rates = ((max_rate - min_rate) * halving_fractions + min_rate)[1:] if self.rate_type == "constant": return AsyncConstantStrategy( @@ -360,6 +366,9 @@ def from_standard_args( # type: ignore[override] if "strategy_type" not in kwargs: kwargs["strategy_type"] = "constant" + if "max_rate_percent_adjustment" not in kwargs: + kwargs["max_rate_percent_adjustment"] = 25.0 + return SweepProfile(sweep_size=int(rate), random_seed=random_seed, **kwargs) From dd56c8037187a3a80df885059cdab16147c975f3 Mon Sep 17 00:00:00 2001 From: Mark Kurtz Date: Mon, 4 Aug 2025 16:06:06 +0000 Subject: [PATCH 2/2] Prototype implementation for non-linear sweeps --- src/guidellm/benchmark/profile.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/guidellm/benchmark/profile.py b/src/guidellm/benchmark/profile.py index 6a2c8715..24b99559 100644 --- a/src/guidellm/benchmark/profile.py +++ b/src/guidellm/benchmark/profile.py @@ -366,9 +366,6 @@ def from_standard_args( # type: ignore[override] if "strategy_type" not in kwargs: kwargs["strategy_type"] = "constant" - if "max_rate_percent_adjustment" not in kwargs: - kwargs["max_rate_percent_adjustment"] = 25.0 - return SweepProfile(sweep_size=int(rate), random_seed=random_seed, **kwargs)