[Benchmark] Add sglang-embedding backend to bench_serving (#20017)
Co-authored-by: Satyam Kumar <satyamk@linkedin.com>
This commit is contained in:
co-authored by
Satyam Kumar
parent
61b228239e
commit
a54d71e967
@@ -54,6 +54,9 @@ class BaseDataset(ABC):
|
||||
|
||||
|
||||
def compute_random_lens(full_len: int, range_ratio: float, num: int) -> List[int]:
|
||||
# full_len=0 is valid for embedding benchmarks where no output tokens are generated
|
||||
if full_len <= 0:
|
||||
return [0] * num
|
||||
return np.random.randint(
|
||||
max(int(full_len * range_ratio), 1),
|
||||
full_len + 1,
|
||||
|
||||
Reference in New Issue
Block a user