Skip to content

Commit 308eb13

Browse files
author
niushengxiao
committed
fix: fix bugs
1 parent 7473047 commit 308eb13

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

test/benchmark/static_inference/static_benchmark.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
from lightllm.server.router.model_infer.mode_backend.mtp_pre_process import (
3636
prepare_mtp_prefill_inputs,
3737
)
38-
from lightllm.utils.config_utils import get_dtype, get_vocab_size
38+
from lightllm.utils.config_utils import auto_set_fused_shared_experts, get_dtype, get_vocab_size
3939
from lightllm.utils.dist_utils import init_distributed_env
4040
from lightllm.utils.envs_utils import set_env_start_args
4141

@@ -551,6 +551,7 @@ def _make_decode_input(
551551
b_req_idx=req_idx,
552552
b_mtp_index=mtp_index,
553553
b_seq_len=seq_len,
554+
b_position_delta=cpu_i32_zeros(batch_size),
554555
mem_indexes_cpu=mem_indexes,
555556
is_prefill=False,
556557
multimodal_params=empty_multimodal_params(batch_size),
@@ -638,6 +639,7 @@ def _slice_decode_input(self, model_input: ModelInput, batch_start: int, batch_e
638639
b_req_idx=model_input.b_req_idx[batch_start:batch_end].clone(),
639640
b_mtp_index=model_input.b_mtp_index[batch_start:batch_end].clone(),
640641
b_seq_len=b_seq_len,
642+
b_position_delta=model_input.b_position_delta[batch_start:batch_end].clone(),
641643
mem_indexes_cpu=model_input.mem_indexes_cpu[batch_start:batch_end].contiguous(),
642644
is_prefill=False,
643645
multimodal_params=model_input.multimodal_params[batch_start:batch_end],
@@ -1409,6 +1411,7 @@ def main(argv: Optional[Sequence[str]] = None):
14091411
parser = make_argument_parser()
14101412
add_static_benchmark_args(parser)
14111413
args = parser.parse_args(argv)
1414+
auto_set_fused_shared_experts(args)
14121415
if args.benchmark in {"all", "prefill"} and args.batch_max_tokens is None:
14131416
args.batch_max_tokens = 8192
14141417
cases = build_cases(args)

0 commit comments

Comments
 (0)