Skip to content

Commit f9f933a

Browse files
authored
1 parent ec0c0ce commit f9f933a

File tree

4 files changed

+60
-51
lines changed

4 files changed

+60
-51
lines changed

torchci/clickhouse_queries/oss_ci_benchmark_llms/query.sql

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,26 @@ WITH benchmarks AS (
4949
tupleElement(o.benchmark, 'extra_info')['args'],
5050
'tensor_parallel_size'
5151
),
52+
'random_input_len',
53+
JSONExtractString(
54+
tupleElement(benchmark, 'extra_info')['args'],
55+
'random_input_len'
56+
),
57+
'random_output_len',
58+
JSONExtractString(
59+
tupleElement(benchmark, 'extra_info')['args'],
60+
'random_output_len'
61+
),
62+
'input_len',
63+
JSONExtractString(
64+
tupleElement(benchmark, 'extra_info')['args'],
65+
'input_len'
66+
),
67+
'output_len',
68+
JSONExtractString(
69+
tupleElement(benchmark, 'extra_info')['args'],
70+
'output_len'
71+
),
5272
-- Used by Cachebench
5373
'is_dynamic',
5474
IF(

torchci/components/benchmark/llms/components/LLMsGraphPanel.tsx

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -170,31 +170,24 @@ export default function LLMsGraphPanel({
170170
const metric = record.metric;
171171

172172
if (repoName === "vllm-project/vllm") {
173-
let requestRate = record.extra!["request_rate"];
174-
// TODO (huydhn): Fix the invalid JSON on vLLM side
175-
if (
176-
metric.includes("itl") ||
177-
metric.includes("tpot") ||
178-
metric.includes("ttft")
179-
) {
180-
requestRate = requestRate !== "" ? requestRate : "Inf";
181-
}
173+
const requestRate = record.extra!["request_rate"];
174+
const tensorParallel = record.extra!["tensor_parallel_size"];
175+
const inputLen = record.extra!["random_input_len"]
176+
? record.extra!["random_input_len"]
177+
: record.extra!["input_len"];
178+
const outputLen = record.extra!["random_output_len"]
179+
? record.extra!["random_output_len"]
180+
: record.extra!["output_len"];
182181

183-
let tensorParallel = record.extra!["tensor_parallel_size"];
184-
// TODO (huydhn): Fix the passing of tensor_parallel_size to the benchmark
185-
// script on vLLM side
186-
if (model.includes("8B")) {
187-
tensorParallel = tensorParallel !== "" ? tensorParallel : "1";
188-
} else if (model.includes("70B")) {
189-
tensorParallel = tensorParallel !== "" ? tensorParallel : "4";
190-
} else if (model.includes("8x7B")) {
191-
tensorParallel = tensorParallel !== "" ? tensorParallel : "2";
182+
record.display = `${model} / tp${tensorParallel}`;
183+
if (requestRate) {
184+
record.display = `${record.display} / qps_${requestRate}`;
192185
}
193-
194-
if (requestRate !== "") {
195-
record.display = `${model} / tp${tensorParallel} / qps_${requestRate}`;
196-
} else {
197-
record.display = `${model} / tp${tensorParallel}`;
186+
if (inputLen) {
187+
record.display = `${record.display} / in_${inputLen}`;
188+
}
189+
if (outputLen) {
190+
record.display = `${record.display} / out_${outputLen}`;
198191
}
199192
} else if (
200193
repoName === "pytorch/pytorch" &&

torchci/components/benchmark/llms/components/LLMsSummaryPanel.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,24 @@ export default function LLMsSummaryPanel({
186186
return `${params.value}`;
187187
},
188188
});
189+
190+
columns.push({
191+
field: "input_len",
192+
headerName: "Input len.",
193+
flex: 1,
194+
renderCell: (params: GridRenderCellParams<any>) => {
195+
return `${params.value}`;
196+
},
197+
});
198+
199+
columns.push({
200+
field: "output_len",
201+
headerName: "Output len.",
202+
flex: 1,
203+
renderCell: (params: GridRenderCellParams<any>) => {
204+
return `${params.value}`;
205+
},
206+
});
189207
}
190208

191209
if (

torchci/lib/benchmark/llms/utils/llmUtils.ts

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -315,37 +315,15 @@ const toRowData = (
315315
if (repoName === "vllm-project/vllm") {
316316
// These fields are only available on vLLM benchmark
317317
const extraInfo = JSON.parse(extra);
318-
// TODO (huydhn): Fix the invalid JSON on vLLM side
319-
if (
320-
metric.includes("itl") ||
321-
metric.includes("tpot") ||
322-
metric.includes("ttft")
323-
) {
324-
extraInfo["request_rate"] =
325-
extraInfo["request_rate"] !== "" ? extraInfo["request_rate"] : "Inf";
326-
}
327-
// TODO (huydhn): Fix the passing of tensor_parallel_size to the benchmark
328-
// script on vLLM side
329-
if (model.includes("8B")) {
330-
extraInfo["tensor_parallel_size"] =
331-
extraInfo["tensor_parallel_size"] !== ""
332-
? extraInfo["tensor_parallel_size"]
333-
: 1;
334-
} else if (model.includes("70B")) {
335-
extraInfo["tensor_parallel_size"] =
336-
extraInfo["tensor_parallel_size"] !== ""
337-
? extraInfo["tensor_parallel_size"]
338-
: 4;
339-
} else if (model.includes("8x7B")) {
340-
extraInfo["tensor_parallel_size"] =
341-
extraInfo["tensor_parallel_size"] !== ""
342-
? extraInfo["tensor_parallel_size"]
343-
: 2;
344-
}
345-
346318
row["extra"] = extraInfo;
347319
row["tensor_parallel_size"] = extraInfo["tensor_parallel_size"];
348320
row["request_rate"] = extraInfo["request_rate"];
321+
row["input_len"] = extraInfo["random_input_len"]
322+
? extraInfo["random_input_len"]
323+
: extraInfo["input_len"];
324+
row["output_len"] = extraInfo["random_output_len"]
325+
? extraInfo["random_input_len"]
326+
: extraInfo["output_len"];
349327
}
350328

351329
if (

0 commit comments

Comments
 (0)