From 61cc70e8aac0729097502021e983cc1d341d8fb8 Mon Sep 17 00:00:00 2001 From: Chandrakant Khandelwal Date: Mon, 1 Jun 2026 08:16:21 +0530 Subject: [PATCH] Fixed incorrect indexing for slot 0 compatibility (#26481) --- python/sglang/bench_one_batch.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/sglang/bench_one_batch.py b/python/sglang/bench_one_batch.py index 1022ea3d6..e3a2be61e 100644 --- a/python/sglang/bench_one_batch.py +++ b/python/sglang/bench_one_batch.py @@ -383,8 +383,9 @@ def prepare_extend_inputs_for_correctness_test( ): for i in range(len(reqs)): req: Req = reqs[i] - req.fill_ids += input_ids[i][bench_args.cut_len :] + req.fill_ids.extend(input_ids[i][bench_args.cut_len :]) if model_runner is not None: + # Use req.req_pool_idx instead of i to handle slot 0 padding correctly req.prefix_indices = model_runner.req_to_token_pool.req_to_token[ req.req_pool_idx, : bench_args.cut_len ].to(req.prefix_indices.dtype)