File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -2458,9 +2458,6 @@ def validate_batch_wait_timeout_ms(self) -> 'TorchLlmArgs':
24582458 raise ValueError ("batch_wait_timeout_ms must be greater than 0" )
24592459 return self
24602460
2461- def set_mm_encoder_only (self , mm_encoder_only ):
2462- self .mm_encoder_only = mm_encoder_only
2463-
24642461 def get_executor_config (
24652462 self ,
24662463 _hf_model_dir : Optional [Path ] = None ,
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ def _build_model(self):
5656 self ._tokenizer = self .input_processor .tokenizer
5757
5858 assert isinstance (self .args , TorchLlmArgs )
59- self .args .set_mm_encoder_only ( True )
59+ self .args .mm_encoder_only = True
6060
6161 self ._executor = self ._executor_cls .create (
6262 self ._engine_dir ,
Original file line number Diff line number Diff line change @@ -438,6 +438,13 @@ def test_runtime_sizes(self):
438438 assert llm .args .max_seq_len == 128
439439 assert llm .args .max_batch_size == 8
440440
441+ executor_config = llm .args .get_executor_config (
442+ llm ._hf_model_dir , llm .tokenizer )
443+ assert executor_config .max_beam_width == 1
444+ assert executor_config .max_num_tokens == 256
445+ assert executor_config .max_seq_len == 128
446+ assert executor_config .max_batch_size == 8
447+
441448 def test_dynamic_setattr (self ):
442449 with pytest .raises (pydantic_core ._pydantic_core .ValidationError ):
443450 args = TorchLlmArgs (model = llama_model_path , invalid_arg = 1 )
You can’t perform that action at this time.
0 commit comments