Skip to content

Commit d232709

Browse files
ruodilyufeiwu-nvLarryXFly
authored
[https://nvbugs/5666804][test] only adding sampler config for limited models (#9512)
Signed-off-by: Ruodi Lu <[email protected]> Co-authored-by: Ruodi Lu <[email protected]> Co-authored-by: yufeiwu-nv <[email protected]> Co-authored-by: Larry Xu <[email protected]>
1 parent 069b05c commit d232709

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

tests/integration/defs/perf/sampler_options_config.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,19 @@ def get_sampler_options_config(model_label: str) -> dict:
2626
Returns:
2727
dict: sampler options config
2828
"""
29-
base_config = {
30-
'top_k': 4,
31-
'top_p': 0.5,
32-
'temperature': 0.5,
33-
}
29+
base_config = {}
30+
if model_label in [
31+
'llama_v3.1_70b_instruct-bench-pytorch-bfloat16-maxbs:512-maxnt:2048-input_output_len:200,2000-reqs:64-con:200-gpus:8',
32+
'llama_v3.1_70b_instruct_fp8-bench-pytorch-float8-maxbs:512-maxnt:2048-input_output_len:128,128-gpus:8',
33+
'llama_v3.2_1b-bench-pytorch-bfloat16-maxbs:512-maxnt:2048-input_output_len:500,2000-gpus:2',
34+
'llama_v3.3_70b_instruct_fp8-bench-pytorch-float8-maxbs:512-maxnt:2048-input_output_len:128,128-gpus:4',
35+
'llama_v4_maverick_17b_128e_instruct_fp8-bench-pytorch-float8-maxbs:1024-maxnt:20000-kv_frac:0.6-input_output_len:20000,2000-reqs:1000-ep:8-gpus:8',
36+
'llama_v4_maverick_17b_128e_instruct_fp8-bench-pytorch-float8-maxbs:1024-maxnt:4096-kv_frac:0.85-input_output_len:1000,1000-reqs:3000-ep:8-gpus:8',
37+
'llama_v4_scout_17b_16e_instruct_fp8-bench-pytorch-float8-maxbs:1024-maxnt:4096-kv_frac:0.85-input_output_len:500,2000-reqs:3000-ep:8-gpus:8',
38+
'mistral_small_v3.1_24b-bench-pytorch-bfloat16-maxbs:512-maxnt:2048-input_output_len:1000,2000-reqs:500-con:200-gpus:2',
39+
'phi_4_mini_instruct-bench-pytorch-bfloat16-maxbs:512-maxnt:2048-input_output_len:128,128'
40+
]:
41+
base_config['top_k'] = 4
42+
base_config['top_p'] = 0.5
43+
base_config['temperature'] = 0.5
3444
return base_config

tests/integration/defs/perf/test_perf.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2091,10 +2091,11 @@ def get_trtllm_bench_command(self, engine_dir):
20912091
if not os.path.exists(sampler_options_path):
20922092
os.makedirs(os.path.dirname(sampler_options_path), exist_ok=True)
20932093
sampler_config = get_sampler_options_config(self._config.to_string())
2094-
print_info(f"sampler options config: {sampler_config}")
2095-
with open(sampler_options_path, 'w') as f:
2096-
yaml.dump(sampler_config, f, default_flow_style=False)
2097-
benchmark_cmd += [f"--sampler_options={sampler_options_path}"]
2094+
if sampler_config:
2095+
print_info(f"sampler options config: {sampler_config}")
2096+
with open(sampler_options_path, 'w') as f:
2097+
yaml.dump(sampler_config, f, default_flow_style=False)
2098+
benchmark_cmd += [f"--sampler_options={sampler_options_path}"]
20982099
return benchmark_cmd
20992100

21002101
def get_commands(self):

0 commit comments

Comments
 (0)