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':
2458
2458
raise ValueError ("batch_wait_timeout_ms must be greater than 0" )
2459
2459
return self
2460
2460
2461
- def set_mm_encoder_only (self , mm_encoder_only ):
2462
- self .mm_encoder_only = mm_encoder_only
2463
-
2464
2461
def get_executor_config (
2465
2462
self ,
2466
2463
_hf_model_dir : Optional [Path ] = None ,
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ def _build_model(self):
56
56
self ._tokenizer = self .input_processor .tokenizer
57
57
58
58
assert isinstance (self .args , TorchLlmArgs )
59
- self .args .set_mm_encoder_only ( True )
59
+ self .args .mm_encoder_only = True
60
60
61
61
self ._executor = self ._executor_cls .create (
62
62
self ._engine_dir ,
Original file line number Diff line number Diff line change @@ -438,6 +438,13 @@ def test_runtime_sizes(self):
438
438
assert llm .args .max_seq_len == 128
439
439
assert llm .args .max_batch_size == 8
440
440
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
+
441
448
def test_dynamic_setattr (self ):
442
449
with pytest .raises (pydantic_core ._pydantic_core .ValidationError ):
443
450
args = TorchLlmArgs (model = llama_model_path , invalid_arg = 1 )
You can’t perform that action at this time.
0 commit comments