Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions tensorrt_llm/commands/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ def get_llm_args(model: str,
fail_fast_on_attention_window_too_large,
}

# pop build_config to avoid it overriding the LlmArgs parameters
if backend == "pytorch":
llm_args.pop("build_config", None)

Comment thread
coderabbitai[bot] marked this conversation as resolved.
return llm_args, llm_args_extra_dict


Expand Down Expand Up @@ -317,6 +321,13 @@ def serve(
if extra_llm_api_options is not None:
with open(extra_llm_api_options, 'r') as f:
llm_args_extra_dict = yaml.safe_load(f)
if not isinstance(llm_args_extra_dict, dict):
raise ValueError("llm_args_extra_dict must be a valid yaml file")
if backend == "pytorch" and "build_config" in llm_args_extra_dict:
raise ValueError(
"build_config is not allowed to be set for pytorch backend, please specify the knobs directly"
)

llm_args = update_llm_args_with_extra_dict(llm_args, llm_args_extra_dict)

metadata_server_cfg = parse_metadata_server_config_file(
Expand Down