Skip to content

Commit cbb92c7

Browse files
committed
Deal with serve separately
1 parent 65f356a commit cbb92c7

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

vllm/utils.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,13 +1201,16 @@ def _pull_args_from_config(args: List[str]) -> List[str]:
12011201
config_args = FlexibleArgumentParser._load_config_file(file_path)
12021202

12031203
# 0th index is for {serve,chat,complete}
1204-
# followed by model_tag
1204+
# followed by model_tag (only for serve)
12051205
# followed by config args
12061206
# followed by rest of cli args.
12071207
# maintaining this order will enforce the precedence
12081208
# of cli > config > defaults
1209-
args = [args[0]] + [args[1]] + config_args + \
1210-
args[2:index] + args[index+2:]
1209+
if args[0] == "serve":
1210+
args = [args[0]] + [args[1]
1211+
] + config_args + args[2:index] + args[index + 2:]
1212+
else:
1213+
args = [args[0]] + config_args + args[1:index] + args[index + 2:]
12111214

12121215
return args
12131216

0 commit comments

Comments
 (0)