mirror of
https://github.com/NVIDIA/TensorRT-LLM.git
synced 2026-01-13 22:18:36 +08:00
[https://nvbugs/5451296][bug] Cherry-pick #7017 from release/1.0 branch (#7043)
Signed-off-by: Iman Tabrizian <10105175+tabrizian@users.noreply.github.com> Co-authored-by: Iman Tabrizian <10105175+Tabrizian@users.noreply.github.com>
This commit is contained in:
parent
e07fcc3a22
commit
d26a5a93ad
@ -428,23 +428,20 @@ class TestTorchLlmArgs:
|
||||
|
||||
@print_traceback_on_error
|
||||
def test_runtime_sizes(self):
|
||||
llm = TorchLLM(
|
||||
llama_model_path,
|
||||
max_beam_width=1,
|
||||
max_num_tokens=256,
|
||||
max_seq_len=128,
|
||||
max_batch_size=8,
|
||||
)
|
||||
with TorchLLM(llama_model_path,
|
||||
max_beam_width=1,
|
||||
max_num_tokens=256,
|
||||
max_seq_len=128,
|
||||
max_batch_size=8) as llm:
|
||||
assert llm.args.max_beam_width == 1
|
||||
assert llm.args.max_num_tokens == 256
|
||||
assert llm.args.max_seq_len == 128
|
||||
assert llm.args.max_batch_size == 8
|
||||
|
||||
assert llm.args.max_beam_width == 1
|
||||
assert llm.args.max_num_tokens == 256
|
||||
assert llm.args.max_seq_len == 128
|
||||
assert llm.args.max_batch_size == 8
|
||||
|
||||
assert llm._executor_config.max_beam_width == 1
|
||||
assert llm._executor_config.max_num_tokens == 256
|
||||
assert llm._executor_config.max_seq_len == 128
|
||||
assert llm._executor_config.max_batch_size == 8
|
||||
assert llm._executor_config.max_beam_width == 1
|
||||
assert llm._executor_config.max_num_tokens == 256
|
||||
assert llm._executor_config.max_seq_len == 128
|
||||
assert llm._executor_config.max_batch_size == 8
|
||||
|
||||
def test_dynamic_setattr(self):
|
||||
with pytest.raises(pydantic_core._pydantic_core.ValidationError):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user