File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -2619,6 +2619,22 @@ def update_llm_args_with_extra_dict(
26192619 logger .warning (f"Overriding { field_name } { extra_llm_str } " )
26202620
26212621 llm_args = llm_args | llm_args_dict
2622+
2623+ # For trtllm-bench or trtllm-serve, build_config may be passed for the PyTorch
2624+ # backend, overwriting the knobs there since build_config always has the highest priority
2625+ if "build_config" in llm_args :
2626+ for key in [
2627+ "max_batch_size" ,
2628+ "max_num_tokens" ,
2629+ "max_beam_width" ,
2630+ "max_seq_len" ,
2631+ ]:
2632+ if key in llm_args_dict :
2633+ logger .info (
2634+ f"Overriding { key } from build_config to { llm_args_dict [key ]} "
2635+ )
2636+ setattr (llm_args ["build_config" ], key , llm_args_dict [key ])
2637+
26222638 return llm_args
26232639
26242640
You can’t perform that action at this time.
0 commit comments