MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT-LLM / command

Method command

tensorrt_llm/evaluate/lm_eval.py:976–993  ·  view source on GitHub ↗
(ctx, **kwargs)

Source from the content-addressed store, hash-verified

974 @click.pass_context
975 @staticmethod
976 def command(ctx, **kwargs) -> None:
977 llm: Union[LLM, PyTorchLLM] = ctx.obj
978
979 evaluator = LongBenchV1(
980 dataset_path=kwargs.pop("dataset_path", None),
981 num_samples=kwargs.pop("num_samples", None),
982 random_seed=kwargs.pop("random_seed", 0),
983 apply_chat_template=kwargs.pop("apply_chat_template", True),
984 system_prompt=kwargs.pop("system_prompt", None),
985 chat_template_kwargs=kwargs.pop("chat_template_kwargs", None),
986 log_samples=kwargs.pop("log_samples", False),
987 output_path=kwargs.pop("output_path", None))
988
989 # Let lm-eval task configs control sampling via gen_kwargs.
990 sampling_params = None
991
992 evaluator.evaluate(llm, sampling_params)
993 llm.shutdown()

Callers

nothing calls this directly

Calls 4

evaluateMethod · 0.95
popMethod · 0.80
LongBenchV1Class · 0.70
shutdownMethod · 0.45

Tested by

no test coverage detected