MCPcopy Index your code
hub / github.com/NVIDIA/TensorRT-LLM / command

Method command

tensorrt_llm/evaluate/json_mode_eval.py:125–138  ·  view source on GitHub ↗
(ctx, dataset_path: Optional[str], num_samples: int,
                random_seed: int, system_prompt: Optional[str],
                max_input_length: int, max_output_length: int)

Source from the content-addressed store, hash-verified

123 @click.pass_context
124 @staticmethod
125 def command(ctx, dataset_path: Optional[str], num_samples: int,
126 random_seed: int, system_prompt: Optional[str],
127 max_input_length: int, max_output_length: int) -> None:
128 llm: Union[LLM, PyTorchLLM] = ctx.obj
129 sampling_params = SamplingParams(
130 max_tokens=max_output_length,
131 truncate_prompt_tokens=max_input_length)
132 evaluator = JsonModeEval(dataset_path,
133 num_samples=num_samples,
134 random_seed=random_seed,
135 apply_chat_template=True,
136 system_prompt=system_prompt)
137 evaluator.evaluate(llm, sampling_params)
138 llm.shutdown()

Callers

nothing calls this directly

Calls 4

SamplingParamsClass · 0.85
JsonModeEvalClass · 0.70
evaluateMethod · 0.45
shutdownMethod · 0.45

Tested by

no test coverage detected