From f32eefae3d20bb8482704daf2a0c5743452f2ce7 Mon Sep 17 00:00:00 2001 From: hoshi-hiyouga Date: Tue, 7 May 2024 00:28:16 +0800 Subject: [PATCH] Update generating_args.py --- src/llmtuner/hparams/generating_args.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/llmtuner/hparams/generating_args.py b/src/llmtuner/hparams/generating_args.py index e3e196e9..e792c003 100644 --- a/src/llmtuner/hparams/generating_args.py +++ b/src/llmtuner/hparams/generating_args.py @@ -46,6 +46,7 @@ class GeneratingArguments: default=1.0, metadata={"help": "Exponential penalty to the length that is used with beam-based generation."}, ) + def to_dict(self) -> Dict[str, Any]: args = asdict(self) if args.get("max_new_tokens", -1) > 0: