Skip to content

Commit b3b4372

Browse files
authored
fix 'Namespace' object has no attribute 'num_tokens_per_iter' when serving by gradio (#3647)
1 parent df272b3 commit b3b4372

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lmdeploy/cli/serve.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def add_parser_gradio():
6262
cache_block_seq_len_act = ArgumentHelper.cache_block_seq_len(pt_group)
6363
prefix_caching_act = ArgumentHelper.enable_prefix_caching(pt_group)
6464
max_prefill_token_num_act = ArgumentHelper.max_prefill_token_num(pt_group)
65+
model_format_act = ArgumentHelper.model_format(pt_group)
6566
# turbomind args
6667
tb_group = parser.add_argument_group('TurboMind engine arguments')
6768
# common engine args
@@ -73,7 +74,8 @@ def add_parser_gradio():
7374
tb_group._group_actions.append(cache_block_seq_len_act)
7475
tb_group._group_actions.append(prefix_caching_act)
7576
tb_group._group_actions.append(max_prefill_token_num_act)
76-
ArgumentHelper.model_format(tb_group)
77+
tb_group._group_actions.append(model_format_act)
78+
7779
ArgumentHelper.quant_policy(tb_group)
7880
ArgumentHelper.rope_scaling_factor(tb_group)
7981
ArgumentHelper.communicator(tb_group)
@@ -289,8 +291,6 @@ def gradio(args):
289291
cache_block_seq_len=args.cache_block_seq_len,
290292
enable_prefix_caching=args.enable_prefix_caching,
291293
max_prefill_token_num=args.max_prefill_token_num,
292-
num_tokens_per_iter=args.num_tokens_per_iter,
293-
max_prefill_iters=args.max_prefill_iters,
294294
communicator=args.communicator)
295295
chat_template_config = get_chat_template(args.chat_template)
296296
run(args.model_path_or_server,

0 commit comments

Comments
 (0)